Ian Krase / PolyServo

Dependents:   Quadrapod

Revision:
6:bad5554bb890
Parent:
3:1d16a22386a8
Child:
7:f9e1e813fa24
diff -r 92fc8f455565 -r bad5554bb890 PolyServo.h
--- a/PolyServo.h	Sat Jun 27 08:19:19 2015 +0000
+++ b/PolyServo.h	Thu Jul 02 08:53:32 2015 +0000
@@ -4,7 +4,7 @@
 #include "mbed.h"
 #include "FPointer.h"
 #include <vector>
-#include "SpecifiedTimeout.h"
+//#include "SpecifiedTimeout.h"
 
 
 #define SERVO_DISABLED -1       // This is going to take raw servo microsecond entries. 
@@ -33,10 +33,23 @@
     std::vector<Timeout *> servo_timers;
     //Timeout * servo_times; 
     
-    uint32_t servo_set(uint32_t);
+    void servo_set(int id);
     
     void servos_reset(void);
     
+    template <typename Func, Func func>
+    
+    struct ResetWrapper {
+        ResetWrapper(int id): id_(id) { }
+        void servo_set() {func(id_);}
+        int id_; 
+        };
+        
+    //std::vector<ResetWrapper *> resetws;
+
+        
+        
+