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.
Diff: PolyServo.cpp
- Revision:
- 7:f9e1e813fa24
- Parent:
- 6:bad5554bb890
- Child:
- 8:c09ae4fef420
--- a/PolyServo.cpp Thu Jul 02 08:53:32 2015 +0000
+++ b/PolyServo.cpp Fri Jul 03 08:17:30 2015 +0000
@@ -15,7 +15,6 @@
servo_timers.push_back(t);
positions.push_back(SERVO_DISABLED);
servos[i]->write(0);
- ResetWrapper<void(*)(int), Polyservo::servo_set> rwrapper(i);
}
@@ -29,12 +28,22 @@
for(int i=0; i< numservos; i++) {
if (global_enable && positions[i] != SERVO_DISABLED){
servos[i]->write(1);
- //servo_timers[i]->attach_us(this,&Polyservo::servo_set,positions[i]);
+ ResetWrapper<void(*)(int), servo_set> rwrapper(i);
+
+ servo_timers[i]->attach_us(&(rwrapper->f), positions[i]);
} else {
servos[i]->write(0);
}
}
+}
+void servo_set(int id) {
+
-}
\ No newline at end of file
+}
+
+
+
+
+