Skip to content
Snippets Groups Projects
Commit a4b8119c authored by Jason Short's avatar Jason Short
Browse files

added workaround for resetting alt.

parent 2a5a7fa2
No related branches found
No related tags found
No related merge requests found
...@@ -326,6 +326,13 @@ static void clear_new_altitude() ...@@ -326,6 +326,13 @@ static void clear_new_altitude()
static void set_new_altitude(int32_t _new_alt) static void set_new_altitude(int32_t _new_alt)
{ {
if(_new_alt == current_loc.alt){
next_WP.alt = _new_alt;
target_altitude = _new_alt;
alt_change_flag = REACHED_ALT;
return;
}
// just to be clear // just to be clear
next_WP.alt = current_loc.alt; next_WP.alt = current_loc.alt;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment