From 90459ed6f42649a72fd7580a2b7887ed7cdd103c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 14 Oct 2022 11:37:52 +1100 Subject: [PATCH] Plane: two more arguments to NAV_SCRIPT_TIME --- ArduPlane/Plane.h | 2 +- ArduPlane/commands_logic.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index 0810699add..9ba17953a3 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -1128,7 +1128,7 @@ private: #if AP_SCRIPTING_ENABLED // support for NAV_SCRIPT_TIME mission command bool nav_scripting_active(void) const; - bool nav_script_time(uint16_t &id, uint8_t &cmd, float &arg1, float &arg2) override; + bool nav_script_time(uint16_t &id, uint8_t &cmd, float &arg1, float &arg2, int16_t &arg3, int16_t &arg4) override; void nav_script_time_done(uint16_t id) override; // command throttle percentage and roll, pitch, yaw target diff --git a/ArduPlane/commands_logic.cpp b/ArduPlane/commands_logic.cpp index 4cbc7ab368..4d003e967f 100644 --- a/ArduPlane/commands_logic.cpp +++ b/ArduPlane/commands_logic.cpp @@ -1196,7 +1196,7 @@ bool Plane::nav_scripting_active(void) const } // support for NAV_SCRIPTING mission command -bool Plane::nav_script_time(uint16_t &id, uint8_t &cmd, float &arg1, float &arg2) +bool Plane::nav_script_time(uint16_t &id, uint8_t &cmd, float &arg1, float &arg2, int16_t &arg3, int16_t &arg4) { if (!nav_scripting_active()) { // not in NAV_SCRIPT_TIME @@ -1207,6 +1207,8 @@ bool Plane::nav_script_time(uint16_t &id, uint8_t &cmd, float &arg1, float &arg2 cmd = c.command; arg1 = c.arg1.get(); arg2 = c.arg2.get(); + arg3 = c.arg3; + arg4 = c.arg4; return true; }