mirror of https://github.com/ArduPilot/ardupilot
AP_Compass: avoid loaded-value checks in case of HAL_USE_EMPTY_STORAGE
This commit is contained in:
parent
15ec2c9c40
commit
31dd17a743
|
@ -1842,6 +1842,14 @@ bool Compass::configured(uint8_t i)
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef HAL_USE_EMPTY_STORAGE
|
||||
// the load() call below returns zeroes on empty storage, so the
|
||||
// check-stored-value check here will always fail. Since nobody
|
||||
// really cares about the empty-storage case, shortcut out here
|
||||
// for simplicity.
|
||||
return true;
|
||||
#endif
|
||||
|
||||
// back up cached value of dev_id
|
||||
int32_t dev_id_cache_value = _state[id].dev_id;
|
||||
|
||||
|
|
Loading…
Reference in New Issue