Line data Source code
1 : #include "mode.h" 2 : #include "Plane.h" 3 : 4 6 : bool ModeFBWB::_enter() 5 : { 6 : #if HAL_SOARING_ENABLED 7 : // for ArduSoar soaring_controller 8 6 : plane.g2.soaring_controller.init_cruising(); 9 : #endif 10 : 11 6 : plane.set_target_altitude_current(); 12 : 13 6 : return true; 14 : } 15 : 16 17173 : void ModeFBWB::update() 17 : { 18 : // Thanks to Yury MonZon for the altitude limit code! 19 17173 : plane.nav_roll_cd = plane.channel_roll->norm_input() * plane.roll_limit_cd; 20 17173 : plane.update_load_factor(); 21 17173 : plane.update_fbwb_speed_height(); 22 : 23 17173 : } 24 :