Reduce size of airtime structure for mynodeinfo

1.2-legacy
Jm Casler 2021-12-07 11:44:48 -08:00
rodzic feb1f4fb9f
commit 67766b817c
3 zmienionych plików z 13 dodań i 16 usunięć

Wyświetl plik

@ -125,9 +125,7 @@ extern const pb_msgdesc_t ChannelFile_msg;
/* Maximum encoded size of messages (where known) */
#define LegacyRadioConfig_size 4
#define LegacyRadioConfig_LegacyPreferences_size 2
#if defined(MyNodeInfo_size)
#define DeviceState_size (9497 + MyNodeInfo_size)
#endif
#define DeviceState_size 9936
#define ChannelFile_size 832
#ifdef __cplusplus

Wyświetl plik

@ -27,7 +27,7 @@ PB_BIND(MeshPacket, MeshPacket, 2)
PB_BIND(NodeInfo, NodeInfo, AUTO)
PB_BIND(MyNodeInfo, MyNodeInfo, AUTO)
PB_BIND(MyNodeInfo, MyNodeInfo, 2)
PB_BIND(LogRecord, LogRecord, AUTO)

Wyświetl plik

@ -153,9 +153,10 @@ typedef struct _MyNodeInfo {
uint32_t message_timeout_msec;
uint32_t min_app_version;
uint32_t max_channels;
pb_callback_t air_period_tx;
pb_callback_t air_period_rx;
pb_callback_t air_period_rx_all;
pb_size_t air_period_tx_count;
uint32_t air_period_tx[24];
pb_size_t air_period_rx_count;
uint32_t air_period_rx[24];
} MyNodeInfo;
typedef struct _Position {
@ -319,7 +320,7 @@ extern "C" {
#define Data_init_default {_PortNum_MIN, {0, {0}}, 0, 0, 0, 0}
#define MeshPacket_init_default {0, 0, 0, 0, {Data_init_default}, 0, 0, 0, 0, 0, _MeshPacket_Priority_MIN, 0}
#define NodeInfo_init_default {0, false, User_init_default, false, Position_init_default, 0, 0}
#define MyNodeInfo_init_default {0, 0, 0, "", "", "", _CriticalErrorCode_MIN, 0, 0, 0, 0, 0, 0, 0, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
#define MyNodeInfo_init_default {0, 0, 0, "", "", "", _CriticalErrorCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
#define LogRecord_init_default {"", 0, "", _LogRecord_Level_MIN}
#define FromRadio_init_default {0, 0, {MyNodeInfo_init_default}}
#define ToRadio_init_default {0, {MeshPacket_init_default}}
@ -331,7 +332,7 @@ extern "C" {
#define Data_init_zero {_PortNum_MIN, {0, {0}}, 0, 0, 0, 0}
#define MeshPacket_init_zero {0, 0, 0, 0, {Data_init_zero}, 0, 0, 0, 0, 0, _MeshPacket_Priority_MIN, 0}
#define NodeInfo_init_zero {0, false, User_init_zero, false, Position_init_zero, 0, 0}
#define MyNodeInfo_init_zero {0, 0, 0, "", "", "", _CriticalErrorCode_MIN, 0, 0, 0, 0, 0, 0, 0, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
#define MyNodeInfo_init_zero {0, 0, 0, "", "", "", _CriticalErrorCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
#define LogRecord_init_zero {"", 0, "", _LogRecord_Level_MIN}
#define FromRadio_init_zero {0, 0, {MyNodeInfo_init_zero}}
#define ToRadio_init_zero {0, {MeshPacket_init_zero}}
@ -364,7 +365,6 @@ extern "C" {
#define MyNodeInfo_max_channels_tag 15
#define MyNodeInfo_air_period_tx_tag 16
#define MyNodeInfo_air_period_rx_tag 17
#define MyNodeInfo_air_period_rx_all_tag 18
#define Position_latitude_i_tag 1
#define Position_longitude_i_tag 2
#define Position_altitude_tag 3
@ -542,10 +542,9 @@ X(a, STATIC, SINGULAR, FLOAT, bitrate, 11) \
X(a, STATIC, SINGULAR, UINT32, message_timeout_msec, 13) \
X(a, STATIC, SINGULAR, UINT32, min_app_version, 14) \
X(a, STATIC, SINGULAR, UINT32, max_channels, 15) \
X(a, CALLBACK, REPEATED, UINT32, air_period_tx, 16) \
X(a, CALLBACK, REPEATED, UINT32, air_period_rx, 17) \
X(a, CALLBACK, REPEATED, UINT32, air_period_rx_all, 18)
#define MyNodeInfo_CALLBACK pb_default_field_callback
X(a, STATIC, REPEATED, UINT32, air_period_tx, 16) \
X(a, STATIC, REPEATED, UINT32, air_period_rx, 17)
#define MyNodeInfo_CALLBACK NULL
#define MyNodeInfo_DEFAULT NULL
#define LogRecord_FIELDLIST(X, a) \
@ -622,9 +621,9 @@ extern const pb_msgdesc_t ToRadio_PeerInfo_msg;
#define Data_size 260
#define MeshPacket_size 309
#define NodeInfo_size 270
/* MyNodeInfo_size depends on runtime parameters */
#define MyNodeInfo_size 442
#define LogRecord_size 81
/* FromRadio_size depends on runtime parameters */
#define FromRadio_size 451
#define ToRadio_size 312
#define ToRadio_PeerInfo_size 8