From df388e494e46bfc11c8a94b2a37d3102a674ba8d Mon Sep 17 00:00:00 2001 From: Matthew Wolter Date: Sun, 12 Apr 2026 04:14:01 -0700 Subject: [PATCH] =?UTF-8?q?G6:=20N02+R04=20=E2=80=94=20add=20CONTACTS=5FFU?= =?UTF-8?q?LL=20and=20GET=5FSTATS=20enum=20entries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why: PacketType was missing CONTACTS_FULL (0x90), emitted by MyMesh::onContactsFull(). CommandType was missing GET_STATS (56), used by get_stats_core/radio/packets but referenced only as literal b"\\x38". Adding both enum entries prepares for handler and wrapper implementations in subsequent commits. Refs: Forensics report findings N02, R04 --- src/meshcore/packets.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/meshcore/packets.py b/src/meshcore/packets.py index b5cef23..ad27fce 100644 --- a/src/meshcore/packets.py +++ b/src/meshcore/packets.py @@ -71,6 +71,7 @@ class CommandType(Enum): SET_AUTOADD_CONFIG = 58 GET_AUTOADD_CONFIG = 59 GET_ALLOWED_REPEAT_FREQ = 60 + GET_STATS = 56 # R04: CMD_GET_STATS — used by get_stats_core/radio/packets SET_PATH_HASH_MODE = 61 # Packet prefixes for the protocol @@ -120,3 +121,6 @@ class PacketType(Enum): PATH_DISCOVERY_RESPONSE = 0x8D CONTROL_DATA = 0x8E CONTACT_DELETED = 0x8F + CONTACTS_FULL = 0x90 # N02: MyMesh::onContactsFull() — 1-byte push, no payload + # Note: 0x90 == ControlType.NODE_DISCOVER_RESP in a different namespace. + # Not a literal conflict (PacketType vs ControlType), but a maintenance hazard.