mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 06:20:35 +08:00
vmount: properly initialize last_active
If last_active is initialized at 0 it means that input via mavlink is already enabled but that's generally not the case.
This commit is contained in:
@@ -220,7 +220,7 @@ static int vmount_thread_main(int argc, char *argv[])
|
||||
ControlData *control_data = nullptr;
|
||||
g_thread_data = &thread_data;
|
||||
|
||||
int last_active = 0;
|
||||
int last_active = -1;
|
||||
|
||||
while (!thread_should_exit) {
|
||||
|
||||
@@ -395,7 +395,7 @@ static int vmount_thread_main(int argc, char *argv[])
|
||||
|
||||
thread_data.input_objs_len = 0;
|
||||
|
||||
last_active = 0;
|
||||
last_active = -1;
|
||||
|
||||
if (thread_data.output_obj) {
|
||||
delete (thread_data.output_obj);
|
||||
|
||||
Reference in New Issue
Block a user