mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 11:10:52 +00:00
fix packet queue full (#6292)
This commit is contained in:
@@ -89,18 +89,20 @@ bool PacketAPI::receivePacket(void)
|
|||||||
|
|
||||||
bool PacketAPI::sendPacket(void)
|
bool PacketAPI::sendPacket(void)
|
||||||
{
|
{
|
||||||
// fill dummy buffer; we don't use it, we directly send the fromRadio structure
|
if (server->available()) {
|
||||||
uint32_t len = getFromRadio(txBuf);
|
// fill dummy buffer; we don't use it, we directly send the fromRadio structure
|
||||||
if (len != 0) {
|
uint32_t len = getFromRadio(txBuf);
|
||||||
static uint32_t id = 0;
|
if (len != 0) {
|
||||||
fromRadioScratch.id = ++id;
|
static uint32_t id = 0;
|
||||||
bool result = server->sendPacket(DataPacket<meshtastic_FromRadio>(id, fromRadioScratch));
|
fromRadioScratch.id = ++id;
|
||||||
if (!result) {
|
bool result = server->sendPacket(DataPacket<meshtastic_FromRadio>(id, fromRadioScratch));
|
||||||
LOG_ERROR("send queue full");
|
if (!result) {
|
||||||
|
LOG_ERROR("send queue full");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
}
|
||||||
} else
|
return false;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PacketAPI::notifyProgrammingMode(void)
|
bool PacketAPI::notifyProgrammingMode(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user