AP_DAL: fixed handling of AHRS trim
This commit is contained in:
parent
f145afabf3
commit
0e7611cebe
@ -60,6 +60,7 @@ void AP_DAL::start_frame(AP_DAL::FrameType frametype)
|
||||
_RFRN.fly_forward = ahrs.get_fly_forward();
|
||||
_RFRN.ahrs_airspeed_sensor_enabled = AP::ahrs().airspeed_sensor_enabled();
|
||||
_RFRN.available_memory = hal.util->available_memory();
|
||||
_RFRN.ahrs_trim = ahrs.get_trim();
|
||||
WRITE_REPLAY_BLOCK_IFCHANGED(RFRN, _RFRN, old);
|
||||
|
||||
// update body conversion
|
||||
@ -80,8 +81,6 @@ void AP_DAL::start_frame(AP_DAL::FrameType frametype)
|
||||
_micros = _RFRH.time_us;
|
||||
_millis = _RFRH.time_us / 1000UL;
|
||||
|
||||
_trim = ahrs.get_trim();
|
||||
|
||||
force_write = false;
|
||||
#endif
|
||||
}
|
||||
|
@ -189,9 +189,9 @@ public:
|
||||
return _RFRN.fly_forward;
|
||||
}
|
||||
|
||||
// get trim
|
||||
// get ahrs trim
|
||||
const Vector3f &get_trim() const {
|
||||
return _trim;
|
||||
return _RFRN.ahrs_trim;
|
||||
}
|
||||
|
||||
const Matrix3f &get_rotation_vehicle_body_to_autopilot_body(void) const {
|
||||
@ -322,7 +322,6 @@ private:
|
||||
uint32_t _micros;
|
||||
uint32_t _millis;
|
||||
|
||||
Vector3f _trim;
|
||||
Matrix3f _rotation_vehicle_body_to_autopilot_body;
|
||||
Location _home;
|
||||
uint32_t _last_imu_time_us;
|
||||
|
@ -58,6 +58,7 @@ struct log_RFRN {
|
||||
int32_t alt;
|
||||
float EAS2TAS;
|
||||
uint32_t available_memory;
|
||||
Vector3f ahrs_trim;
|
||||
uint8_t vehicle_class;
|
||||
uint8_t ekf_type;
|
||||
uint8_t armed:1;
|
||||
@ -377,7 +378,7 @@ struct log_RBOH {
|
||||
{ LOG_RFRF_MSG, RLOG_SIZE(RFRF), \
|
||||
"RFRF", "BB", "FTypes,Slow", "--", "--" }, \
|
||||
{ LOG_RFRN_MSG, RLOG_SIZE(RFRN), \
|
||||
"RFRN", "IIIfIBBB", "HLat,HLon,HAlt,E2T,AM,VC,EKT,Flags", "DUm?????", "GGB-----" }, \
|
||||
"RFRN", "IIIfIfffBBB", "HLat,HLon,HAlt,E2T,AM,TX,TY,TZ,VC,EKT,Flags", "DUm????????", "GGB--------" }, \
|
||||
{ LOG_REV2_MSG, RLOG_SIZE(REV2), \
|
||||
"REV2", "B", "Event", "-", "-" }, \
|
||||
{ LOG_RSO2_MSG, RLOG_SIZE(RSO2), \
|
||||
|
Loading…
Reference in New Issue
Block a user