mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 09:16:07 +03:00
Add OSD warning and beeper pattern if rc smoothing initialization not complete
In the OSD display the warning "RCSMOOTHING". Also play a beep pattern of 3 short, 1 long that will repeat. If rx rate filter training completes the warning/beeper will stop. The warnings are only active when armed.
This commit is contained in:
parent
ad975d3948
commit
af267864e9
6 changed files with 28 additions and 1 deletions
|
@ -63,6 +63,7 @@
|
|||
#include "fc/fc_core.h"
|
||||
#include "fc/rc_adjustments.h"
|
||||
#include "fc/rc_controls.h"
|
||||
#include "fc/fc_rc.h"
|
||||
#include "fc/runtime_config.h"
|
||||
|
||||
#include "flight/position.h"
|
||||
|
@ -825,6 +826,14 @@ static bool osdDrawSingleElement(uint8_t item)
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef USE_RC_SMOOTHING_FILTER
|
||||
// Show warning if rc smoothing hasn't initialized the filters
|
||||
if (ARMING_FLAG(ARMED) && !rcSmoothingInitializationComplete()) {
|
||||
osdFormatMessage(buff, OSD_FORMAT_MESSAGE_BUFFER_SIZE, "RCSMOOTHING");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Show warning if battery is not fresh
|
||||
if (osdWarnGetState(OSD_WARNING_BATTERY_NOT_FULL) && !ARMING_FLAG(WAS_EVER_ARMED) && (getBatteryState() == BATTERY_OK)
|
||||
&& getBatteryAverageCellVoltage() < batteryConfig()->vbatfullcellvoltage) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue