mirror of https://github.com/ArduPilot/ardupilot
Replay: restore exact timestamp in HIL
This commit is contained in:
parent
88a1ebaf0e
commit
295c65277d
|
@ -281,8 +281,12 @@ void LR_MsgHandler_MAG_Base::update_from_msg_compass(uint8_t compass_offset, uin
|
|||
require_field(msg, "Mag", mag);
|
||||
Vector3f mag_offset;
|
||||
require_field(msg, "Ofs", mag_offset);
|
||||
uint32_t last_update_usec;
|
||||
if (!field_value(msg, "S", last_update_usec)) {
|
||||
last_update_usec = AP_HAL::micros();
|
||||
}
|
||||
|
||||
compass.setHIL(compass_offset, mag - mag_offset);
|
||||
compass.setHIL(compass_offset, mag - mag_offset, last_update_usec);
|
||||
// compass_offset is which compass we are setting info for;
|
||||
// mag_offset is a vector indicating the compass' calibration...
|
||||
compass.set_offsets(compass_offset, mag_offset);
|
||||
|
|
Loading…
Reference in New Issue