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.h
- Revision:
- 9:a40eac6bdfae
- Parent:
- 8:c09ae4fef420
--- a/PolyServo.h	Sat Jul 04 03:32:02 2015 +0000
+++ b/PolyServo.h	Sat Jul 04 07:11:33 2015 +0000
@@ -11,8 +11,7 @@
 #define PPM_PERIOD 20000  // In microseconds
 #define NUM_SERVOS 12
 
-void servo_set(int id);
-
+//void servo_set(int id);
 
 
 class Polyservo {
@@ -30,6 +29,9 @@
     Polyservo(DigitalOut servo_pins[]);
     void set_position(int s, int pos);
     
+    typedef void (Polyservo::*PolyservoMbr)(void);
+
+    
     
     
     
@@ -60,7 +62,11 @@
     void servo11_set(void);
     //void servo12_set(void);    
     
-    void (*servo_sets[NUM_SERVOS])(void);
+    
+    
+    //void (Polyservo::*)(void) myPtr;
+    PolyservoMbr servo_sets[12];
+    
 
         
 
@@ -78,4 +84,5 @@
 
 
 
+
 #endif
\ No newline at end of file