mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
Plane: GCS_Plane.cpp Fix chronological sequence
to avoid inappropriate critical warning CRT:NoRCReceiver by ensuring the call of plane.failsafe.last_valid_rc_ms before calling millis()
This commit is contained in:
committed by
Andrew Tridgell
parent
5b7ec1fab4
commit
0ce6157900
@@ -114,7 +114,8 @@ void GCS_Plane::update_vehicle_sensor_status_flags(void)
|
||||
|
||||
control_sensors_present |= MAV_SYS_STATUS_SENSOR_RC_RECEIVER;
|
||||
control_sensors_enabled |= MAV_SYS_STATUS_SENSOR_RC_RECEIVER;
|
||||
if (millis() - plane.failsafe.last_valid_rc_ms < 200) {
|
||||
uint32_t last_valid = plane.failsafe.last_valid_rc_ms;
|
||||
if (millis() - last_valid < 200) {
|
||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_RC_RECEIVER;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user