demo project
Dependencies: AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL
MeasureBuf.cpp@4:36a4eceb1b7f, 2015-12-23 (annotated)
- Committer:
- henryrawas
- Date:
- Wed Dec 23 18:34:06 2015 +0000
- Revision:
- 4:36a4eceb1b7f
- Child:
- 7:6723f6887d00
RobotArm plus publish IoTHub status
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
henryrawas | 4:36a4eceb1b7f | 1 | #include "mbed.h" |
henryrawas | 4:36a4eceb1b7f | 2 | #include "rtos.h" |
henryrawas | 4:36a4eceb1b7f | 3 | |
henryrawas | 4:36a4eceb1b7f | 4 | #include "MeasureBuf.h" |
henryrawas | 4:36a4eceb1b7f | 5 | |
henryrawas | 4:36a4eceb1b7f | 6 | |
henryrawas | 4:36a4eceb1b7f | 7 | |
henryrawas | 4:36a4eceb1b7f | 8 | SafeCircBuf<MeasureGroup, MeasureBufSize, uint32_t> MeasureBuf; |
henryrawas | 4:36a4eceb1b7f | 9 | |
henryrawas | 4:36a4eceb1b7f | 10 | void MeasureGroup::SetMeasure(NodeMeasure mId, vector<float>& vals) |
henryrawas | 4:36a4eceb1b7f | 11 | { |
henryrawas | 4:36a4eceb1b7f | 12 | MeasId = mId; |
henryrawas | 4:36a4eceb1b7f | 13 | NumVals = MAX_PARTS < vals.size() ? MAX_PARTS : vals.size(); |
henryrawas | 4:36a4eceb1b7f | 14 | |
henryrawas | 4:36a4eceb1b7f | 15 | for (int ix = 0; ix < NumVals; ix++) |
henryrawas | 4:36a4eceb1b7f | 16 | { |
henryrawas | 4:36a4eceb1b7f | 17 | MeasVals[ix] = vals[ix]; |
henryrawas | 4:36a4eceb1b7f | 18 | } |
henryrawas | 4:36a4eceb1b7f | 19 | } |
henryrawas | 4:36a4eceb1b7f | 20 |