mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Fixed the MAX7456 loop time problems introduced by #9948.
This commit is contained in:
parent
1fbd113204
commit
cfc89c98a8
18 changed files with 118 additions and 96 deletions
|
@ -428,16 +428,11 @@ void osdInit(displayPort_t *osdDisplayPortToUse, osdDisplayPortDevice_e displayP
|
|||
cmsDisplayPortRegister(osdDisplayPort);
|
||||
#endif
|
||||
|
||||
if (displayIsReady(osdDisplayPort)) {
|
||||
if (displayCheckReady(osdDisplayPort, true)) {
|
||||
osdCompleteInitialization();
|
||||
}
|
||||
}
|
||||
|
||||
bool osdInitialized(void)
|
||||
{
|
||||
return osdDisplayPort;
|
||||
}
|
||||
|
||||
static void osdResetStats(void)
|
||||
{
|
||||
stats.max_current = 0;
|
||||
|
@ -894,14 +889,6 @@ STATIC_UNIT_TESTED void osdRefresh(timeUs_t currentTimeUs)
|
|||
static bool osdStatsVisible = false;
|
||||
static timeUs_t osdStatsRefreshTimeUs;
|
||||
|
||||
if (!osdIsReady) {
|
||||
if (!displayIsReady(osdDisplayPort)) {
|
||||
displayResync(osdDisplayPort);
|
||||
return;
|
||||
}
|
||||
osdCompleteInitialization();
|
||||
}
|
||||
|
||||
// detect arm/disarm
|
||||
if (armState != ARMING_FLAG(ARMED)) {
|
||||
if (ARMING_FLAG(ARMED)) {
|
||||
|
@ -1005,6 +992,14 @@ void osdUpdate(timeUs_t currentTimeUs)
|
|||
{
|
||||
static uint32_t counter = 0;
|
||||
|
||||
if (!osdIsReady) {
|
||||
if (!displayCheckReady(osdDisplayPort, false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
osdCompleteInitialization();
|
||||
}
|
||||
|
||||
if (isBeeperOn()) {
|
||||
showVisualBeeper = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue