Force a compile time failur if FromRadio or ToRadio get larger than (#4190)

a BLE packet size. We are actually very close to this threshold so
important to make sure we don't accidentally pass it.
pull/4199/head
geeksville 2024-06-28 04:51:04 -07:00 zatwierdzone przez GitHub
rodzic c95b2c2d3c
commit ce58a23f9b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -8,6 +8,14 @@
// Make sure that we never let our packets grow too large for one BLE packet
#define MAX_TO_FROM_RADIO_SIZE 512
#if meshtastic_FromRadio_size > MAX_TO_FROM_RADIO_SIZE
#error "meshtastic_FromRadio_size is too large for our BLE packets"
#endif
#if meshtastic_ToRadio_size > MAX_TO_FROM_RADIO_SIZE
#error "meshtastic_ToRadio_size is too large for our BLE packets"
#endif
#define SPECIAL_NONCE 69420
/**