diff --git a/protobufs b/protobufs index 34a1b963..30584d84 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 34a1b963a56cb3805a223b4ceebd3c8a407420ea +Subproject commit 30584d849812640500a8fc1b5396eb807bbd28ff diff --git a/src/mesh/generated/config.pb.h b/src/mesh/generated/config.pb.h index 42624fbf..63b94497 100644 --- a/src/mesh/generated/config.pb.h +++ b/src/mesh/generated/config.pb.h @@ -4,7 +4,6 @@ #ifndef PB_CONFIG_PB_H_INCLUDED #define PB_CONFIG_PB_H_INCLUDED #include -#include "telemetry.pb.h" #if PB_PROTO_HEADER_VERSION != 40 #error Regenerate this file with the current version of nanopb generator. @@ -118,7 +117,6 @@ typedef struct _Config_PositionConfig { uint32_t position_broadcast_secs; bool position_broadcast_smart_disabled; bool fixed_position; - bool location_share_disabled; bool gps_disabled; uint32_t gps_update_interval; uint32_t gps_attempt_time; @@ -195,14 +193,14 @@ extern "C" { /* Initializer values for message structs */ #define Config_init_default {0, {Config_DeviceConfig_init_default}} #define Config_DeviceConfig_init_default {_Config_DeviceConfig_Role_MIN, 0, 0, 0, ""} -#define Config_PositionConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define Config_PositionConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0} #define Config_PowerConfig_init_default {_Config_PowerConfig_ChargeCurrent_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} #define Config_WiFiConfig_init_default {"", "", 0} #define Config_DisplayConfig_init_default {0, _Config_DisplayConfig_GpsCoordinateFormat_MIN, 0} #define Config_LoRaConfig_init_default {0, _Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, {0, 0, 0}} #define Config_init_zero {0, {Config_DeviceConfig_init_zero}} #define Config_DeviceConfig_init_zero {_Config_DeviceConfig_Role_MIN, 0, 0, 0, ""} -#define Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0} #define Config_PowerConfig_init_zero {_Config_PowerConfig_ChargeCurrent_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} #define Config_WiFiConfig_init_zero {"", "", 0} #define Config_DisplayConfig_init_zero {0, _Config_DisplayConfig_GpsCoordinateFormat_MIN, 0} @@ -230,7 +228,6 @@ extern "C" { #define Config_PositionConfig_position_broadcast_secs_tag 1 #define Config_PositionConfig_position_broadcast_smart_disabled_tag 2 #define Config_PositionConfig_fixed_position_tag 3 -#define Config_PositionConfig_location_share_disabled_tag 4 #define Config_PositionConfig_gps_disabled_tag 5 #define Config_PositionConfig_gps_update_interval_tag 6 #define Config_PositionConfig_gps_attempt_time_tag 7 @@ -289,7 +286,6 @@ X(a, STATIC, SINGULAR, STRING, ntp_server, 5) X(a, STATIC, SINGULAR, UINT32, position_broadcast_secs, 1) \ X(a, STATIC, SINGULAR, BOOL, position_broadcast_smart_disabled, 2) \ X(a, STATIC, SINGULAR, BOOL, fixed_position, 3) \ -X(a, STATIC, SINGULAR, BOOL, location_share_disabled, 4) \ X(a, STATIC, SINGULAR, BOOL, gps_disabled, 5) \ X(a, STATIC, SINGULAR, UINT32, gps_update_interval, 6) \ X(a, STATIC, SINGULAR, UINT32, gps_attempt_time, 7) \ @@ -364,7 +360,7 @@ extern const pb_msgdesc_t Config_LoRaConfig_msg; #define Config_DeviceConfig_size 42 #define Config_DisplayConfig_size 14 #define Config_LoRaConfig_size 67 -#define Config_PositionConfig_size 40 +#define Config_PositionConfig_size 38 #define Config_PowerConfig_size 55 #define Config_WiFiConfig_size 101 #define Config_size 103 diff --git a/src/mesh/generated/deviceonly.pb.c b/src/mesh/generated/deviceonly.pb.c index 76aba1ae..6ba6fdaf 100644 --- a/src/mesh/generated/deviceonly.pb.c +++ b/src/mesh/generated/deviceonly.pb.c @@ -15,5 +15,8 @@ PB_BIND(ChannelFile, ChannelFile, 2) PB_BIND(OEMStore, OEMStore, 2) +PB_BIND(LocalConfig, LocalConfig, 2) + + diff --git a/src/mesh/generated/deviceonly.pb.h b/src/mesh/generated/deviceonly.pb.h index 95e298fa..9844bb70 100644 --- a/src/mesh/generated/deviceonly.pb.h +++ b/src/mesh/generated/deviceonly.pb.h @@ -5,6 +5,7 @@ #define PB_DEVICEONLY_PB_H_INCLUDED #include #include "channel.pb.h" +#include "config.pb.h" #include "mesh.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -64,6 +65,27 @@ typedef struct _DeviceState { bool did_gps_reset; } DeviceState; +typedef struct _LocalConfig { + /* TODO: REPLACE */ + bool has_device; + Config_DeviceConfig device; + /* TODO: REPLACE */ + bool has_position; + Config_PositionConfig position; + /* TODO: REPLACE */ + bool has_power; + Config_PowerConfig power; + /* TODO: REPLACE */ + bool has_wifi; + Config_WiFiConfig wifi; + /* TODO: REPLACE */ + bool has_display; + Config_DisplayConfig display; + /* TODO: REPLACE */ + bool has_lora; + Config_LoRaConfig lora; +} LocalConfig; + typedef PB_BYTES_ARRAY_T(2048) OEMStore_oem_icon_bits_t; /* This can be used for customizing the firmware distribution. If populated, show a secondary bootup screen with cuatom logo and text for 2.5 seconds. */ @@ -95,9 +117,11 @@ extern "C" { #define DeviceState_init_default {false, MyNodeInfo_init_default, false, User_init_default, 0, {NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default}, 0, {MeshPacket_init_default}, false, MeshPacket_init_default, 0, 0, 0} #define ChannelFile_init_default {0, {Channel_init_default, Channel_init_default, Channel_init_default, Channel_init_default, Channel_init_default, Channel_init_default, Channel_init_default, Channel_init_default}} #define OEMStore_init_default {0, 0, {0, {0}}, _ScreenFonts_MIN, ""} +#define LocalConfig_init_default {false, Config_DeviceConfig_init_default, false, Config_PositionConfig_init_default, false, Config_PowerConfig_init_default, false, Config_WiFiConfig_init_default, false, Config_DisplayConfig_init_default, false, Config_LoRaConfig_init_default} #define DeviceState_init_zero {false, MyNodeInfo_init_zero, false, User_init_zero, 0, {NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero}, 0, {MeshPacket_init_zero}, false, MeshPacket_init_zero, 0, 0, 0} #define ChannelFile_init_zero {0, {Channel_init_zero, Channel_init_zero, Channel_init_zero, Channel_init_zero, Channel_init_zero, Channel_init_zero, Channel_init_zero, Channel_init_zero}} #define OEMStore_init_zero {0, 0, {0, {0}}, _ScreenFonts_MIN, ""} +#define LocalConfig_init_zero {false, Config_DeviceConfig_init_zero, false, Config_PositionConfig_init_zero, false, Config_PowerConfig_init_zero, false, Config_WiFiConfig_init_zero, false, Config_DisplayConfig_init_zero, false, Config_LoRaConfig_init_zero} /* Field tags (for use in manual encoding/decoding) */ #define ChannelFile_channels_tag 1 @@ -109,6 +133,12 @@ extern "C" { #define DeviceState_version_tag 8 #define DeviceState_no_save_tag 9 #define DeviceState_did_gps_reset_tag 11 +#define LocalConfig_device_tag 1 +#define LocalConfig_position_tag 2 +#define LocalConfig_power_tag 3 +#define LocalConfig_wifi_tag 4 +#define LocalConfig_display_tag 5 +#define LocalConfig_lora_tag 6 #define OEMStore_oem_icon_width_tag 1 #define OEMStore_oem_icon_height_tag 2 #define OEMStore_oem_icon_bits_tag 3 @@ -148,18 +178,37 @@ X(a, STATIC, SINGULAR, STRING, oem_text, 5) #define OEMStore_CALLBACK NULL #define OEMStore_DEFAULT NULL +#define LocalConfig_FIELDLIST(X, a) \ +X(a, STATIC, OPTIONAL, MESSAGE, device, 1) \ +X(a, STATIC, OPTIONAL, MESSAGE, position, 2) \ +X(a, STATIC, OPTIONAL, MESSAGE, power, 3) \ +X(a, STATIC, OPTIONAL, MESSAGE, wifi, 4) \ +X(a, STATIC, OPTIONAL, MESSAGE, display, 5) \ +X(a, STATIC, OPTIONAL, MESSAGE, lora, 6) +#define LocalConfig_CALLBACK NULL +#define LocalConfig_DEFAULT NULL +#define LocalConfig_device_MSGTYPE Config_DeviceConfig +#define LocalConfig_position_MSGTYPE Config_PositionConfig +#define LocalConfig_power_MSGTYPE Config_PowerConfig +#define LocalConfig_wifi_MSGTYPE Config_WiFiConfig +#define LocalConfig_display_MSGTYPE Config_DisplayConfig +#define LocalConfig_lora_MSGTYPE Config_LoRaConfig + extern const pb_msgdesc_t DeviceState_msg; extern const pb_msgdesc_t ChannelFile_msg; extern const pb_msgdesc_t OEMStore_msg; +extern const pb_msgdesc_t LocalConfig_msg; /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ #define DeviceState_fields &DeviceState_msg #define ChannelFile_fields &ChannelFile_msg #define OEMStore_fields &OEMStore_msg +#define LocalConfig_fields &LocalConfig_msg /* Maximum encoded size of messages (where known) */ #define ChannelFile_size 624 #define DeviceState_size 19184 +#define LocalConfig_size 329 #define OEMStore_size 2106 #ifdef __cplusplus