Skip to content

Commit

Permalink
Bug fix - AutoStart & AutoStop Timer
Browse files Browse the repository at this point in the history
AutoStart was comparing adjusted boot up altitude to un-adjusted current altitude.  Fixed to use un-adjusted alt in both cases
Auto-Stop timer function was being called if Auto*start* setting was on, not auto*stop* setting.
  • Loading branch information
oxothnk423 committed Dec 29, 2024
1 parent d109023 commit b336127
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/vario/baro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@

// initialize all the other alt variables with current altitude to start
lastAlt = baro.alt; // used to calculate the alt change for climb rate. Assume we're stationary to start (previous Alt = Current ALt, so climb rate is zero). Note: Climb rate uses the un-adjusted (standard) altitude
baro.altInitial = baro.altAdjusted; // also save first value to use as starting point (we assume the saved altimeter setting is correct for now, so use adjusted)
baro.altInitial = baro.alt; // also save first value to use as starting point (we assume the saved altimeter setting is correct for now, so use adjusted)
baro.altAtLaunch = baro.altAdjusted; // save the starting value as launch altitude (Launch will be updated when timer starts)


Expand Down
2 changes: 1 addition & 1 deletion src/vario/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void log_update() {
uint32_t timer_time = micros();

// finally, check if we should auto-stop the timer because we've been sitting idle for long enough
if (AUTO_START && flightTimer_autoStop()) {
if (AUTO_STOP && flightTimer_autoStop()) {
flightTimer_stop();
}

Expand Down

0 comments on commit b336127

Please sign in to comment.