mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-25 17:23:56 -04:00
AP_DAL: remove unnecessary variables
This commit is contained in:
parent
a0de6c620f
commit
d01534c7c6
@ -26,7 +26,6 @@ void AP_DAL_Airspeed::start_frame()
|
||||
log_RASI &RASI = _RASI[i];
|
||||
log_RASI old_RASI = RASI;
|
||||
const uint32_t last_update_ms = airspeed->last_update_ms(i);
|
||||
_last_logged_update_ms[i] = last_update_ms;
|
||||
RASI.last_update_ms = last_update_ms;
|
||||
RASI.healthy = airspeed->healthy(i);
|
||||
RASI.use = airspeed->use(i);
|
||||
|
@ -60,6 +60,4 @@ private:
|
||||
|
||||
struct log_RASH _RASH;
|
||||
struct log_RASI _RASI[AIRSPEED_MAX_SENSORS];
|
||||
|
||||
uint32_t _last_logged_update_ms[AIRSPEED_MAX_SENSORS];
|
||||
};
|
||||
|
@ -23,7 +23,6 @@ void AP_DAL_Baro::start_frame()
|
||||
log_RBRI &RBRI = _RBRI[i];
|
||||
log_RBRI old = RBRI;
|
||||
const uint32_t last_update_ms = baro.get_last_update(i);
|
||||
_last_logged_update_ms[i] = last_update_ms;
|
||||
RBRI.last_update_ms = last_update_ms;
|
||||
RBRI.healthy = baro.healthy(i);
|
||||
RBRI.altitude = baro.get_altitude(i);
|
||||
|
@ -53,7 +53,5 @@ private:
|
||||
|
||||
struct log_RBRH _RBRH;
|
||||
struct log_RBRI _RBRI[BARO_MAX_INSTANCES];
|
||||
|
||||
uint32_t _last_logged_update_ms[BARO_MAX_INSTANCES];
|
||||
};
|
||||
|
||||
|
@ -22,10 +22,11 @@ void AP_DAL_Beacon::start_frame()
|
||||
_RBCH.count = bcon->count();
|
||||
_RBCH.get_vehicle_position_ned_returncode = bcon->get_vehicle_position_ned(_RBCH.vehicle_position_ned, _RBCH.accuracy_estimate);
|
||||
|
||||
_RBCH.get_origin_returncode = bcon->get_origin(_origin);
|
||||
_RBCH.origin_lat = _origin.lat;
|
||||
_RBCH.origin_lng = _origin.lng;
|
||||
_RBCH.origin_alt = _origin.alt;
|
||||
Location loc;
|
||||
_RBCH.get_origin_returncode = bcon->get_origin(loc);
|
||||
_RBCH.origin_lat = loc.lat;
|
||||
_RBCH.origin_lng = loc.lng;
|
||||
_RBCH.origin_alt = loc.alt;
|
||||
}
|
||||
WRITE_REPLAY_BLOCK_IFCHANGD(RBCH, _RBCH, old);
|
||||
if (bcon == nullptr) {
|
||||
@ -36,7 +37,6 @@ void AP_DAL_Beacon::start_frame()
|
||||
log_RBCI &RBCI = _RBCI[i];
|
||||
const log_RBCI old_RBCI = RBCI;
|
||||
const uint32_t last_update_ms = bcon->beacon_last_update_ms(i);
|
||||
_last_logged_update_ms[i] = last_update_ms;
|
||||
RBCI.last_update_ms = last_update_ms;
|
||||
RBCI.position = bcon->beacon_position(i);
|
||||
RBCI.distance = bcon->beacon_distance(i);
|
||||
|
@ -15,7 +15,10 @@ public:
|
||||
}
|
||||
|
||||
bool get_origin(Location &loc) const {
|
||||
loc = _origin;
|
||||
loc.zero();
|
||||
loc.lat = _RBCH.origin_lat;
|
||||
loc.lng = _RBCH.origin_lng;
|
||||
loc.alt = _RBCH.origin_alt;
|
||||
return _RBCH.get_origin_returncode;
|
||||
}
|
||||
|
||||
@ -61,9 +64,6 @@ public:
|
||||
#if APM_BUILD_TYPE(APM_BUILD_Replay)
|
||||
void handle_message(const log_RBCH &msg) {
|
||||
_RBCH = msg;
|
||||
_origin.lat = _RBCH.origin_lat;
|
||||
_origin.lng = _RBCH.origin_lng;
|
||||
_origin.alt = _RBCH.origin_alt;
|
||||
}
|
||||
void handle_message(const log_RBCI &msg) {
|
||||
_RBCI[msg.instance] = msg;
|
||||
@ -74,8 +74,4 @@ private:
|
||||
|
||||
struct log_RBCH _RBCH;
|
||||
struct log_RBCI _RBCI[AP_BEACON_MAX_BEACONS];
|
||||
|
||||
uint32_t _last_logged_update_ms[AP_BEACON_MAX_BEACONS];
|
||||
|
||||
Location _origin;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user