better debug output

This commit is contained in:
geeksville
2020-04-30 22:53:21 -07:00
parent 5af122b39d
commit 0096f54ae9
5 changed files with 13 additions and 11 deletions

View File

@@ -61,7 +61,8 @@ static Periodic sendOwnerPeriod(sendOwnerCb);
// FIXME, move this someplace better
PacketId generatePacketId()
{
static uint32_t i;
static uint32_t i __attribute__((
section(".noinit"))); // We try to keep this in noinit so that hopefully it keeps increasing even across reboots
i++;
return (i % NUM_PACKET_ID) + 1; // return number between 1 and 255