Add a static_assert to verify assumption about NodeInfoLite size (#6428)

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
pull/6469/head
Jason B. Cox 2025-03-30 18:39:01 -07:00 zatwierdzone przez GitHub
rodzic e08177ba98
commit 850d21dcb9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -18,6 +18,10 @@
#define MAX_RX_TOPHONE 32
#endif
/// Verify baseline assumption of node size. If it increases, we need to reevaluate
/// the impact of its memory footprint, notably on MAX_NUM_NODES.
static_assert(sizeof(meshtastic_NodeInfoLite) <= 192, "NodeInfoLite size increased. Reconsider impact on MAX_NUM_NODES.");
/// max number of nodes allowed in the nodeDB
#ifndef MAX_NUM_NODES
#if defined(ARCH_STM32WL)