Cheetah Software
1.0
|
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <asm/termios.h>
#include <termios.h>
#include <rt/rt_interface_lcm.h>
#include <rt/rt_sbus.h>
#include <rt/rt_serial.h>
Go to the source code of this file.
Macros | |
#define | termios asmtermios |
#define | K_SBUS_PORT_SIM "/dev/ttyUSB0" |
Name of SBUS serial port in simulator. More... | |
#define | K_SBUS_PORT_MC "/dev/ttyS4" |
Name of SBUS serial port on the mini cheetah. More... | |
Functions | |
void | unpack_sbus_data (uint8_t sbus_data[], uint16_t *channels_) |
int | read_sbus_data (int port, uint8_t *sbus_data) |
int | read_sbus_channel (int channel) |
int | receive_sbus (int port) |
int | init_sbus (int is_simulator) |
Variables | |
pthread_mutex_t | sbus_data_m |
uint16_t | channels [18] |
uint16_t | channel_data [18] |
#define K_SBUS_PORT_MC "/dev/ttyS4" |
Name of SBUS serial port on the mini cheetah.
Definition at line 31 of file rt_sbus.cpp.
#define K_SBUS_PORT_SIM "/dev/ttyUSB0" |
Name of SBUS serial port in simulator.
Definition at line 29 of file rt_sbus.cpp.
#define termios asmtermios |
Definition at line 11 of file rt_sbus.cpp.
int init_sbus | ( | int | is_simulator | ) |
Definition at line 119 of file rt_sbus.cpp.
References K_SBUS_PORT_MC, K_SBUS_PORT_SIM, sbus_data_m, and set_interface_attribs_custom_baud().
int read_sbus_channel | ( | int | channel | ) |
Definition at line 101 of file rt_sbus.cpp.
References channel_data, and sbus_data_m.
int read_sbus_data | ( | int | port, |
uint8_t * | sbus_data | ||
) |
int receive_sbus | ( | int | port | ) |
Definition at line 108 of file rt_sbus.cpp.
References channels, read_sbus_data(), and unpack_sbus_data().
void unpack_sbus_data | ( | uint8_t | sbus_data[], |
uint16_t * | channels_ | ||
) |
Definition at line 33 of file rt_sbus.cpp.
References channel_data, and sbus_data_m.
uint16_t channel_data[18] |
Definition at line 26 of file rt_sbus.cpp.
uint16_t channels[18] |
Definition at line 25 of file rt_sbus.cpp.
pthread_mutex_t sbus_data_m |
Definition at line 23 of file rt_sbus.cpp.