mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 03:23:34 +08:00
enable Wshadow
This commit is contained in:
committed by
Lorenz Meier
parent
e61f517bc6
commit
7aa6e85563
@@ -36,6 +36,8 @@ px4_add_module(
|
||||
STACK_MAIN 4096
|
||||
STACK_MAX 2450
|
||||
COMPILE_FLAGS
|
||||
-Wno-attributes
|
||||
-Wno-packed
|
||||
-Os
|
||||
SRCS
|
||||
commander.cpp
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -81,7 +81,7 @@ int device_prio_max = 0;
|
||||
int32_t device_id_primary = 0;
|
||||
static unsigned _last_mag_progress = 0;
|
||||
|
||||
calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub, int32_t (&device_ids)[max_mags]);
|
||||
calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub);
|
||||
|
||||
/// Data passed to calibration worker routine
|
||||
typedef struct {
|
||||
@@ -117,7 +117,7 @@ int do_mag_calibration(orb_advert_t *mavlink_log_pub)
|
||||
|
||||
char str[30];
|
||||
|
||||
for (size_t i=0; i<max_mags; i++) {
|
||||
for (size_t i=0; i < max_mags; i++) {
|
||||
device_ids[i] = 0; // signals no mag
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ int do_mag_calibration(orb_advert_t *mavlink_log_pub)
|
||||
|
||||
// Calibrate all mags at the same time
|
||||
if (result == OK) {
|
||||
switch (mag_calibrate_all(mavlink_log_pub, device_ids)) {
|
||||
switch (mag_calibrate_all(mavlink_log_pub)) {
|
||||
case calibrate_return_cancelled:
|
||||
// Cancel message already displayed, we're done here
|
||||
result = ERROR;
|
||||
@@ -435,7 +435,7 @@ static calibrate_return mag_calibration_worker(detect_orientation_return orienta
|
||||
return result;
|
||||
}
|
||||
|
||||
calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub, int32_t (&device_ids)[max_mags])
|
||||
calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub)
|
||||
{
|
||||
calibrate_return result = calibrate_return_ok;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user