mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 18:30:35 +08:00
enable Wshadow
This commit is contained in:
committed by
Lorenz Meier
parent
e61f517bc6
commit
7aa6e85563
@@ -1700,7 +1700,7 @@ int commander_thread_main(int argc, char *argv[])
|
||||
!armed.armed) {
|
||||
|
||||
bool chAirspeed = false;
|
||||
bool hotplug_timeout = hrt_elapsed_time(&commander_boot_timestamp) > HOTPLUG_SENS_TIMEOUT;
|
||||
hotplug_timeout = hrt_elapsed_time(&commander_boot_timestamp) > HOTPLUG_SENS_TIMEOUT;
|
||||
|
||||
/* Perform airspeed check only if circuit breaker is not
|
||||
* engaged and it's not a rotary wing
|
||||
@@ -2874,7 +2874,7 @@ check_valid(hrt_abstime timestamp, hrt_abstime timeout, bool valid_in, bool *val
|
||||
}
|
||||
|
||||
void
|
||||
control_status_leds(vehicle_status_s *status_local, const actuator_armed_s *actuator_armed, bool changed, battery_status_s *battery)
|
||||
control_status_leds(vehicle_status_s *status_local, const actuator_armed_s *actuator_armed, bool changed, battery_status_s *battery_status)
|
||||
{
|
||||
/* driving rgbled */
|
||||
if (changed) {
|
||||
@@ -2907,9 +2907,9 @@ control_status_leds(vehicle_status_s *status_local, const actuator_armed_s *actu
|
||||
/* set color */
|
||||
if (status.failsafe) {
|
||||
rgbled_set_color(RGBLED_COLOR_PURPLE);
|
||||
} else if (battery->warning == battery_status_s::BATTERY_WARNING_LOW) {
|
||||
} else if (battery_status->warning == battery_status_s::BATTERY_WARNING_LOW) {
|
||||
rgbled_set_color(RGBLED_COLOR_AMBER);
|
||||
} else if (battery->warning == battery_status_s::BATTERY_WARNING_CRITICAL) {
|
||||
} else if (battery_status->warning == battery_status_s::BATTERY_WARNING_CRITICAL) {
|
||||
rgbled_set_color(RGBLED_COLOR_RED);
|
||||
} else {
|
||||
if (status_flags.condition_home_position_valid && status_flags.condition_global_position_valid) {
|
||||
|
||||
Reference in New Issue
Block a user