robot arm demo team / Mbed 2 deprecated RobotArmDemo Featured

Dependencies:   AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL

Revision:
8:d98e2dec0f40
Parent:
4:36a4eceb1b7f
Child:
10:9b21566a5ddb
--- a/ActionBuf.cpp	Tue Dec 29 23:31:28 2015 +0000
+++ b/ActionBuf.cpp	Thu Dec 31 17:47:55 2015 +0000
@@ -28,21 +28,14 @@
 ActionSequence::ActionSequence(SequenceAction aType)
 {
     ActionType = aType;
+    Param = 0;
 };
 
-ActionSequence::ActionSequence(SequenceAction aType, vector<float>& vals, int ms)
+ActionSequence::ActionSequence(SequenceAction aType, vector<float>& vals, int param)
 {
     ActionType = aType;
-    
-    if (aType == SA_SetGoal)
-    {
-        GoalVals = vals;
-        Ms = ms;
-    }
-    else if (aType == SA_Delay)
-    {
-        Ms = ms;
-    }
+    GoalVals = vals;
+    Param = param;
 }
 
 void ActionSequence::SetGoal(vector<float>& vals)
@@ -50,9 +43,9 @@
     GoalVals = vals;
 }
 
-void ActionSequence::SetDelay(int delay)
+void ActionSequence::SetParam(int param)
 {
-    Ms = delay;
+    Param = param;
 }
     
 void ActionSequence::SetAction(SequenceAction aType)