Ian Krase / PolyServo

Dependents:   Quadrapod

Revision:
9:a40eac6bdfae
Parent:
8:c09ae4fef420
diff -r c09ae4fef420 -r a40eac6bdfae PolyServo.h
--- 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