Bayley Wang
/
priustroller_3
temp repo
Fork of priustroller_2 by
Diff: core/motor.cpp
- Revision:
- 29:cb03760ba9ea
- Parent:
- 11:dccbaa9274c5
- Child:
- 30:2b6d426f3bfc
--- a/core/motor.cpp Sat Mar 14 19:18:34 2015 +0000 +++ b/core/motor.cpp Sat Mar 14 23:42:46 2015 +0000 @@ -2,19 +2,17 @@ #include "core.h" #include "sensors.h" -Motor::Motor(CurrentSensor *sense_c, CurrentSensor *sense_b, PositionSensor *sense_p, TempSensor *sense_t) { - _sense_c = sense_c; - _sense_b = sense_b; +Motor::Motor(PositionSensor *sense_p, TempSensor *sense_t) { _sense_p = sense_p; _sense_t = sense_t; } float Motor::GetCurrentC() { - return _sense_c->GetCurrent(); + return (float) global_ic / 4095.0f; } float Motor::GetCurrentB() { - return _sense_b->GetCurrent(); + return (float) global_ib / 4095.0f; } float Motor::GetPosition() {