161 float read_accel[3], read_gyro[3];
162 imu_.
read(read_accel, read_gyro, temperature, time_us);
164 accel[0] = -read_accel[1];
165 accel[1] = -read_accel[0];
166 accel[2] = -read_accel[2];
168 gyro[0] = -read_gyro[1];
169 gyro[1] = -read_gyro[0];
170 gyro[2] = -read_gyro[2];
305 full.
year = pvt.time.year;
306 full.
month = pvt.time.month;
307 full.
day = pvt.time.day;
308 full.
hour = pvt.time.hour;
309 full.
min = pvt.time.min;
310 full.
sec = pvt.time.sec;
311 full.
valid = pvt.time.valid;
312 full.
t_acc = pvt.time.tAcc;
313 full.
nano = pvt.time.nano;
320 full.
h_acc = pvt.hAcc;
321 full.
v_acc = pvt.vAcc;
322 full.
vel_n = pvt.velN;
323 full.
vel_e = pvt.velE;
324 full.
vel_d = pvt.velD;
327 full.
s_acc = pvt.sAcc;
329 full.
p_dop = pvt.pDOP;
void serial_flush() override
float sonar_read() override
SerialDevice secondary_serial_device_
void pwm_disable() override
void sensors_init() override
void init(const uart_hardware_struct_t *conf, uint32_t baudrate_, uart_mode_t mode=MODE_8N1)
void led0_toggle() override
uint64_t rosflight_timestamp
void diff_pressure_update() override
static volatile int16_t gyro[3]
uint64_t get_last_pvt_timestamp()
uint16_t num_sensor_errors() override
void backup_memory_write(const void *src, size_t len) override
bool diff_pressure_present() override
void mag_update() override
void init(const pwm_hardware_struct_t *conf)
void baro_read(float *pressure, float *temperature) override
volatile uint32_t millis(void)
bool new_imu_data() override
bool gnss_has_new_data() override
bool memory_write(const void *src, size_t len) override
void sonar_update() override
void init(GPIO_TypeDef *gpio_port, uint16_t pin)
bool has_current_sense() const
Checks if current sense is available. As there isn't hardware to detect this, this simply checks if t...
const BatteryMonitorHardwareStruct battery_monitor_config
AnalogDigitalConverter battery_adc_
void memory_init() override
bool baro_present() override
void diff_pressure_read(float *diff_pressure, float *temperature) override
bool imu_read(float accel[3], float *temperature, float gyro[3], uint64_t *time_us) override
void set_voltage_multiplier(double multiplier)
Sets the voltage multiplier for the battery monitor.
void init(const i2c_hardware_struct_t *c)
virtual uint8_t read_byte()=0
bool has_voltage_sense() const
Checks if voltage sense is available. As there isn't hardware to detect this, this simply checks if t...
const struct ADCHardwareStruct * adc
float read_current() const
Read the current battery current.
void clock_delay(uint32_t milliseconds) override
volatile uint64_t micros(void)
void backup_sram_read(void *dst, size_t len)
uint32_t clock_millis() override
void init_board() override
void init(GPIO_TypeDef *BasePort, uint16_t pin, gpio_mode_t mode)
void backup_memory_clear(size_t len) override
BatteryMonitor battery_monitor_
__STATIC_INLINE void NVIC_SystemReset(void)
System Reset.
void battery_voltage_set_multiplier(double multiplier) override
PWM_OUT esc_out_[PWM_NUM_OUTPUTS]
float read_voltage() const
Read the current battery voltage.
bool read_config(uint8_t *data, uint32_t len)
static volatile int16_t accel[3]
void gnss_update() override
bool write_config(const uint8_t *data, const uint32_t len)
bool battery_voltage_present() const override
void writeUs(uint16_t value)
float battery_voltage_read() const override
const uart_hardware_struct_t uart_config[NUM_UART]
const pwm_hardware_struct_t pwm_config[PWM_NUM_CHANNELS]
void serial_init(uint32_t baud_rate, uint32_t dev) override
bool backup_memory_read(void *dest, size_t len) override
virtual float read(uint8_t channel)=0
float rc_read(uint8_t channel) override
bool sonar_present() override
bool gnss_present() override
void init(const ADCHardwareStruct *adc_def)
Initializes the ADC according to the definition struct provided.
GNSSData gnss_read() override
float battery_current_read() const override
void backup_sram_write(const void *src, size_t len)
bool mag_present() override
GNSSPosECEF read_pos_ecef()
GNSSFull gnss_full_read() override
void backup_memory_init() override
bool memory_read(void *dest, size_t len) override
void set_current_multiplier(double multiplier)
Sets the current multiplier for the battery monitor.
void init(const pwm_hardware_struct_t *pwm_init, uint16_t frequency, uint32_t max_us, uint32_t min_us)
void init(const spi_hardware_struct_t *conf)
virtual void write(const uint8_t *ch, uint8_t len)=0
void backup_sram_clear(size_t len)
uint64_t rosflight_timestamp
void mag_read(float mag[3]) override
bool battery_current_present() const override
uint64_t clock_micros() override
const spi_hardware_struct_t spi_config[NUM_SPI]
void init(const BatteryMonitorHardwareStruct &def, AnalogDigitalConverter *adc, float voltage_multiplier=0, float current_multiplier=0)
Initialize the battery monitor.
const NAV_PVT_t & read_full()
bool read(float mag_data[])
void read(float *accel_data, float *gyro_data, float *temp_data, uint64_t *time_us)
void init(GPIO *inv_pin, UART *uart)
void imu_not_responding_error() override
virtual uint32_t rx_bytes_waiting()=0
GNSSVelECEF read_vel_ecef()
void read(float *differential_pressure, float *temp)
void check_connection_status()
void pwm_write(uint8_t channel, float value) override
void pwm_init(uint32_t refresh_rate, uint16_t idle_pwm) override
void serial_write(const uint8_t *src, size_t len) override
void board_reset(bool bootloader) override
const i2c_hardware_struct_t i2c_config[NUM_I2C]
void rc_init(rc_type_t rc_type) override
void read(float *press, float *temp)
void baro_update() override
void battery_current_set_multiplier(double multiplier) override
void led1_toggle() override
uint16_t serial_bytes_available() override
uint8_t serial_read() override