diff --git a/src/main/io/ledstrip.c b/src/main/io/ledstrip.c index 51cbfea72..b0b6b7eb8 100644 --- a/src/main/io/ledstrip.c +++ b/src/main/io/ledstrip.c @@ -586,14 +586,18 @@ static void applyLedVtxLayer(bool updateNow, timeUs_t *timer) static uint8_t pit = 255; static uint8_t showSettings = false; static uint16_t lastCheck = 0; - static bool active = false; static bool blink = false; + + if (!vtxCommonDeviceRegistered()) { + return; + } + uint8_t band = 255, channel = 255; uint16_t check = 0; if (updateNow) { // keep counter running, so it stays in sync with vtx - active = vtxCommonGetBandAndChannel(&band, &channel); + vtxCommonGetBandAndChannel(&band, &channel); vtxCommonGetPowerIndex(&power); vtxCommonGetPitMode(&pit); @@ -614,10 +618,6 @@ static void applyLedVtxLayer(bool updateNow, timeUs_t *timer) *timer += HZ_TO_US(5); // check 5 times a second } - if (!active) { // no vtx device detected - return; - } - hsvColor_t color = {0, 0, 0}; if (showSettings) { // show settings uint8_t vtxLedCount = 0;