show msecs required to send a packet

1.2-legacy
geeksville 2020-02-08 10:13:04 -08:00
rodzic c6103ac5ef
commit b262492c75
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -95,10 +95,10 @@ ErrorCode MeshRadio::send(MeshPacket *p)
ErrorCode MeshRadio::sendTo(NodeNum dest, const uint8_t *buf, size_t len)
{
DEBUG_MSG("mesh sendTo %d bytes to 0x%x\n", len, dest);
assert(len <= 251); // Make sure we don't overflow the tiny max packet size
uint32_t start = millis();
// Note: we don't use sendToWait here because we don't want to wait and for the time being don't require
// reliable delivery
// return manager.sendtoWait((uint8_t *) buf, len, dest);
@ -109,6 +109,8 @@ ErrorCode MeshRadio::sendTo(NodeNum dest, const uint8_t *buf, size_t len)
if(res == ERRNO_OK)
manager.waitPacketSent();
DEBUG_MSG("mesh sendTo %d bytes to 0x%x (%u msecs)\n", len, dest, millis() - start);
return res;
}

Wyświetl plik

@ -282,7 +282,7 @@ static void screen_print(const char *text, uint8_t x, uint8_t y, uint8_t alignme
void screen_print(const char *text)
{
DEBUG_MSG("Screen: %s\n", text);
DEBUG_MSG("Screen: %s", text);
if (!disp)
return;