Bayley Wang
/
priustroller_3
temp repo
Fork of priustroller_2 by
Diff: motor.cpp
- Revision:
- 6:99ee0ce47fb2
- Parent:
- 1:1f58bdcf2956
- Child:
- 7:76d6ceb23e0d
--- a/motor.cpp Tue Mar 03 06:28:10 2015 +0000 +++ b/motor.cpp Wed Mar 04 15:33:32 2015 +0000 @@ -2,16 +2,16 @@ #include "core.h" #include "sensors.h" -Motor::Motor(CurrentSensor *sense_a, CurrentSensor *sense_b, PositionSensor *sense_p, TempSensor *sense_t) { - _sense_a = sense_a; +Motor::Motor(CurrentSensor *sense_c, CurrentSensor *sense_b, PositionSensor *sense_p, TempSensor *sense_t) { + _sense_c = sense_c; _sense_b = sense_b; _sense_p = sense_p; _sense_t = sense_t; UpdateState(); } -float Motor::UpdateCurrentA() { - return I_a = _sense_a->GetCurrent(); +float Motor::UpdateCurrentC() { + return I_c = _sense_c->GetCurrent(); } float Motor::UpdateCurrentB() { @@ -27,7 +27,7 @@ } void Motor::UpdateState() { - UpdateCurrentA(); + UpdateCurrentC(); UpdateCurrentB(); UpdatePosition(); }