Functions | |
| char | rc_get_status (void) |
| char | rc_get_data (unsigned char channel) |
| unsigned char | rc_button_sequence (unsigned char channel, unsigned char len) |
| unsigned char rc_button_sequence | ( | unsigned char | channel, | |
| unsigned char | len | |||
| ) |
Return a value indicating a binary sequence on RC button 'channel'.
This function keeps a static internal value and counter. Each time this function is called, the buttons on channel are sampled. If the lower button is pressed, a 0 is inserted into least signficant but of the value, and the counter incremented. If the upper button is pressed, a 1 is inserted and the counter is incremented.
When the counter reaches 'len', the function returns the value. Until then, it returns -1, indicating that the sequence is not yet complete.
| char rc_get_data | ( | unsigned char | channel | ) |
Retrieve most recently sampled data from the specified channel on the remote control unit. All values returned range from -127 to +127. For joysticks, 0 is the center positionm, full left or full up is -127, and full down or full right is +127. For buttons, 0 indicates that neither button for the channel is pressed, -127 indicates the lower button, and 127 indicates the upper.
| char rc_get_status | ( | void | ) |
Return 1 if the remote control is on, 0 if off, 4 if disabled (master processor is in autonomous mode).
1.5.8