demo project
Dependencies: AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL
RobotNode/NodeAX12.h@33:8b9dcbf6d8ec, 2016-02-04 (annotated)
- 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?
User | Revision | Line number | New 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 | 12:ac6c9d7f8c40 | 3 | |
henryrawas | 12:ac6c9d7f8c40 | 4 | #ifndef __NODE_AX12_H__ |
henryrawas | 12:ac6c9d7f8c40 | 5 | #define __NODE_AX12_H__ |
henryrawas | 12:ac6c9d7f8c40 | 6 | |
henryrawas | 12:ac6c9d7f8c40 | 7 | #include "RobotNode.h" |
henryrawas | 12:ac6c9d7f8c40 | 8 | #include "AX12.h" |
henryrawas | 12:ac6c9d7f8c40 | 9 | |
henryrawas | 12:ac6c9d7f8c40 | 10 | |
henryrawas | 12:ac6c9d7f8c40 | 11 | class NodeAX12 : public RobotNode |
henryrawas | 12:ac6c9d7f8c40 | 12 | { |
henryrawas | 12:ac6c9d7f8c40 | 13 | public: |
henryrawas | 12:ac6c9d7f8c40 | 14 | NodeAX12(DynamixelBus* pbus, ServoId ID); |
henryrawas | 12:ac6c9d7f8c40 | 15 | |
henryrawas | 12:ac6c9d7f8c40 | 16 | virtual bool HasMeasure(int measureId); |
henryrawas | 12:ac6c9d7f8c40 | 17 | |
henryrawas | 12:ac6c9d7f8c40 | 18 | virtual float GetMeasure(int measureId); |
henryrawas | 12:ac6c9d7f8c40 | 19 | |
henryrawas | 15:4bd10f531cdc | 20 | virtual void ClearMeasureCache(); |
henryrawas | 12:ac6c9d7f8c40 | 21 | |
henryrawas | 12:ac6c9d7f8c40 | 22 | virtual bool HasAction(int actionId); |
henryrawas | 12:ac6c9d7f8c40 | 23 | |
henryrawas | 12:ac6c9d7f8c40 | 24 | virtual bool DoAction(int actionId, float actionValue); |
henryrawas | 12:ac6c9d7f8c40 | 25 | |
henryrawas | 12:ac6c9d7f8c40 | 26 | virtual int GetLastError(); |
henryrawas | 12:ac6c9d7f8c40 | 27 | |
henryrawas | 12:ac6c9d7f8c40 | 28 | virtual bool HasError(); |
henryrawas | 12:ac6c9d7f8c40 | 29 | |
henryrawas | 12:ac6c9d7f8c40 | 30 | virtual NodePartType GetNodeType(); |
henryrawas | 12:ac6c9d7f8c40 | 31 | |
henryrawas | 12:ac6c9d7f8c40 | 32 | private: |
henryrawas | 12:ac6c9d7f8c40 | 33 | AX12 _Servo; |
henryrawas | 12:ac6c9d7f8c40 | 34 | }; |
henryrawas | 12:ac6c9d7f8c40 | 35 | |
henryrawas | 12:ac6c9d7f8c40 | 36 | #endif |