mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 06:23:34 +08:00
Initialize all outgoing vehicle_command_ack_s and vehicle_command_s
This will initialize those structs with zero in all fields not set and all fields set will only be change once to the final value not wasting CPU time zeroing it. This will guarantee that no non-unitialized structs will have a trash value on from_external causing it to be sent to the MAVLink channel without need it.
This commit is contained in:
committed by
Lorenz Meier
parent
7c268f4fa1
commit
925efe990d
@@ -57,6 +57,6 @@ private:
|
||||
int DefaultTest();
|
||||
int PingPongTest();
|
||||
struct esc_status_s m_esc_status;
|
||||
struct vehicle_command_s m_vc;
|
||||
struct vehicle_command_s m_vc = {};
|
||||
|
||||
};
|
||||
|
||||
@@ -54,6 +54,6 @@ private:
|
||||
int uSleepTest();
|
||||
|
||||
struct esc_status_s m_esc_status;
|
||||
struct vehicle_command_s m_vc;
|
||||
struct vehicle_command_s m_vc = {};
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user