MAV'RIC
Public Member Functions
Spektrum_satellite Class Reference
Inheritance diagram for Spektrum_satellite:
Inheritance graph
[legend]
Collaboration diagram for Spektrum_satellite:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Spektrum_satellite (Serial &uart, Gpio &receiver_pin, Gpio &power_pin)
 Constructor.
bool init (void)
 Initialize UART receiver for Spektrum/DSM2 slave receivers.
void bind (radio_protocol_t protocol)
 Sets the satellite in bind mode.
int16_t channel (const uint8_t channel_number) const
 Return a channels' value.
uint32_t last_update (void) const
 Return the last update time in microseconds.
uint32_t dt (void) const
 Return the time difference between the last 2 updates in microseconds.
void handle_interrupt (void)
 Takes care of incoming data.

Constructor & Destructor Documentation

Spektrum_satellite::Spektrum_satellite ( Serial uart,
Gpio receiver_pin,
Gpio power_pin 
)

Constructor.

Parameters:
uartReference to UART device
receiver_pinReference to signal GPIO
power_pinReference to power GPIO

Member Function Documentation

void Spektrum_satellite::bind ( radio_protocol_t  protocol) [virtual]

Sets the satellite in bind mode.

Parameters:
protocolChannel encoding. It it either 10bits (up to 7 channels) or 11bits(up to 14 channels). We support both.

Implements Satellite.

Here is the call graph for this function:

int16_t Spektrum_satellite::channel ( const uint8_t  channel_number) const [virtual]

Return a channels' value.

Parameters:
channel_numberThe channel ID
Returns:
Value for channel channel_number

Implements Satellite.

Here is the caller graph for this function:

uint32_t Spektrum_satellite::dt ( void  ) const [virtual]

Return the time difference between the last 2 updates in microseconds.

Returns:
dt

Implements Satellite.

uint32_t Spektrum_satellite::last_update ( void  ) const [virtual]

Return the last update time in microseconds.

Returns:
Last update time

Implements Satellite.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines