mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 18:22:32 +00:00
refactor: change node count variables from uint8_t to uint16_t (#8478)
This is a non-breaking change that increases the internal representation of node counts from uint8_t (max 255) to uint16_t (max 65535) to support larger mesh networks, particularly on ESP32-S3 devices with PSRAM. Changes: - NodeStatus: numOnline, numTotal, lastNumTotal (uint8_t -> uint16_t) - ProtobufModule: numOnlineNodes (uint8_t -> uint16_t) - MapApplet: loop counters changed to size_t for consistency with getNumMeshNodes() - NodeStatus: Fixed log format to use %u for unsigned integers Note: Default class methods keep uint32_t for numOnlineNodes parameter to match the public API and allow flexibility, even though internal node counts use uint16_t (max 65535 nodes). This change does NOT affect protobuf definitions, maintaining wire compatibility with existing clients and devices.
This commit is contained in:
@@ -13,7 +13,7 @@ template <class T> class ProtobufModule : protected SinglePortModule
|
||||
const pb_msgdesc_t *fields;
|
||||
|
||||
public:
|
||||
uint8_t numOnlineNodes = 0;
|
||||
uint16_t numOnlineNodes = 0;
|
||||
/** Constructor
|
||||
* name is for debugging output
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user