mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-23 17:13:38 +00:00
show msecs required to send a packet
This commit is contained in:
parent
c6103ac5ef
commit
b262492c75
@ -95,10 +95,10 @@ ErrorCode MeshRadio::send(MeshPacket *p)
|
|||||||
|
|
||||||
ErrorCode MeshRadio::sendTo(NodeNum dest, const uint8_t *buf, size_t len)
|
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
|
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
|
// Note: we don't use sendToWait here because we don't want to wait and for the time being don't require
|
||||||
// reliable delivery
|
// reliable delivery
|
||||||
// return manager.sendtoWait((uint8_t *) buf, len, dest);
|
// 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)
|
if(res == ERRNO_OK)
|
||||||
manager.waitPacketSent();
|
manager.waitPacketSent();
|
||||||
|
|
||||||
|
DEBUG_MSG("mesh sendTo %d bytes to 0x%x (%u msecs)\n", len, dest, millis() - start);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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)
|
void screen_print(const char *text)
|
||||||
{
|
{
|
||||||
DEBUG_MSG("Screen: %s\n", text);
|
DEBUG_MSG("Screen: %s", text);
|
||||||
if (!disp)
|
if (!disp)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user