Merge branch 'master' into gps-fixedposboot

This commit is contained in:
Ben Meadors
2023-01-23 06:35:53 -06:00
committed by GitHub
3 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -378,8 +378,10 @@ bool PhoneAPI::available()
if (xmodemPacketForPhone.control == meshtastic_XModem_Control_NUL) if (xmodemPacketForPhone.control == meshtastic_XModem_Control_NUL)
xmodemPacketForPhone = xModem.getForPhone(); xmodemPacketForPhone = xModem.getForPhone();
if (xmodemPacketForPhone.control != meshtastic_XModem_Control_NUL) if (xmodemPacketForPhone.control != meshtastic_XModem_Control_NUL) {
xModem.resetForPhone();
return true; return true;
}
if (!packetForPhone) if (!packetForPhone)
packetForPhone = service.getForPhone(); packetForPhone = service.getForPhone();
+5
View File
@@ -74,6 +74,11 @@ meshtastic_XModem XModemAdapter::getForPhone()
return xmodemStore; return xmodemStore;
} }
void XModemAdapter::resetForPhone()
{
xmodemStore = meshtastic_XModem_init_zero;
}
void XModemAdapter::handlePacket(meshtastic_XModem xmodemPacket) void XModemAdapter::handlePacket(meshtastic_XModem xmodemPacket)
{ {
switch (xmodemPacket.control) { switch (xmodemPacket.control) {
+1
View File
@@ -48,6 +48,7 @@ class XModemAdapter
void handlePacket(meshtastic_XModem xmodemPacket); void handlePacket(meshtastic_XModem xmodemPacket);
meshtastic_XModem getForPhone(); meshtastic_XModem getForPhone();
void resetForPhone();
private: private:
bool isReceiving = false; bool isReceiving = false;