EETimes

Embedded Systems December 2000 Vol13_13

Issue link: http://dc.ee.ubm-us.com/i/71850

Contents of this Issue

Navigation

Page 47 of 197

P.RODUC:iliS LISTING 1. continued I.!anoing gear implementatio'n' curr_state = GEA~UP; } , . 1* If the pilot changes his mind, start lowering the gear.*1 if (gear_lever == DOWN) { } , . } void GearUpO { 1* If the pilot moves the lever to DOWN, lower the gear.*1 if (gear_lever == DOWN) { }. , } void WtgForTakeoff() { 1* Once we ve been airborne for 2 sec., start raising the gear.*1 if (timer <= 0.0) { }. , 1* If we touch down again, or if the pilot changes his mind, start over.*1 if «squat_swi tch == DOWN) II (gear_lever == DOWN» { timer = 2.0; curr_state = GEAR_DOWN; 1* Don't want to require that he toggle the lever again this was just a bounce.*1 prev-gear_lever = DOWN; } , . } void LoweringGear() { www.multitech.com!adlmodule or call 1-888-273-1604. Ask for our developer's if (gear_lever = UP) { }; if «nosegear_is_down == MADE) && (leftgear_is_down (rtgear_is_down == MADE» { } , . } MADE) && " . 46 DECEMBER 2000 Embedded Systems Programming

Articles in this issue

Archives of this issue

view archives of EETimes - Embedded Systems December 2000 Vol13_13