Skip to content

Commit

Permalink
Fix error from refactoring (ExpressLRS#2865)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkendall64 authored Jul 30, 2024
1 parent f3cc5e6 commit 4d8870e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/src/rx-serial/devSerialIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,23 @@ void ICACHE_RAM_ATTR crsfRCFrameMissed()
static int start()
{
serial0.io = &serialIO;
serial0.lastConnectionState = disconnected;
#if defined(PLATFORM_ESP32)
serial1.io = &serial1IO;
serial1.lastConnectionState = disconnected;
#endif

return DURATION_IMMEDIATELY;
}

static int event(devserial_ctx_t *ctx)
{
ctx->lastConnectionState = disconnected;

if ((*(ctx->io)) != nullptr)
{
(*(ctx->io))->setFailsafe(connectionState == disconnected && ctx->lastConnectionState == connected);
if (ctx->lastConnectionState != connectionState)
{
(*(ctx->io))->setFailsafe(connectionState == disconnected);
}
}

ctx->lastConnectionState = connectionState;
Expand Down

0 comments on commit 4d8870e

Please sign in to comment.