Skip to content

Commit

Permalink
prep for sensor init reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
avtoku committed Aug 27, 2024
1 parent b84cdf7 commit 84578c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

namespace rosflight_firmware
{

class Board
{
public:
Expand Down Expand Up @@ -68,10 +69,13 @@ class Board
virtual void serial_flush() = 0;

// sensors
virtual void sensors_init() = 0;
virtual uint16_t num_sensor_errors() = 0;
virtual void sensors_init(void) = 0;
virtual uint16_t sensors_errors_count() = 0;
virtual uint16_t sensors_init_message_count() = 0;
virtual uint16_t sensors_init_message(char &message, uint32_t i) = 0;

// IMU
virtual bool imu_present() = 0;
virtual bool imu_has_new_data() = 0;
virtual bool imu_read(float accel[3], float * temperature, float gyro[3], uint64_t * time) = 0;
virtual void imu_not_responding_error() = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/comm_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ void CommManager::send_status(void)
comm_link_.send_status(
sysid_, RF_.state_manager_.state().armed, RF_.state_manager_.state().failsafe,
RF_.command_manager_.rc_override_active(), RF_.command_manager_.offboard_control_active(),
RF_.state_manager_.state().error_codes, control_mode, RF_.board_.num_sensor_errors(),
RF_.state_manager_.state().error_codes, control_mode, RF_.board_.sensors_errors_count(),
RF_.get_loop_time_us());
}

Expand Down

0 comments on commit 84578c9

Please sign in to comment.