demo project

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

Committer:
henryrawas
Date:
Thu Feb 04 20:10:33 2016 +0000
Revision:
33:8b9dcbf6d8ec
Parent:
19:2f0ec9ac1238
update libs

Who changed what in which revision?

UserRevisionLine numberNew contents of line
henryrawas 19:2f0ec9ac1238 1 // Copyright (c) Microsoft. All rights reserved.
henryrawas 19:2f0ec9ac1238 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
henryrawas 19:2f0ec9ac1238 3
henryrawas 4:36a4eceb1b7f 4 #include "mbed.h"
henryrawas 4:36a4eceb1b7f 5
henryrawas 4:36a4eceb1b7f 6 #include "MeasureBuf.h"
henryrawas 4:36a4eceb1b7f 7
henryrawas 4:36a4eceb1b7f 8
henryrawas 17:0dbcbd8587fd 9 SafeCircBuf<MeasureSnapshot, MeasureBufSize, uint32_t> MeasureBuf;
henryrawas 4:36a4eceb1b7f 10
henryrawas 18:224289104fc0 11 void MeasureGroup::SetMeasure(int numParts, float vals[])
henryrawas 4:36a4eceb1b7f 12 {
henryrawas 13:ffeff9b5e513 13 NumVals = NUMJOINTS < numParts ? NUMJOINTS : numParts;
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
henryrawas 13:ffeff9b5e513 21 MeasureGroup& MeasureGroup::operator=(const MeasureGroup& rhs)
henryrawas 13:ffeff9b5e513 22 {
henryrawas 13:ffeff9b5e513 23 NumVals = rhs.NumVals;
henryrawas 13:ffeff9b5e513 24 for (int ix = 0; ix < NUMJOINTS; ix++)
henryrawas 13:ffeff9b5e513 25 {
henryrawas 13:ffeff9b5e513 26 MeasVals[ix] = rhs.MeasVals[ix];
henryrawas 13:ffeff9b5e513 27 }
henryrawas 13:ffeff9b5e513 28 return *this;
henryrawas 13:ffeff9b5e513 29 }
henryrawas 13:ffeff9b5e513 30