Public Member Functions | Private Types | Private Attributes | List of all members
rosflight_firmware::AirbourneBoard Class Reference

#include <airbourne_board.h>

Inheritance diagram for rosflight_firmware::AirbourneBoard:
Inheritance graph
[legend]

Public Member Functions

 AirbourneBoard ()
 
bool baro_present () override
 
void baro_read (float *pressure, float *temperature) override
 
void baro_update () override
 
void board_reset (bool bootloader) override
 
void clock_delay (uint32_t milliseconds) override
 
uint64_t clock_micros () override
 
uint32_t clock_millis () override
 
bool diff_pressure_present () override
 
void diff_pressure_read (float *diff_pressure, float *temperature) override
 
void diff_pressure_update () override
 
rosflight_firmware::BackupData get_backup_data () override
 
bool gnss_has_new_data () override
 
bool gnss_present () override
 
GNSSRaw gnss_raw_read () override
 
GNSSData gnss_read () override
 
void gnss_update () override
 
bool has_backup_data () override
 
void imu_not_responding_error () override
 
bool imu_read (float accel[3], float *temperature, float gyro[3], uint64_t *time_us) override
 
void init_board () override
 
void led0_off () override
 
void led0_on () override
 
void led0_toggle () override
 
void led1_off () override
 
void led1_on () override
 
void led1_toggle () override
 
bool mag_present () override
 
void mag_read (float mag[3]) override
 
void mag_update () override
 
void memory_init () override
 
bool memory_read (void *dest, size_t len) override
 
bool memory_write (const void *src, size_t len) override
 
bool new_imu_data () override
 
uint16_t num_sensor_errors () override
 
void pwm_disable () override
 
void pwm_init (uint32_t refresh_rate, uint16_t idle_pwm) override
 
void pwm_write (uint8_t channel, float value) override
 
void rc_init (rc_type_t rc_type) override
 
bool rc_lost () override
 
float rc_read (uint8_t channel) override
 
void sensors_init () override
 
uint16_t serial_bytes_available () override
 
void serial_flush () override
 
void serial_init (uint32_t baud_rate, uint32_t dev) override
 
uint8_t serial_read () override
 
void serial_write (const uint8_t *src, size_t len) override
 
bool sonar_present () override
 
float sonar_read () override
 
void sonar_update () override
 

Private Types

enum  { SONAR_NONE, SONAR_I2C, SONAR_PWM }
 
enum  SerialDevice : uint32_t { SERIAL_DEVICE_VCP = 0, SERIAL_DEVICE_UART3 = 3 }
 

Private Attributes

float _accel_scale = 1.0
 
int _board_revision = 2
 
float _gyro_scale = 1.0
 
MS4525 airspeed_
 
MS5611 baro_
 
Serialcurrent_serial_
 
PWM_OUT esc_out_ [PWM_NUM_OUTPUTS]
 
I2C ext_i2c_
 
M25P16 flash_
 
UBLOX gnss_
 
MPU6000 imu_
 
std::function< void()> imu_callback_
 
uint64_t imu_time_us_
 
I2C int_i2c_
 
GPIO inv_pin_
 
LED led1_
 
LED led2_
 
HMC5883L mag_
 
bool new_imu_data_
 
RC_BASErc_ = nullptr
 
RC_PPM rc_ppm_
 
RC_SBUS rc_sbus_
 
UART sbus_uart_
 
SerialDevice secondary_serial_device_ = SERIAL_DEVICE_VCP
 
I2CSonar sonar_
 
uint8_t sonar_type = SONAR_NONE
 
SPI spi1_
 
SPI spi3_
 
UART uart3_
 
VCP vcp_
 

Additional Inherited Members

- Public Types inherited from rosflight_firmware::Board
enum  rc_type_t { RC_TYPE_PPM = 0, RC_TYPE_SBUS = 1 }
 

Detailed Description

Definition at line 67 of file airbourne_board.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
SONAR_NONE 
SONAR_I2C 
SONAR_PWM 

Definition at line 109 of file airbourne_board.h.

Enumerator
SERIAL_DEVICE_VCP 
SERIAL_DEVICE_UART3 

Definition at line 93 of file airbourne_board.h.

Constructor & Destructor Documentation

rosflight_firmware::AirbourneBoard::AirbourneBoard ( )

Definition at line 37 of file airbourne_board.cpp.

Member Function Documentation

bool rosflight_firmware::AirbourneBoard::baro_present ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 196 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::baro_read ( float *  pressure,
float *  temperature 
)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 207 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::baro_update ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 202 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::board_reset ( bool  bootloader)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 58 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::clock_delay ( uint32_t  milliseconds)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 75 of file airbourne_board.cpp.

uint64_t rosflight_firmware::AirbourneBoard::clock_micros ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 70 of file airbourne_board.cpp.

uint32_t rosflight_firmware::AirbourneBoard::clock_millis ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 65 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::diff_pressure_present ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 213 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::diff_pressure_read ( float *  diff_pressure,
float *  temperature 
)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 224 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::diff_pressure_update ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 218 of file airbourne_board.cpp.

rosflight_firmware::BackupData rosflight_firmware::AirbourneBoard::get_backup_data ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 431 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::gnss_has_new_data ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 252 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::gnss_present ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 247 of file airbourne_board.cpp.

GNSSRaw rosflight_firmware::AirbourneBoard::gnss_raw_read ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 297 of file airbourne_board.cpp.

