<feed xmlns='http://www.w3.org/2005/Atom'>
<title>MeshCore/src/helpers/StaticPoolPacketManager.cpp, branch smart</title>
<subtitle>A new lightweight, hybrid routing mesh protocol for packet radios</subtitle>
<id>https://git.amat.us/MeshCore/atom/src/helpers/StaticPoolPacketManager.cpp?h=smart</id>
<link rel='self' href='https://git.amat.us/MeshCore/atom/src/helpers/StaticPoolPacketManager.cpp?h=smart'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/MeshCore/'/>
<updated>2026-04-14T16:05:08Z</updated>
<entry>
<title>Fixing bugs related to 16-bit int on AVR</title>
<updated>2026-04-14T16:05:08Z</updated>
<author>
<name>David Barksdale</name>
<email>amatus@amat.us</email>
</author>
<published>2026-04-14T16:05:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/MeshCore/commit/?id=005e2bdc588cb6f9c4f5bc9f800e93b9a594add5'/>
<id>urn:sha1:005e2bdc588cb6f9c4f5bc9f800e93b9a594add5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Also fix countBefore(0xFFFFFFFF) to return _num</title>
<updated>2026-03-01T06:41:50Z</updated>
<author>
<name>Daniel Novak</name>
<email>daniel@danielnovak.sk</email>
</author>
<published>2026-03-01T06:39:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/MeshCore/commit/?id=0d87dcc989609d570ec06400b4f3f5a40fc8f74d'/>
<id>urn:sha1:0d87dcc989609d570ec06400b4f3f5a40fc8f74d</id>
<content type='text'>
The signed comparison in countBefore breaks for the max uint32_t value.
Even though callers now use getOutboundTotal(), the function itself
should be correct for all inputs.
</content>
</entry>
<entry>
<title>Replace 0xFFFFFFFF sentinel with explicit getOutboundTotal()</title>
<updated>2026-02-28T16:19:04Z</updated>
<author>
<name>Daniel Novak</name>
<email>daniel@danielnovak.sk</email>
</author>
<published>2026-02-28T16:19:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/MeshCore/commit/?id=c7568a8db07194beee71072120ffc1f27389d3e5'/>
<id>urn:sha1:c7568a8db07194beee71072120ffc1f27389d3e5</id>
<content type='text'>
Instead of overloading getOutboundCount() with a magic sentinel value,
add a dedicated getOutboundTotal() method to the PacketManager interface
that returns the total queue size without time filtering.

This eliminates the fragile convention that caused the regression and
makes the two operations — time-filtered count vs total count —
explicitly separate in the API.
</content>
</entry>
<entry>
<title>Fix countBefore sentinel regression from millis wraparound fix</title>
<updated>2026-02-28T15:22:58Z</updated>
<author>
<name>Daniel Novak</name>
<email>daniel@danielnovak.sk</email>
</author>
<published>2026-02-28T15:22:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/MeshCore/commit/?id=c436bd42c5961c02eb439fe4ce2584b27f832eff'/>
<id>urn:sha1:c436bd42c5961c02eb439fe4ce2584b27f832eff</id>
<content type='text'>
PR #1795 changed PacketQueue::countBefore() to use signed 2's complement
arithmetic for millis wraparound safety. However, this broke the
0xFFFFFFFF sentinel pattern used by callers to mean "count all packets
regardless of schedule".

With the signed comparison, countBefore(0xFFFFFFFF) always returns 0,
causing hasPendingWork() to report false and repeaters to sleep with
packets still queued. Stats reporting also shows queue_len as 0.

Add an early-return for the sentinel value before the loop, and document
the sentinel convention on the virtual interface and implementation.
</content>
</entry>
<entry>
<title>Fix millis() wraparound in PacketQueue time comparisons</title>
<updated>2026-02-22T17:01:55Z</updated>
<author>
<name>Daniel Novak</name>
<email>daniel@danielnovak.sk</email>
</author>
<published>2026-02-22T17:01:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/MeshCore/commit/?id=011edd3c999ca6c528016d67f3e68ac46830131c'/>
<id>urn:sha1:011edd3c999ca6c528016d67f3e68ac46830131c</id>
<content type='text'>
PacketQueue::countBefore() and PacketQueue::get() use unsigned
comparison (_schedule_table[j] &gt; now) to check if a packet is
scheduled for the future. This breaks when millis() wraps around
after ~49.7 days: packets scheduled just before the wrap appear
to be in the far future and get stuck in the queue.

Use signed subtraction instead, matching the approach already used
by Dispatcher::millisHasNowPassed(). This correctly handles the
wraparound for time differences up to ~24.8 days in either
direction, well beyond the maximum queue delay of 32 seconds.
</content>
</entry>
<entry>
<title>Fix packet pool leak when rx queue is full</title>
<updated>2026-02-17T22:54:33Z</updated>
<author>
<name>Wessel Nieboer</name>
<email>wessel@weebl.me</email>
</author>
<published>2026-02-17T22:54:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/MeshCore/commit/?id=ffc9815e9a26a01245f6032fa341d0ba88d8b41d'/>
<id>urn:sha1:ffc9815e9a26a01245f6032fa341d0ba88d8b41d</id>
<content type='text'>
PacketQueue::add() silently dropped packets when the queue was at
capacity. The packet pointer was lost — never enqueued, never returned
to the unused pool. Each occurrence permanently shrank the 32-packet
pool until allocNew() returned NULL and the node went deaf. Return bool
from add() and free the packet back to the pool on failure.
</content>
</entry>
<entry>
<title>* Dispatcher::checkSend() bug: getOutboundCount() should only count non-future packets</title>
<updated>2025-05-14T06:50:11Z</updated>
<author>
<name>Scott Powell</name>
<email>sqij@protonmail.com</email>
</author>
<published>2025-05-14T06:50:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/MeshCore/commit/?id=e291b57a078a76187c24d2e43e2d8b6d8e942b30'/>
<id>urn:sha1:e291b57a078a76187c24d2e43e2d8b6d8e942b30</id>
<content type='text'>
</content>
</entry>
<entry>
<title>* new packet score function</title>
<updated>2025-02-04T04:00:28Z</updated>
<author>
<name>Scott Powell</name>
<email>sqij@protonmail.com</email>
</author>
<published>2025-02-04T04:00:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/MeshCore/commit/?id=a93412216a4213a6a21e0529efb402c87cd52278'/>
<id>urn:sha1:a93412216a4213a6a21e0529efb402c87cd52278</id>
<content type='text'>
</content>
</entry>
<entry>
<title>* new RX delays based on SNR</title>
<updated>2025-02-04T01:35:53Z</updated>
<author>
<name>Scott Powell</name>
<email>sqij@protonmail.com</email>
</author>
<published>2025-02-04T01:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/MeshCore/commit/?id=7da0a5f7ecefbfc387e63190f34c0ffe2108cb83'/>
<id>urn:sha1:7da0a5f7ecefbfc387e63190f34c0ffe2108cb83</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Initial commit</title>
<updated>2025-01-13T03:07:48Z</updated>
<author>
<name>Scott Powell</name>
<email>sqij@protonmail.com</email>
</author>
<published>2025-01-13T03:07:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/MeshCore/commit/?id=6c7efdd0f6cc741c36a8d7382cfe42dfdd188bdc'/>
<id>urn:sha1:6c7efdd0f6cc741c36a8d7382cfe42dfdd188bdc</id>
<content type='text'>
</content>
</entry>
</feed>
