AP_Compass: added force_save_calibration()
This commit is contained in:
parent
25dd08a1fd
commit
f8e0227c8c
@ -2020,6 +2020,17 @@ void Compass::handle_external(const AP_ExternalAHRS::mag_data_message_t &pkt)
|
||||
}
|
||||
#endif // HAL_EXTERNAL_AHRS_ENABLED
|
||||
|
||||
// force save of current calibration as valid
|
||||
void Compass::force_save_calibration(void)
|
||||
{
|
||||
for (StateIndex i(0); i<COMPASS_MAX_INSTANCES; i++) {
|
||||
if (_state[i].dev_id != 0) {
|
||||
_state[i].dev_id.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// singleton instance
|
||||
Compass *Compass::_singleton;
|
||||
|
||||
|
@ -354,7 +354,10 @@ public:
|
||||
#if HAL_EXTERNAL_AHRS_ENABLED
|
||||
void handle_external(const AP_ExternalAHRS::mag_data_message_t &pkt);
|
||||
#endif
|
||||
|
||||
|
||||
// force save of current calibration as valid
|
||||
void force_save_calibration(void);
|
||||
|
||||
private:
|
||||
static Compass *_singleton;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user