The MOTOR_STOP logic is designed to stop the motors if:
1. MOTOR_STOP feature is enabled
2. Airmode is disabled
3. Throttle is at minimum
The problem is that this also applied during GPS Rescue and if the pilot had these conditions the motors would stop. Changed to disable MOTOR_STOP while GPS Rescue is active.
Also if stick-arming is used the MOTOR_STOP logic also will auto-disarm after 5 seconds (auto_disarm_delay). Disable this also when GPS Rescue is active.
If the current sensor wasn't configured (or the mahDrawn was still zero) then there would be a division by zero error in the remaining time OSD element calculation. Rearranged the logic to prevent.
Remove unnecessary decidegrees conversions as all temperature providers are in degrees celcius.
Fixed rounding for imperial units.
Fixed data type error in core temp warning element. Temperature is captured as int16 and can be negative but logic was using uint8 leading to an underflow for negative temperatures and a false alarm triggering.
If osd_ah_max_pit was set to zero there would be a divide by zero error in the calculations for the OSD artificial horizon. Using zero for osd_ah_max_pit is a valid use-case to disable the vertical pitch component in the artificial horizon so we can't simply change the parameter range.
Previously the g-force element was being display using integer math and truncating the float value. This lead to the g-force displaying 0.9 much of the time. Changed to use rounding to one decimal place.
Also avoid the g-force calculation unless the element or post-flight statistic are enabled. This saves unnecessary math including a sqrt().
Previously the initial arming attempt would initiate the gyro calibration but then fail because gyro calibration was underway. The user is confused as they're holding the arming sticks but nothing is happening. This always forced the user to release the arming stick command and then perform a second arming stick command to actually arm.
After the fix the initial arming will proceed as long as the pilot holds the arming stick command through the duration of the gyro calibration (1.25 seconds by default). This seems normal to the user as they're waiting for the motors to start (or at least the arming beeps) before releasing the sticks anyway.
Fix code path that could prevent the auto-disarm timer from being reset leading to a possible immediate disarm if airmode was switched off while in flight.