27 #ifndef COMMON_FLIGHT_PLAN_H
28 #define COMMON_FLIGHT_PLAN_H
45 #define InitStage() nav_init_stage();
47 #define Block(x) case x: nav_block=x;
48 #define NextBlock() nav_goto_block(nav_block + 1)
49 #define GotoBlock(b) nav_goto_block(b)
51 #define Stage(s) case s: nav_stage=s;
52 #define NextStage() { nav_stage++; InitStage(); } INTENTIONAL_FALLTHRU
53 #define NextStageAndBreak() { nav_stage++; InitStage(); break; }
54 #define NextStageAndBreakFrom(wp) { last_wp = wp; NextStageAndBreak(); }
56 #define Label(x) label_ ## x:
57 #define Goto(x) { goto label_ ## x; }
58 #define Return(x) { nav_block=last_block; if (x==1) {nav_stage=0;} else {nav_stage=last_stage;} block_time=0;}
61 #define NavBlockTime() (block_time)
void nav_init_stage(void)
needs to be implemented by fixedwing and rotorcraft seperately
uint8_t last_block
To save the current block/stage to enable return.
void nav_init_block(void)
void nav_goto_block(uint8_t block_id)
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.