Skip to content

Commit

Permalink
[flight_plan] fix return primitive
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Sep 9, 2014
1 parent 3bee389 commit c181d72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sw/airborne/subsystems/navigation/common_flight_plan.h
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions sw/tools/generators/gen_flight_plan.ml
Expand Up @@ -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)
Expand Down

0 comments on commit c181d72

Please sign in to comment.