AP_ExternalAHRS: allow backends to set default sensor set

This commit is contained in:
Andrew Tridgell 2023-12-02 11:52:50 +11:00
parent cbc14d1fa5
commit 3954425f77
2 changed files with 10 additions and 0 deletions

View File

@ -175,6 +175,11 @@ private:
bool has_sensor(AvailableSensor sensor) const {
return (uint16_t(sensors.get()) & uint16_t(sensor)) != 0;
}
// set default of EAHRS_SENSORS
void set_default_sensors(uint16_t _sensors) {
sensors.set_default(_sensors);
}
};
namespace AP {

View File

@ -53,6 +53,11 @@ protected:
uint16_t get_rate(void) const;
bool option_is_set(AP_ExternalAHRS::OPTIONS option) const;
// set default of EAHRS_SENSORS
void set_default_sensors(uint16_t sensors) {
frontend.set_default_sensors(sensors);
}
private:
AP_ExternalAHRS &frontend;
};