Psi Swarm robot library version 0.9

Dependents:   PsiSwarm_V9_Blank

Fork of PsiSwarmV9 by James Hilder

Revision:
20:2b6ebe60929d
Parent:
18:9204f74069b4
diff -r 3e3b03d80ea3 -r 2b6ebe60929d motors.cpp
--- a/motors.cpp	Mon Jun 05 22:47:14 2017 +0000
+++ b/motors.cpp	Mon Jul 08 10:50:40 2019 +0000
@@ -108,7 +108,7 @@
     //Start moving
     forward(speed);
     brake_when_done = brake;
-    time_based_action_timeout.attach_us(this,&Motors::IF_end_time_based_action,microseconds);
+    time_based_action_timeout.attach_us(callback(this, &Motors::IF_end_time_based_action), microseconds);
 }
 
 //Turn for a set period of time
@@ -120,7 +120,7 @@
     //Start turning
     turn(speed);
     brake_when_done = brake;
-    time_based_action_timeout.attach_us(this,&Motors::IF_end_time_based_action,microseconds);
+    time_based_action_timeout.attach_us(callback(this, &Motors::IF_end_time_based_action), microseconds);
 }
 
 //Returns the limit of degrees available to turn in given time
@@ -188,7 +188,7 @@
         turn(speed);
 
         brake_when_done = brake;
-        time_based_action_timeout.attach_us(this,&Motors::IF_end_time_based_action,turn_time);
+        time_based_action_timeout.attach_us(callback(this, &Motors::IF_end_time_based_action), turn_time);
         return turn_time;
     }
 }