From cca9f9dbce15551d95d060125554ebec6303a9bc Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Fri, 7 Dec 2012 12:58:44 +0900 Subject: [PATCH] ArduCopter: do_set_servo fix to resolve -1 being assigned to uint8_t --- ArduCopter/commands_logic.pde | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduCopter/commands_logic.pde b/ArduCopter/commands_logic.pde index 663e7d4cb5..4759eec755 100644 --- a/ArduCopter/commands_logic.pde +++ b/ArduCopter/commands_logic.pde @@ -791,7 +791,7 @@ static void do_set_home() static void do_set_servo() { - uint8_t channel_num = -1; + uint8_t channel_num = 0xff; switch( command_cond_queue.p1 ) { case 1: @@ -830,7 +830,7 @@ static void do_set_servo() } // send output to channel - if (channel_num != -1) { + if (channel_num != 0xff) { APM_RC.enable_out(channel_num); APM_RC.OutputCh(channel_num, command_cond_queue.alt); }