diff --git a/src/mesh/PhoneAPI.cpp b/src/mesh/PhoneAPI.cpp index 2d0b10c68..8177cc2b6 100644 --- a/src/mesh/PhoneAPI.cpp +++ b/src/mesh/PhoneAPI.cpp @@ -376,10 +376,9 @@ bool PhoneAPI::available() if (hasPacket) return true; - if (xmodemPacketForPhone.control != meshtastic_XModem_Control_NUL) + if (xmodemPacketForPhone.control == meshtastic_XModem_Control_NUL) xmodemPacketForPhone = xModem.getForPhone(); - hasPacket = !!packetForPhone; - if (hasPacket) + if (xmodemPacketForPhone.control != meshtastic_XModem_Control_NUL) return true; if (!packetForPhone)