From d8573d07227d991c7b3ebb9e9c18321de8d354bd Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 11 Jun 2014 16:22:59 +0900 Subject: [PATCH] Plane: loiter num turns from low byte of p1 This limits the maximum number of turns to 255 for plane --- ArduPlane/commands_logic.pde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduPlane/commands_logic.pde b/ArduPlane/commands_logic.pde index f370c5be0d..64cb387236 100644 --- a/ArduPlane/commands_logic.pde +++ b/ArduPlane/commands_logic.pde @@ -303,7 +303,7 @@ static void do_loiter_unlimited(const AP_Mission::Mission_Command& cmd) static void do_loiter_turns(const AP_Mission::Mission_Command& cmd) { set_next_WP(cmd.content.location); - loiter.total_cd = cmd.p1 * 36000UL; + loiter.total_cd = (uint32_t)(LOWBYTE(cmd.p1)) * 36000UL; loiter_set_direction_wp(cmd); }