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.
Dependents: mbed_XBus_Test mbed_XBus_MotionTest XBusServoTest ControlYokutan2017_2 ... more
XBusServo Class Reference
Library class for XBus servo. More...
#include <XBusServo.h>
Public Member Functions | |
| XBusServo (PinName tx, PinName rx, PinName sw, uint8_t maxServoNum) | |
| XBusError | start () |
| Start function to use XBus This should NOT be called on interrupt handler. | |
| void | stop () |
| Stop function to use XBus This should NOT be called on interrupt handler. | |
| XBusError | addServo (uint8_t channelID, uint16_t initValue) |
| Add new servo to the buffer on this library This should NOT be called on interrupt handler when you setup the XBus servo. | |
| XBusError | removeServo (uint8_t channelID) |
| Remove the servo from the buffer on this library This should NOT be called on interrupt handler when you setup the XBus servo. | |
| XBusError | setServo (uint8_t channelID, uint16_t value) |
| Set new value to the servo This should NOT be called on interrupt handler when you setup the XBus servo. | |
| void | sendChannelDataPacket (void) |
| This should be called on the timer handler when you use the XBus servo. | |
| XBusError | setChannelID (uint8_t oldChannelID, uint8_t newChannelID) |
| Set new channel ID to the XBus servo This should NOT be called on interrupt handler when you setup the XBus servo. | |
| XBusError | setCommand (uint8_t channelID, uint8_t order, int16_t *value) |
| Send set command to the XBus servo This should NOT be called on interrupt handler when you setup the XBus servo. | |
| XBusError | getCommand (uint8_t channelID, uint8_t order, int16_t *value) |
| Send get command to the XBus servo This should NOT be called on interrupt handler when you setup the XBus servo. | |
| XBusError | setChannelID (uint8_t newChannelID) |
| Set new channel ID to the XBus servo This should NOT be called on interrupt handler when you setup the XBus servo. | |
| XBusError | setCommand (uint8_t order, int16_t *value) |
| Send set command to the XBus servo This should NOT be called on interrupt handler when you setup the XBus servo. | |
Detailed Description
Library class for XBus servo.
- Note:
- 2014/09/02 : move from Arduino lib by Sawa
Definition at line 111 of file XBusServo.h.
Constructor & Destructor Documentation
| XBusServo | ( | PinName | tx, |
| PinName | rx, | ||
| PinName | sw, | ||
| uint8_t | maxServoNum | ||
| ) |
- Parameters:
-
tx pin name for tx rx pin name for rx sw pin name for switch tx maxServoNum max number of servo that you want to connect. (limit 50) this does just to resetve the buffer. you need to add XBus servo at the beginning of your sketch
Definition at line 79 of file XBusServo.cpp.
Member Function Documentation
| XBusError addServo | ( | uint8_t | channelID, |
| uint16_t | initValue | ||
| ) |
Add new servo to the buffer on this library This should NOT be called on interrupt handler when you setup the XBus servo.
- Returns:
- XBus error code
- Parameters:
-
channelID channel ID of the XBus servo that you want to use initValue initial value of this XBus servo use kXbusServoNeutral for center of the XBus servo
Definition at line 456 of file XBusServo.cpp.
| XBusError getCommand | ( | uint8_t | channelID, |
| uint8_t | order, | ||
| int16_t * | value | ||
| ) |
Send get command to the XBus servo This should NOT be called on interrupt handler when you setup the XBus servo.
- Returns:
- XBus error code
- Parameters:
-
channelID channel ID of the XBus servo that you want to get from order the order that you want value the value that you want to get from
Definition at line 728 of file XBusServo.cpp.
| XBusError removeServo | ( | uint8_t | channelID ) |
Remove the servo from the buffer on this library This should NOT be called on interrupt handler when you setup the XBus servo.
- Returns:
- XBus error code
- Parameters:
-
channelID channel ID of the XBus servo that you want to remove
Definition at line 510 of file XBusServo.cpp.
| void sendChannelDataPacket | ( | void | ) |
This should be called on the timer handler when you use the XBus servo.
Definition at line 326 of file XBusServo.cpp.
| XBusError setChannelID | ( | uint8_t | newChannelID ) |
Set new channel ID to the XBus servo This should NOT be called on interrupt handler when you setup the XBus servo.
- Returns:
- XBus error code
- Parameters:
-
newChannelID new channel ID for the XBus servo
- Note:
- this is only for TX only mode
Definition at line 644 of file XBusServo.cpp.
| XBusError setChannelID | ( | uint8_t | oldChannelID, |
| uint8_t | newChannelID | ||
| ) |
Set new channel ID to the XBus servo This should NOT be called on interrupt handler when you setup the XBus servo.
- Returns:
- XBus error code
- Parameters:
-
oldChannelID channel IDof the XBus servo to change the ID newChannelID new channel ID for the XBus servo
Definition at line 616 of file XBusServo.cpp.
| XBusError setCommand | ( | uint8_t | order, |
| int16_t * | value | ||
| ) |
Send set command to the XBus servo This should NOT be called on interrupt handler when you setup the XBus servo.
- Returns:
- XBus error code
- Parameters:
-
order the order that you want value the value that you want to set and return current value
- Note:
- this is only for TX only mode
Definition at line 746 of file XBusServo.cpp.
| XBusError setCommand | ( | uint8_t | channelID, |
| uint8_t | order, | ||
| int16_t * | value | ||
| ) |
Send set command to the XBus servo This should NOT be called on interrupt handler when you setup the XBus servo.
- Returns:
- XBus error code
- Parameters:
-
channelID channel ID of the XBus servo that you want to set to order the order that you want value the value that you want to set and return current value
Definition at line 710 of file XBusServo.cpp.
| XBusError setServo | ( | uint8_t | channelID, |
| uint16_t | value | ||
| ) |
Set new value to the servo This should NOT be called on interrupt handler when you setup the XBus servo.
- Returns:
- XBus error code
- Parameters:
-
channelID channel ID of the XBus servo that you want to set value value of this XBus servo use kXbusServoNeutral for center of the XBus servo
Definition at line 566 of file XBusServo.cpp.
| XBusError start | ( | ) |
Start function to use XBus This should NOT be called on interrupt handler.
- Returns:
- XBus error code
Definition at line 116 of file XBusServo.cpp.
| void stop | ( | ) |
Stop function to use XBus This should NOT be called on interrupt handler.
Definition at line 172 of file XBusServo.cpp.
Generated on Thu Jul 14 2022 02:11:36 by
1.7.2