Robot Control Library
dsm.h File Reference
#include <stdint.h>

Go to the source code of this file.

Macros

#define RC_MAX_DSM_CHANNELS   9
 

Functions

int rc_dsm_init (void)
 Starts the DSM background service. More...
 
int rc_dsm_cleanup (void)
 stops the DSM background service More...
 
int rc_dsm_ch_raw (int ch)
 Returns the pulse width in microseconds commanded by the transmitter for a particular channel. More...
 
double rc_dsm_ch_normalized (int ch)
 Returns a scaled value from -1 to 1 corresponding to the min and max values recorded during calibration. More...
 
int rc_dsm_is_new_data (void)
 This is a check to see if new data is available. More...
 
void rc_dsm_set_callback (void(*func)(void))
 Set your own callback function to be called when new DSM data is ready. More...
 
void rc_dsm_set_disconnect_callback (void(*func)(void))
 Set your own callback function to be called when DSM loses connection. More...
 
int rc_dsm_is_connection_active (void)
 Easily check on the state of the DSM radio packets without checking timeouts yourself. More...
 
int64_t rc_dsm_nanos_since_last_packet (void)
 Measures time since the last DSM packet was received. More...
 
int rc_dsm_resolution (void)
 Used to determine if DSM packets are arriving with 10 or 11-bit resolution. More...
 
int rc_dsm_channels (void)
 fetches number of DSM channels currently being received. More...
 
int rc_dsm_bind_routine (void)
 Begins the binding routine and prints instructions to the screen along the way. More...
 
int rc_dsm_calibrate_routine (void)
 routine for measuring the min and max values from a transmitter on each channel and save to disk for future use. More...