From 0b71c522251e125cfe292009429259c4504eb7cb Mon Sep 17 00:00:00 2001 From: Philipp Oettershagen Date: Wed, 30 May 2018 19:07:36 +0200 Subject: [PATCH] Subsystem_info status flags & checks: Suppress sensor failover warnings in Hardware in the loop (HITL) --- src/modules/commander/health_flag_helper.cpp | 2 +- src/modules/sensors/voted_sensors_update.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/commander/health_flag_helper.cpp b/src/modules/commander/health_flag_helper.cpp index d021a3d8ca..0351977680 100644 --- a/src/modules/commander/health_flag_helper.cpp +++ b/src/modules/commander/health_flag_helper.cpp @@ -43,7 +43,7 @@ void set_health_flags(uint64_t subsystem_type, bool present, bool enabled, bool ok, vehicle_status_s &status) { - PX4_INFO("set_health_flags: Type %llu pres=%u enabl=%u ok=%u", subsystem_type, present, enabled, ok); + PX4_DEBUG("set_health_flags: Type %llu pres=%u enabl=%u ok=%u", subsystem_type, present, enabled, ok); if (present) { status.onboard_control_sensors_present |= (uint32_t)subsystem_type; diff --git a/src/modules/sensors/voted_sensors_update.cpp b/src/modules/sensors/voted_sensors_update.cpp index 0345e89b33..e97ce51ca1 100644 --- a/src/modules/sensors/voted_sensors_update.cpp +++ b/src/modules/sensors/voted_sensors_update.cpp @@ -895,7 +895,7 @@ void VotedSensorsUpdate::baro_poll(vehicle_air_data_s &airdata) bool VotedSensorsUpdate::check_failover(SensorData &sensor, const char *sensor_name, const uint64_t type) { - if (sensor.last_failover_count != sensor.voter.failover_count()) { + if (sensor.last_failover_count != sensor.voter.failover_count() && !_hil_enabled) { uint32_t flags = sensor.voter.failover_state(); int failover_index = sensor.voter.failover_index();