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