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
MeasureBuf.cpp
00001 // Copyright (c) Microsoft. All rights reserved. 00002 // Licensed under the MIT license. See LICENSE file in the project root for full license information. 00003 00004 #include "mbed.h" 00005 00006 #include "MeasureBuf.h" 00007 00008 00009 SafeCircBuf<MeasureSnapshot, MeasureBufSize, uint32_t> MeasureBuf; 00010 00011 void MeasureGroup::SetMeasure(int numParts, float vals[]) 00012 { 00013 NumVals = NUMJOINTS < numParts ? NUMJOINTS : numParts; 00014 00015 for (int ix = 0; ix < NumVals; ix++) 00016 { 00017 MeasVals[ix] = vals[ix]; 00018 } 00019 } 00020 00021 MeasureGroup& MeasureGroup::operator=(const MeasureGroup& rhs) 00022 { 00023 NumVals = rhs.NumVals; 00024 for (int ix = 0; ix < NUMJOINTS; ix++) 00025 { 00026 MeasVals[ix] = rhs.MeasVals[ix]; 00027 } 00028 return *this; 00029 } 00030
Generated on Tue Jul 12 2022 16:05:14 by
1.7.2