27 #ifndef COMMON_FLIGHT_PLAN_H
28 #define COMMON_FLIGHT_PLAN_H
68 #define InitStage() nav_init_stage();
70 #define Block(x) case x: set_nav_block(x);
71 #define NextBlock() nav_goto_next_block()
72 #define GotoBlock(b) nav_goto_block(b)
74 #define Stage(s) case s: set_nav_stage(s);
75 #define NextStage() { nav_goto_next_stage(); } INTENTIONAL_FALLTHRU
76 #define NextStageAndBreak() { nav_goto_next_stage(); break; }
77 #define NextStageAndBreakFrom(wp) { last_wp = wp; NextStageAndBreak(); }
79 #define Label(x) label_ ## x:
80 #define Goto(x) { goto label_ ## x; }
81 #define Return(x) nav_return(x)
84 #define NavBlockTime() (block_time)
void nav_goto_next_stage(void)
uint8_t get_nav_stage(void)
void nav_return(uint8_t reset)
void nav_init_stage(void)
needs to be implemented by fixedwing and rotorcraft seperately
uint8_t get_nav_block(void)
void nav_on_exit_block(uint8_t block_id)
uint8_t last_block
To save the current block/stage to enable return.
void nav_on_enter_block(uint8_t block_id)
Functions generated by the flight plan.
void set_nav_block(uint8_t block_id)
void nav_init_block(void)
uint8_t get_last_block(void)
void common_flight_plan_init(void)
void set_nav_stage(uint8_t stage_id)
void nav_goto_block(uint8_t block_id)
void nav_goto_next_block(void)
uint8_t get_last_stage(void)
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.