AP_Compass: implement SIM_MAG_SAVE_IDS

This commit is contained in:
Andrew Tridgell 2023-09-21 08:58:03 +10:00
parent f7a1227c25
commit aaeee2e7dc
1 changed files with 4 additions and 2 deletions

View File

@ -22,8 +22,10 @@ AP_Compass_SITL::AP_Compass_SITL()
_compass_instance[_num_compass] = instance;
set_dev_id(_compass_instance[_num_compass], dev_id);
if (_sitl->mag_save_ids) {
// save so the compass always comes up configured in SITL
save_dev_id(_compass_instance[_num_compass]);
}
set_rotation(instance, ROTATION_NONE);
_num_compass++;
}