mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 15:53:33 +08:00
vehicle gps pos: remove useless gps_updated array
This commit is contained in:
@@ -122,14 +122,14 @@ void VehicleGPSPosition::Run()
|
|||||||
|
|
||||||
// Check all GPS instance
|
// Check all GPS instance
|
||||||
bool any_gps_updated = false;
|
bool any_gps_updated = false;
|
||||||
bool gps_updated[GPS_MAX_RECEIVERS];
|
bool gps_updated = false;
|
||||||
|
|
||||||
for (uint8_t i = 0; i < GPS_MAX_RECEIVERS; i++) {
|
for (uint8_t i = 0; i < GPS_MAX_RECEIVERS; i++) {
|
||||||
gps_updated[i] = _sensor_gps_sub[i].updated();
|
gps_updated = _sensor_gps_sub[i].updated();
|
||||||
|
|
||||||
sensor_gps_s gps_data;
|
sensor_gps_s gps_data;
|
||||||
|
|
||||||
if (gps_updated[i]) {
|
if (gps_updated) {
|
||||||
any_gps_updated = true;
|
any_gps_updated = true;
|
||||||
|
|
||||||
_sensor_gps_sub[i].copy(&gps_data);
|
_sensor_gps_sub[i].copy(&gps_data);
|
||||||
|
|||||||
Reference in New Issue
Block a user