Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of priustroller_current by
Diff: motor.cpp
- Revision:
- 1:1f58bdcf2956
- Parent:
- 0:54cf32d35f4d
- Child:
- 6:99ee0ce47fb2
--- a/motor.cpp Sun Mar 01 06:16:01 2015 +0000
+++ b/motor.cpp Sun Mar 01 10:51:28 2015 +0000
@@ -1,5 +1,6 @@
#include "includes.h"
-#include "classes.h"
+#include "core.h"
+#include "sensors.h"
Motor::Motor(CurrentSensor *sense_a, CurrentSensor *sense_b, PositionSensor *sense_p, TempSensor *sense_t) {
_sense_a = sense_a;
@@ -21,8 +22,8 @@
return angle = _sense_p->GetPosition();
}
-float Motor::GetTemp() {
- return _sense_t->GetTemp();
+float Motor::UpdateTemp() {
+ return temp = _sense_t->GetTemp();
}
void Motor::UpdateState() {
