mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 15:57:35 +08:00
Commander: move esc_status as local variable.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
committed by
Beat Küng
parent
5fe7992af5
commit
2eb9fb9ed6
@@ -150,7 +150,6 @@ static uint8_t _last_sp_man_arm_switch = 0;
|
||||
|
||||
static struct vtol_vehicle_status_s vtol_status = {};
|
||||
static struct cpuload_s cpuload = {};
|
||||
static struct esc_status_s esc_status = {};
|
||||
|
||||
static bool last_overload = false;
|
||||
|
||||
@@ -1624,8 +1623,10 @@ Commander::run()
|
||||
|
||||
if (esc_status_sub.updated()) {
|
||||
/* ESCs status changed */
|
||||
esc_status_s esc_status = {};
|
||||
|
||||
esc_status_sub.copy(&esc_status);
|
||||
esc_status_check();
|
||||
esc_status_check(esc_status);
|
||||
}
|
||||
|
||||
estimator_check(&status_changed);
|
||||
@@ -4366,7 +4367,7 @@ Commander::offboard_control_update(bool &status_changed)
|
||||
|
||||
}
|
||||
|
||||
void Commander::esc_status_check()
|
||||
void Commander::esc_status_check(const esc_status_s &esc_status)
|
||||
{
|
||||
char esc_fail_msg[50];
|
||||
esc_fail_msg[0] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user