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 ()
 
void backup_memory_clear (size_t len) override
 
void backup_memory_init () override
 
bool backup_memory_read (void *dest, size_t len) override
 
void backup_memory_write (const void *src, size_t len) override
 
bool baro_present () override
 
void baro_read (float *pressure, float *temperature) override
 
void baro_update () override
 
bool battery_current_present () const override
 
float battery_current_read () const override
 
void battery_current_set_multiplier (double multiplier) override
 
bool battery_voltage_present () const override
 
float battery_voltage_read () const override
 
void battery_voltage_set_multiplier (double multiplier) 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
 
bool gnss_has_new_data () override
 
bool gnss_present () override
 
GNSSRaw gnss_raw_read () override
 
GNSSData gnss_read () override
 
void gnss_update () 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_
 
AnalogDigitalConverter battery_adc_
 
BatteryMonitor battery_monitor_
 
Serialcurrent_serial_
 
PWM_OUT esc_out_ [PWM_NUM_OUTPUTS]
 
I2C ext_i2c_
 
M25P16 flash_
 
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_
 
SerialDevice secondary_serial_device_ = SERIAL_DEVICE_VCP
 
I2CSonar sonar_
 
uint8_t sonar_type = SONAR_NONE
 
SPI spi1_
 
SPI spi3_
 
UART uart1_
 
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 70 of file airbourne_board.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
SONAR_NONE 
SONAR_I2C 
SONAR_PWM 

Definition at line 114 of file airbourne_board.h.

Enumerator
SERIAL_DEVICE_VCP 
SERIAL_DEVICE_UART3 

Definition at line 98 of file airbourne_board.h.

Constructor & Destructor Documentation

rosflight_firmware::AirbourneBoard::AirbourneBoard ( )

Definition at line 37 of file airbourne_board.cpp.

Member Function Documentation

void rosflight_firmware::AirbourneBoard::backup_memory_clear ( size_t  len)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 484 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::backup_memory_init ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 468 of file airbourne_board.cpp.

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

<

Todo:
backup_sram_read() has no return value

Implements rosflight_firmware::Board.

Definition at line 473 of file airbourne_board.cpp.

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

Implements rosflight_firmware::Board.

Definition at line 479 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::baro_present ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 199 of file airbourne_board.cpp.

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

Implements rosflight_firmware::Board.

Definition at line 210 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::baro_update ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 205 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::battery_current_present ( ) const
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 351 of file airbourne_board.cpp.

float rosflight_firmware::AirbourneBoard::battery_current_read ( ) const
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 356 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::battery_current_set_multiplier ( double  multiplier)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 361 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::battery_voltage_present ( ) const
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 336 of file airbourne_board.cpp.

float rosflight_firmware::AirbourneBoard::battery_voltage_read ( ) const
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 341 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::battery_voltage_set_multiplier ( double  multiplier)
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 346 of file airbourne_board.cpp.

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

Implements rosflight_firmware::Board.

Definition at line 59 of file airbourne_board.cpp.

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

Implements rosflight_firmware::Board.

Definition at line 76 of file airbourne_board.cpp.

uint64_t rosflight_firmware::AirbourneBoard::clock_micros ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 71 of file airbourne_board.cpp.

uint32_t rosflight_firmware::AirbourneBoard::clock_millis ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 66 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::diff_pressure_present ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 216 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 227 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::diff_pressure_update ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 221 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::gnss_has_new_data ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 256 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::gnss_present ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 250 of file airbourne_board.cpp.

GNSSRaw rosflight_firmware::AirbourneBoard::gnss_raw_read ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 302 of file airbourne_board.cpp.

GNSSData rosflight_firmware::AirbourneBoard::gnss_read ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 264 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::gnss_update ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 255 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::imu_not_responding_error ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 178 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 162 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 442 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::led0_on ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 437 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::led0_toggle ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 447 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::led1_off ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 457 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::led1_on ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 452 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::led1_toggle ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 462 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::mag_present ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 183 of file airbourne_board.cpp.

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

Implements rosflight_firmware::Board.

Definition at line 194 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::mag_update ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 189 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::memory_init ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 421 of file airbourne_board.cpp.

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

Implements rosflight_firmware::Board.

Definition at line 426 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 431 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::new_imu_data ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 157 of file airbourne_board.cpp.

uint16_t rosflight_firmware::AirbourneBoard::num_sensor_errors ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 152 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::pwm_disable ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 399 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 390 of file airbourne_board.cpp.

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

Implements rosflight_firmware::Board.

Definition at line 407 of file airbourne_board.cpp.

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

Implements rosflight_firmware::Board.

Definition at line 367 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::rc_lost ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 415 of file airbourne_board.cpp.

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

