|
TR-mbed 1.0
|
#include <DJIRemote.h>
Public Types | |
| enum class | Channel { RIGHT_HORIZONTAL , RIGHT_VERTICAL , LEFT_HORIZONTAL , LEFT_VERTICAL } |
| enum class | Switch { LEFT_SWITCH , RIGHT_SWITCH } |
| enum class | SwitchState { UNKNOWN , DOWN , MID , UP } |
| enum class | Key { W = 0 , S , A , D , SHIFT , CTRL , Q , E , R , F , G , Z , X , C , V , B } |
Public Member Functions | |
| Remote (PinName dbus) | |
| void | initialize () |
| void | read () |
| __attribute__ ((unused)) bool isConnected() const | |
| float | getChannel (Channel ch) const |
| int16_t | getChannelInt (Channel ch) const |
| void | printAxisData () const |
| void | dumpInfo () const |
| SwitchState | getSwitch (Switch sw) const |
| int16_t | getMouseX () const |
| int16_t | getMouseY () const |
| int16_t | getMouseZ () const |
| bool | getMouseL () const |
| bool | getMouseR () const |
| bool | keyPressed (Key key) const |
| int16_t | getWheel () const |
| uint32_t | getUpdateCounter () const |
| int | leftX () const |
| int | leftY () const |
| int | rightX () const |
| int | rightY () const |
| Remote::SwitchState | leftSwitch () const |
| Remote::SwitchState | rightSwitch () const |
Public Attributes | |
| long | badDataChainNumber = 0 |
| long | goodDataChainNumber = 0 |
| bool | unfiltered = false |
A unique UART handler that uses timing in leu of DBUS communication (mbed does not support DBUS) to interact with the DR16 receiver.
|
strong |
|
strong |
|
strong |
|
strong |
| Remote::Remote | ( | PinName | dbus | ) |
| Remote::__attribute__ | ( | (unused) | ) | const |
true if the remote is connected, false otherwise. | void Remote::dumpInfo | ( | ) | const |
| float Remote::getChannel | ( | Channel | ch | ) | const |
| int16_t Remote::getChannelInt | ( | Channel | ch | ) | const |
| bool Remote::getMouseL | ( | ) | const |
| bool Remote::getMouseR | ( | ) | const |
| int16_t Remote::getMouseX | ( | ) | const |
| int16_t Remote::getMouseY | ( | ) | const |
| int16_t Remote::getMouseZ | ( | ) | const |
| SwitchState Remote::getSwitch | ( | Switch | sw | ) | const |
| uint32_t Remote::getUpdateCounter | ( | ) | const |
| int16_t Remote::getWheel | ( | ) | const |
[-STICK_MAX_VALUE, STICK_MAX_VALUE]. | void Remote::initialize | ( | ) |
Enables and initializes bound_ports::REMOTE_SERIAL_UART_PORT.
| bool Remote::keyPressed | ( | Key | key | ) | const |
true if the given key is pressed, false otherwise.
|
inline |
|
inline |
|
inline |
| void Remote::printAxisData | ( | ) | const |
| void Remote::read | ( | ) |
Reads/parses the current buffer and updates the current remote info state and CommandMapper state.
|
inline |
|
inline |
|
inline |
| long Remote::badDataChainNumber = 0 |
| long Remote::goodDataChainNumber = 0 |
| bool Remote::unfiltered = false |