SITL: set compass vector after loading defualts
This commit is contained in:
parent
fcab0c70a2
commit
7683b36e3b
@ -96,10 +96,6 @@ class SIM {
|
||||
public:
|
||||
|
||||
SIM() {
|
||||
// set a default compass offset
|
||||
for (uint8_t i = 0; i < HAL_COMPASS_MAX_SENSORS; i++) {
|
||||
mag_ofs[i].set(Vector3f(5, 13, -18));
|
||||
}
|
||||
AP_Param::setup_object_defaults(this, var_info);
|
||||
AP_Param::setup_object_defaults(this, var_info2);
|
||||
AP_Param::setup_object_defaults(this, var_info3);
|
||||
@ -117,6 +113,10 @@ public:
|
||||
for (uint8_t i=0; i<AIRSPEED_MAX_SENSORS; i++) {
|
||||
AP_Param::setup_object_defaults(&airspeed[i], airspeed[i].var_info);
|
||||
}
|
||||
// set compass offset
|
||||
for (uint8_t i = 0; i < HAL_COMPASS_MAX_SENSORS; i++) {
|
||||
mag_ofs[i].set(Vector3f(5, 13, -18));
|
||||
}
|
||||
if (_singleton != nullptr) {
|
||||
AP_HAL::panic("Too many SITL instances");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user