demo project

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

Revision:
18:224289104fc0
Child:
19:2f0ec9ac1238
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Utils/MeasureBuf.h	Sat Jan 23 00:08:30 2016 +0000
@@ -0,0 +1,48 @@
+/* 
+Copyright (c) 2015 Jonathan Pickett & Microsoft. Some appropriate open source license.
+*/
+
+#ifndef __MEASUREBUF_H__
+#define __MEASUREBUF_H__
+
+#include "mbed.h"
+#include "SafeCircBuf.h"
+#include "RobotArmCfg.h"
+
+
+#define MeasureBufSize  4
+
+
+class MeasureGroup
+{
+public:
+    MeasureGroup() {};
+    
+    MeasureGroup& operator=(const MeasureGroup& rhs);
+    
+    void SetMeasure(int numParts, float vals[]);
+    
+    int NumVals;
+    
+    float MeasVals[NUMJOINTS];
+};
+
+class MeasureSnapshot
+{
+public:
+    MeasureSnapshot() {};
+    
+    MeasureGroup Temps;
+    
+    MeasureGroup Volts;
+    
+    MeasureGroup Loads;
+    
+    MeasureGroup Positions;
+    
+    time_t Created;
+};
+
+extern SafeCircBuf<MeasureSnapshot, MeasureBufSize, uint32_t> MeasureBuf;
+
+#endif
\ No newline at end of file