We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1eefb49 commit 0440903Copy full SHA for 0440903
Blimp/inertia.cpp
@@ -20,7 +20,7 @@ void Blimp::read_inertia()
20
// current_loc.alt is alt-above-home, converted from inertial nav's alt-above-ekf-origin
21
const int32_t alt_above_origin_cm = inertial_nav.get_position_z_up_cm();
22
current_loc.set_alt_cm(alt_above_origin_cm, Location::AltFrame::ABOVE_ORIGIN);
23
- if (!ahrs.home_is_set() || !current_loc.change_alt_frame(Location::AltFrame::ABOVE_HOME)) {
+ if (current_loc.initialised() && !current_loc.change_alt_frame(Location::AltFrame::ABOVE_HOME)) {
24
// if home has not been set yet we treat alt-above-origin as alt-above-home
25
current_loc.set_alt_cm(alt_above_origin_cm, Location::AltFrame::ABOVE_HOME);
26
}
0 commit comments