Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL
Diff: ActionBuf.h
- Revision:
- 4:36a4eceb1b7f
- Child:
- 8:d98e2dec0f40
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ActionBuf.h Wed Dec 23 18:34:06 2015 +0000
@@ -0,0 +1,63 @@
+/*
+Copyright (c) 2015 Jonathan Pickett & Microsoft. Some appropriate open source license.
+*/
+
+#ifndef __ACTIONBUF_H__
+#define __ACTIONBUF_H__
+
+#include "mbed.h"
+#include "SafeCircBuf.h"
+#include "RobotArm.h"
+
+
+#define ActionBufSize 100
+#define ActionArgSize 40
+
+class ActionGroup
+{
+public:
+ ActionGroup() {};
+
+ bool SetAction(ArmAction aId, char* args);
+
+ ArmAction ActionId;
+
+ char ActionArg[ActionArgSize];
+};
+
+extern SafeCircBuf<ActionGroup, ActionBufSize, uint32_t> ActionBuf;
+
+
+enum SequenceAction
+{
+ SA_SetGoal = 0x1,
+ SA_Delay = 0x2,
+ SA_Status = 0x3,
+ SA_Repeat = 0x4
+};
+
+class ActionSequence
+{
+public:
+ ActionSequence();
+
+ ActionSequence(SequenceAction aType);
+
+ ActionSequence(SequenceAction aType, vector<float>& vals, int ms);
+
+ void SetGoal(vector<float>& vals);
+
+ void SetDelay(int ms);
+
+ void SetAction(SequenceAction aType);
+
+ SequenceAction ActionType;
+
+ vector<float> GoalVals;
+
+ int Ms;
+
+};
+
+
+#endif
\ No newline at end of file