From c181d72e3065eab9b46c89f5592d315c7d88d458 Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Tue, 9 Sep 2014 12:49:11 +0200 Subject: [PATCH] [flight_plan] fix return primitive --- sw/airborne/subsystems/navigation/common_flight_plan.h | 2 +- sw/tools/generators/gen_flight_plan.ml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sw/airborne/subsystems/navigation/common_flight_plan.h b/sw/airborne/subsystems/navigation/common_flight_plan.h index b1d6408865f..a9fe5329e56 100644 --- a/sw/airborne/subsystems/navigation/common_flight_plan.h +++ b/sw/airborne/subsystems/navigation/common_flight_plan.h @@ -54,7 +54,7 @@ void nav_goto_block(uint8_t block_id); #define Label(x) label_ ## x: #define Goto(x) { goto label_ ## x; } -#define Return() ({ nav_block=last_block; nav_stage=last_stage; block_time=0; FALSE;}) +#define Return() { nav_block=last_block; nav_stage=last_stage; block_time=0;} #define And(x, y) ((x) && (y)) #define Or(x, y) ((x) || (y)) diff --git a/sw/tools/generators/gen_flight_plan.ml b/sw/tools/generators/gen_flight_plan.ml index 10fc93c4b9d..4300d1d88da 100644 --- a/sw/tools/generators/gen_flight_plan.ml +++ b/sw/tools/generators/gen_flight_plan.ml @@ -285,8 +285,8 @@ let rec print_stage = fun index_of_waypoints x -> match String.lowercase (Xml.tag x) with "return" -> stage (); - lprintf "Return()\n"; - lprintf "break\n"; + lprintf "Return();\n"; + lprintf "break;\n" | "goto" -> stage (); lprintf "Goto(%s)\n" (name_of x)