Implements rosflight_firmware::Board.

Definition at line 385 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::sensors_init ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 138 of file airbourne_board.cpp.

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

Implements rosflight_firmware::Board.

Definition at line 103 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::serial_flush ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 131 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 82 of file airbourne_board.cpp.

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

Implements rosflight_firmware::Board.

Definition at line 125 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 98 of file airbourne_board.cpp.

bool rosflight_firmware::AirbourneBoard::sonar_present ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 235 of file airbourne_board.cpp.

float rosflight_firmware::AirbourneBoard::sonar_read ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 245 of file airbourne_board.cpp.

void rosflight_firmware::AirbourneBoard::sonar_update ( )
overridevirtual

Implements rosflight_firmware::Board.

Definition at line 240 of file airbourne_board.cpp.

Member Data Documentation

float rosflight_firmware::AirbourneBoard::_accel_scale = 1.0
private

Definition at line 111 of file airbourne_board.h.

int rosflight_firmware::AirbourneBoard::_board_revision = 2
private

Definition at line 109 of file airbourne_board.h.

float rosflight_firmware::AirbourneBoard::_gyro_scale = 1.0
private

Definition at line 112 of file airbourne_board.h.

MS4525 rosflight_firmware::AirbourneBoard::airspeed_
private

Definition at line 85 of file airbourne_board.h.

MS5611 rosflight_firmware::AirbourneBoard::baro_
private

Definition at line 84 of file airbourne_board.h.

AnalogDigitalConverter rosflight_firmware::AirbourneBoard::battery_adc_
private

Definition at line 94 of file airbourne_board.h.

BatteryMonitor rosflight_firmware::AirbourneBoard::battery_monitor_
private

Definition at line 95 of file airbourne_board.h.

Serial* rosflight_firmware::AirbourneBoard::current_serial_
private

Definition at line 77 of file airbourne_board.h.

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

Definition at line 90 of file airbourne_board.h.

I2C rosflight_firmware::AirbourneBoard::ext_i2c_
private

Definition at line 79 of file airbourne_board.h.

M25P16 rosflight_firmware::AirbourneBoard::flash_
private

Definition at line 93 of file airbourne_board.h.

MPU6000 rosflight_firmware::AirbourneBoard::imu_
private

Definition at line 82 of file airbourne_board.h.

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

Definition at line 107 of file airbourne_board.h.

uint64_t rosflight_firmware::AirbourneBoard::imu_time_us_
private

Definition at line 123 of file airbourne_board.h.

I2C rosflight_firmware::AirbourneBoard::int_i2c_
private

Definition at line 78 of file airbourne_board.h.

GPIO rosflight_firmware::AirbourneBoard::inv_pin_
private

Definition at line 89 of file airbourne_board.h.

LED rosflight_firmware::AirbourneBoard::led1_
private

Definition at line 92 of file airbourne_board.h.

LED rosflight_firmware::AirbourneBoard::led2_
private

Definition at line 91 of file airbourne_board.h.

HMC5883L rosflight_firmware::AirbourneBoard::mag_
private

Definition at line 83 of file airbourne_board.h.

bool rosflight_firmware::AirbourneBoard::new_imu_data_
private

Definition at line 122 of file airbourne_board.h.

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

Definition at line 105 of file airbourne_board.h.

RC_PPM rosflight_firmware::AirbourneBoard::rc_ppm_
private

Definition at line 86 of file airbourne_board.h.

RC_SBUS rosflight_firmware::AirbourneBoard::rc_sbus_
private

Definition at line 88 of file airbourne_board.h.

SerialDevice rosflight_firmware::AirbourneBoard::secondary_serial_device_ = SERIAL_DEVICE_VCP
private

Definition at line 103 of file airbourne_board.h.

I2CSonar rosflight_firmware::AirbourneBoard::sonar_
private

Definition at line 87 of file airbourne_board.h.

uint8_t rosflight_firmware::AirbourneBoard::sonar_type = SONAR_NONE
private

Definition at line 120 of file airbourne_board.h.

SPI rosflight_firmware::AirbourneBoard::spi1_
private

Definition at line 80 of file airbourne_board.h.

SPI rosflight_firmware::AirbourneBoard::spi3_
private

Definition at line 81 of file airbourne_board.h.

UART rosflight_firmware::AirbourneBoard::uart1_
private

Definition at line 75 of file airbourne_board.h.

UART rosflight_firmware::AirbourneBoard::uart3_
private

Definition at line 76 of file airbourne_board.h.

VCP rosflight_firmware::AirbourneBoard::vcp_
private

Definition at line 74 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 Sat Mar 21 2020 03:21:03