mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
GCS_MAVLink: move update_sensor_status_flags into GCS subclasses
This commit is contained in:
parent
bb706305d0
commit
8de4ee7348
@ -2,6 +2,17 @@
|
||||
|
||||
extern const AP_HAL::HAL& hal;
|
||||
|
||||
void GCS::get_sensor_status_flags(uint32_t &present,
|
||||
uint32_t &enabled,
|
||||
uint32_t &health)
|
||||
{
|
||||
update_sensor_status_flags();
|
||||
|
||||
present = control_sensors_present;
|
||||
enabled = control_sensors_enabled;
|
||||
health = control_sensors_health;
|
||||
}
|
||||
|
||||
/*
|
||||
send a text message to all GCS
|
||||
*/
|
||||
|
@ -774,7 +774,14 @@ public:
|
||||
// update uart pass-thru
|
||||
void update_passthru();
|
||||
|
||||
virtual void get_sensor_status_flags(uint32_t &present, uint32_t &enabled, uint32_t &health) = 0;
|
||||
void get_sensor_status_flags(uint32_t &present, uint32_t &enabled, uint32_t &health);
|
||||
|
||||
protected:
|
||||
|
||||
uint32_t control_sensors_present;
|
||||
uint32_t control_sensors_enabled;
|
||||
uint32_t control_sensors_health;
|
||||
virtual void update_sensor_status_flags(void) = 0;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -54,5 +54,5 @@ class GCS_Dummy : public GCS
|
||||
|
||||
void send_statustext(MAV_SEVERITY severity, uint8_t dest_bitmask, const char *text) { hal.console->printf("TOGCS: %s\n", text); }
|
||||
|
||||
void get_sensor_status_flags(uint32_t &present, uint32_t &enabled, uint32_t &health) override { present = 0; enabled = 0; health = 0; }
|
||||
void update_sensor_status_flags(void) override {};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user