Ian Krase / PolyServo

Dependents:   Quadrapod

Files at this revision

API Documentation at this revision

Comitter:
ikrase
Date:
Sat Jul 04 20:24:36 2015 +0000
Parent:
9:a40eac6bdfae
Commit message:
Polyservo ready for testing;

Changed in this revision

PolyServo.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/PolyServo.cpp	Sat Jul 04 07:11:33 2015 +0000
+++ b/PolyServo.cpp	Sat Jul 04 20:24:36 2015 +0000
@@ -7,6 +7,7 @@
 
 
 Polyservo::Polyservo(DigitalOut servo_pins[]) {
+    numservos = NUM_SERVOS;
     servos.reserve(numservos); servo_timers.reserve(numservos); //positions.reserve(numservos);
     //numservos = num_pins; 
     servo_sets[0] = &Polyservo::servo0_set;
@@ -48,6 +49,7 @@
 
         } else {
             servos[i]->write(0);
+            servo_timers[i]->detach();
         }
         
     }