mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-20 20:21:22 +00:00
Merge branch 'master' into dismiss_frames
This commit is contained in:
commit
98298ce2ae
@ -192,12 +192,6 @@ bool PhoneAPI::handleToRadio(const uint8_t *buf, size_t bufLength)
|
||||
|
||||
size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
||||
{
|
||||
if (!available()) {
|
||||
return 0;
|
||||
}
|
||||
// In case we send a FromRadio packet
|
||||
memset(&fromRadioScratch, 0, sizeof(fromRadioScratch));
|
||||
|
||||
// Respond to heartbeat by sending queue status
|
||||
if (heartbeatReceived) {
|
||||
memset(&fromRadioScratch, 0, sizeof(fromRadioScratch));
|
||||
@ -209,6 +203,12 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
||||
return numbytes;
|
||||
}
|
||||
|
||||
if (!available()) {
|
||||
return 0;
|
||||
}
|
||||
// In case we send a FromRadio packet
|
||||
memset(&fromRadioScratch, 0, sizeof(fromRadioScratch));
|
||||
|
||||
// Advance states as needed
|
||||
switch (state) {
|
||||
case STATE_SEND_NOTHING:
|
||||
|
Loading…
Reference in New Issue
Block a user