mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-21 20:51:00 +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)
|
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
|
// Respond to heartbeat by sending queue status
|
||||||
if (heartbeatReceived) {
|
if (heartbeatReceived) {
|
||||||
memset(&fromRadioScratch, 0, sizeof(fromRadioScratch));
|
memset(&fromRadioScratch, 0, sizeof(fromRadioScratch));
|
||||||
@ -209,6 +203,12 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
|||||||
return numbytes;
|
return numbytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!available()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// In case we send a FromRadio packet
|
||||||
|
memset(&fromRadioScratch, 0, sizeof(fromRadioScratch));
|
||||||
|
|
||||||
// Advance states as needed
|
// Advance states as needed
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case STATE_SEND_NOTHING:
|
case STATE_SEND_NOTHING:
|
||||||
|
Loading…
Reference in New Issue
Block a user