Cheetah Software
1.0
|
#include <pthread.h>
#include <rt/rt_interface_lcm.h>
#include <rt/rt_sbus.h>
#include <gui_main_control_settings_t.hpp>
#include <rc_channels_t.hpp>
Go to the source code of this file.
Functions | |
void | control_iteration_lcm () |
Increments the number of control iterations since the last LCM packet. More... | |
int | get_iterations_since_last_lcm () |
Gets the iterations since the last lcm. More... | |
void | get_main_control_settings (void *settings) |
void | get_rc_channels (void *settings) |
void | sbus_packet_complete () |
Function which handles the completion of an SBUS Packet and overrides the LCM control settings as desired. More... | |
void | init_interface_lcm (lcm::LCM *main_lcm) |
Initializer for all handlers related to the interface LCM streams. More... | |
void * | v_memcpy (void *dest, volatile void *src, size_t n) |
Variables | |
static lcm::LCM * | g_lcm |
static pthread_mutex_t | lcm_get_set_mutex |
int | iterations_since_last_lcm = 0 |
gui_main_control_settings_t | main_control_settings |
rc_channels_t | rc_channels |
void control_iteration_lcm | ( | ) |
Increments the number of control iterations since the last LCM packet.
Definition at line 18 of file rt_interface_lcm.cpp.
References iterations_since_last_lcm.
int get_iterations_since_last_lcm | ( | ) |
Gets the iterations since the last lcm.
Definition at line 25 of file rt_interface_lcm.cpp.
References iterations_since_last_lcm.
void get_main_control_settings | ( | void * | settings | ) |
Definition at line 62 of file rt_interface_lcm.cpp.
References lcm_get_set_mutex, main_control_settings, and v_memcpy().
void get_rc_channels | ( | void * | settings | ) |
Definition at line 68 of file rt_interface_lcm.cpp.
References lcm_get_set_mutex, rc_channels, and v_memcpy().
void init_interface_lcm | ( | lcm::LCM * | main_lcm | ) |
Initializer for all handlers related to the interface LCM streams.
main_lcm | A pointer to the main lcm object used in the lcm thread |
Definition at line 172 of file rt_interface_lcm.cpp.
References g_lcm, main_control_settings, Handler::main_control_settings_handler(), and Handler::rc_channels_handler().
void sbus_packet_complete | ( | ) |
Function which handles the completion of an SBUS Packet and overrides the LCM control settings as desired.
Definition at line 78 of file rt_interface_lcm.cpp.
References f(), lcm_get_set_mutex, main_control_settings, and read_sbus_channel().
void* v_memcpy | ( | void * | dest, |
volatile void * | src, | ||
size_t | n | ||
) |
|
static |
Definition at line 4 of file rt_interface_lcm.cpp.
int iterations_since_last_lcm = 0 |
Definition at line 12 of file rt_interface_lcm.cpp.
|
static |
mutex to protect gui settings coming over LCM
Definition at line 8 of file rt_interface_lcm.cpp.
gui_main_control_settings_t main_control_settings |
Definition at line 30 of file rt_interface_lcm.cpp.
rc_channels_t rc_channels |
Definition at line 34 of file rt_interface_lcm.cpp.