Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/ArduPlane/mode_fbwb.cpp
9531 views
1
#include "mode.h"
2
#include "Plane.h"
3
4
bool ModeFBWB::_enter()
5
{
6
#if HAL_SOARING_ENABLED
7
// for ArduSoar soaring_controller
8
plane.g2.soaring_controller.init_cruising();
9
#endif
10
11
plane.set_target_altitude_current();
12
13
return true;
14
}
15
16
void ModeFBWB::update()
17
{
18
// Thanks to Yury MonZon for the altitude limit code!
19
plane.nav_roll_cd = plane.channel_roll->norm_input() * plane.roll_limit_cd;
20
plane.update_load_factor();
21
plane.update_fbwb_speed_height();
22
23
}
24
25
26