GNSSData rosflight_firmware::AirbourneBoard::gnss_read ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 259 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::gnss_update ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 251 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::has_backup_data ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 426 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::imu_not_responding_error ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 175 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::imu_read ( float  accel[3],
float *  temperature,
float  gyro[3],
uint64_t *  time_us 
)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 159 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::init_board ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 41 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::led0_off ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 403 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::led0_on ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 399 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::led0_toggle ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 407 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::led1_off ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 416 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::led1_on ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 412 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::led1_toggle ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 420 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::mag_present ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 180 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::mag_read ( float  mag[3])
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 191 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::mag_update ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 186 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::memory_init ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 383 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::memory_read ( void *  dest,
size_t  len 
)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 388 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::memory_write ( const void *  src,
size_t  len 
)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 393 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::new_imu_data ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 154 of file airbourne_board.cpp.

uint16_t rosflight_firmware::AirbourneBoard::num_sensor_errors ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 149 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::pwm_disable ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 364 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::pwm_init ( uint32_t  refresh_rate,
uint16_t  idle_pwm 
)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 355 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::pwm_write ( uint8_t  channel,
float  value 
)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 372 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::rc_init ( rc_type_t  rc_type)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 332 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::rc_lost ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 377 of file airbourne_board.cpp.

float rosflight_firmware::AirbourneBoard::rc_read ( uint8_t  channel)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 350 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::sensors_init ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 137 of file airbourne_board.cpp.

uint16_t rosflight_firmware::AirbourneBoard::serial_bytes_available ( void  )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 102 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::serial_flush ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 130 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::serial_init ( uint32_t  baud_rate,
uint32_t  dev 
)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 81 of file airbourne_board.cpp.

uint8_t rosflight_firmware::AirbourneBoard::serial_read ( void  )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 124 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::serial_write ( const uint8_t *  src,
size_t  len 
)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 97 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::sonar_present ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 232 of file airbourne_board.cpp.

float rosflight_firmware::AirbourneBoard::sonar_read ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 242 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::sonar_update ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 237 of file airbourne_board.cpp.

Member Data Documentation

float rosflight_firmware::AirbourneBoard::_accel_scale = 1.0
private

Definition at line 106 of file airbourne_board.h.

int rosflight_firmware::AirbourneBoard::_board_revision = 2
private

Definition at line 104 of file airbourne_board.h.

float rosflight_firmware::AirbourneBoard::_gyro_scale = 1.0
private

Definition at line 107 of file airbourne_board.h.

MS4525 rosflight_firmware::AirbourneBoard::airspeed_
private

Definition at line 81 of file airbourne_board.h.

MS5611 rosflight_firmware::AirbourneBoard::baro_
private

Definition at line 80 of file airbourne_board.h.

Serial* rosflight_firmware::AirbourneBoard::current_serial_
private

Definition at line 73 of file airbourne_board.h.

PWM_OUT rosflight_firmware::AirbourneBoard::esc_out_[PWM_NUM_OUTPUTS]
private

Definition at line 87 of file airbourne_board.h.

I2C rosflight_firmware::AirbourneBoard::ext_i2c_
private

Definition at line 75 of file airbourne_board.h.

M25P16 rosflight_firmware::AirbourneBoard::flash_
private

Definition at line 90 of file airbourne_board.h.

UBLOX rosflight_firmware::AirbourneBoard::gnss_
private

Definition at line 91 of file airbourne_board.h.

MPU6000 rosflight_firmware::AirbourneBoard::imu_
private

Definition at line 78 of file airbourne_board.h.

std::function<void()> rosflight_firmware::AirbourneBoard::imu_callback_
private

Definition at line 102 of file airbourne_board.h.

uint64_t rosflight_firmware::AirbourneBoard::imu_time_us_
private

Definition at line 118 of file airbourne_board.h.

I2C rosflight_firmware::AirbourneBoard::int_i2c_
private

Definition at line 74 of file airbourne_board.h.

GPIO rosflight_firmware::AirbourneBoard::inv_pin_
private

Definition at line 86 of file airbourne_board.h.

LED rosflight_firmware::AirbourneBoard::led1_
private

Definition at line 89 of file airbourne_board.h.

LED rosflight_firmware::AirbourneBoard::led2_
private

Definition at line 88 of file airbourne_board.h.

HMC5883L rosflight_firmware::AirbourneBoard::mag_
private

Definition at line 79 of file airbourne_board.h.

bool rosflight_firmware::AirbourneBoard::new_imu_data_
private

Definition at line 117 of file airbourne_board.h.

RC_BASE* rosflight_firmware::AirbourneBoard::rc_ = nullptr
private

Definition at line 100 of file airbourne_board.h.

RC_PPM rosflight_firmware::AirbourneBoard::rc_ppm_
private

Definition at line 82 of file airbourne_board.h.

RC_SBUS rosflight_firmware::AirbourneBoard::rc_sbus_
private

Definition at line 84 of file airbourne_board.h.

UART rosflight_firmware::AirbourneBoard::sbus_uart_
private

Definition at line 85 of file airbourne_board.h.

SerialDevice rosflight_firmware::AirbourneBoard::secondary_serial_device_ = SERIAL_DEVICE_VCP
private

Definition at line 98 of file airbourne_board.h.

I2CSonar rosflight_firmware::AirbourneBoard::sonar_
private

Definition at line 83 of file airbourne_board.h.

uint8_t rosflight_firmware::AirbourneBoard::sonar_type = SONAR_NONE
private

Definition at line 115 of file airbourne_board.h.

SPI rosflight_firmware::AirbourneBoard::spi1_
private

Definition at line 76 of file airbourne_board.h.

SPI rosflight_firmware::AirbourneBoard::spi3_
private

Definition at line 77 of file airbourne_board.h.

UART rosflight_firmware::AirbourneBoard::uart3_
private

Definition at line 72 of file airbourne_board.h.

VCP rosflight_firmware::AirbourneBoard::vcp_
private

Definition at line 71 of file airbourne_board.h.


The documentation for this class was generated from the following files:


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:31