mirror of https://github.com/ArduPilot/ardupilot
AP_DAL: pack RFRN more efficiently
This commit is contained in:
parent
a08a1a4247
commit
f145afabf3
|
@ -47,10 +47,7 @@ void AP_DAL::start_frame(AP_DAL::FrameType frametype)
|
|||
|
||||
// update RFRN data
|
||||
const log_RFRN old = _RFRN;
|
||||
_RFRN.state_bitmask = 0;
|
||||
if (hal.util->get_soft_armed()) {
|
||||
_RFRN.state_bitmask |= uint8_t(StateMask::ARMED);
|
||||
}
|
||||
_RFRN.armed = hal.util->get_soft_armed();
|
||||
_home = ahrs.get_home();
|
||||
_RFRN.lat = _home.lat;
|
||||
_RFRN.lng = _home.lng;
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
bool ekf_low_time_remaining(EKFType etype, uint8_t core);
|
||||
|
||||
// returns armed state for the current frame
|
||||
bool get_armed() const { return _RFRN.state_bitmask & uint8_t(StateMask::ARMED); }
|
||||
bool get_armed() const { return _RFRN.armed; }
|
||||
|
||||
// memory available at start of current frame. While this could
|
||||
// potentially change as we go through the frame, the
|
||||
|
|
|
@ -58,14 +58,14 @@ struct log_RFRN {
|
|||
int32_t alt;
|
||||
float EAS2TAS;
|
||||
uint32_t available_memory;
|
||||
uint8_t state_bitmask;
|
||||
uint8_t rangefinder_ptr_is_null;
|
||||
uint8_t get_compass_is_null;
|
||||
uint8_t airspeed_ptr_is_null;
|
||||
uint8_t fly_forward;
|
||||
uint8_t vehicle_class;
|
||||
uint8_t ahrs_airspeed_sensor_enabled;
|
||||
uint8_t ekf_type;
|
||||
uint8_t armed:1;
|
||||
uint8_t rangefinder_ptr_is_null:1;
|
||||
uint8_t get_compass_is_null:1;
|
||||
uint8_t airspeed_ptr_is_null:1;
|
||||
uint8_t fly_forward:1;
|
||||
uint8_t ahrs_airspeed_sensor_enabled:1;
|
||||
uint8_t _end;
|
||||
};
|
||||
|
||||
|
@ -377,7 +377,7 @@ struct log_RBOH {
|
|||
{ LOG_RFRF_MSG, RLOG_SIZE(RFRF), \
|
||||
"RFRF", "BB", "FTypes,Slow", "--", "--" }, \
|
||||
{ LOG_RFRN_MSG, RLOG_SIZE(RFRN), \
|
||||
"RFRN", "IIIfIBBBBBBBB", "HLat,HLon,HAlt,E2T,AM,State,NlRF,NlCRP,NlAS,FF,VC,ASE,EKT", "DUm??????????", "GGB----------" }, \
|
||||
"RFRN", "IIIfIBBB", "HLat,HLon,HAlt,E2T,AM,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