|
|
|
|
@@ -179,6 +179,49 @@ typedef enum _InputEventChar {
|
|
|
|
|
If firmware is ever upgraded from an old 1.0ish build, the old
|
|
|
|
|
MyNodeInfo.region string will be used to set UserPreferences.region and the
|
|
|
|
|
old value will be no longer set. */
|
|
|
|
|
typedef enum _RadioConfig_UserPreferences_Serial_Baud {
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_Default = 0,
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_2400 = 1,
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_4800 = 2,
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_9600 = 3,
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_19200 = 4,
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_38400 = 5,
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_57600 = 6,
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_115200 = 7,
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_230400 = 8,
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_460800 = 9,
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_576000 = 10,
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud_BAUD_921600 = 11
|
|
|
|
|
} RadioConfig_UserPreferences_Serial_Baud;
|
|
|
|
|
|
|
|
|
|
/* Defines the device's role on the Mesh network
|
|
|
|
|
unset
|
|
|
|
|
Behave normally.
|
|
|
|
|
|
|
|
|
|
Router
|
|
|
|
|
Functions as a router */
|
|
|
|
|
typedef enum _RadioConfig_UserPreferences_Serial_Mode {
|
|
|
|
|
/* Default device role */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Mode_MODE_Default = 0,
|
|
|
|
|
/* Router device role */
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Mode_MODE_SIMPLE = 1,
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Mode_MODE_PROTO = 2
|
|
|
|
|
} RadioConfig_UserPreferences_Serial_Mode;
|
|
|
|
|
|
|
|
|
|
/* Sets the charge control current of devices with a battery charger that can be
|
|
|
|
|
configured. This is passed into the axp power management chip like on the tbeam. */
|
|
|
|
|
typedef enum _RadioConfig_UserPreferences_TelemetrySensorType {
|
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
|
RadioConfig_UserPreferences_TelemetrySensorType_None = 0,
|
|
|
|
|
@@ -243,7 +286,7 @@ typedef struct _RadioConfig_UserPreferences {
|
|
|
|
|
uint32_t serial_module_rxd;
|
|
|
|
|
uint32_t serial_module_txd;
|
|
|
|
|
uint32_t serial_module_timeout;
|
|
|
|
|
uint32_t serial_module_mode;
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Mode serial_module_mode;
|
|
|
|
|
bool ext_notification_module_enabled;
|
|
|
|
|
uint32_t ext_notification_module_output_ms;
|
|
|
|
|
uint32_t ext_notification_module_output;
|
|
|
|
|
@@ -288,7 +331,7 @@ typedef struct _RadioConfig_UserPreferences {
|
|
|
|
|
bool canned_message_module_send_bell;
|
|
|
|
|
bool mqtt_encryption_enabled;
|
|
|
|
|
float adc_multiplier_override;
|
|
|
|
|
uint32_t serial_module_baud;
|
|
|
|
|
RadioConfig_UserPreferences_Serial_Baud serial_module_baud;
|
|
|
|
|
} RadioConfig_UserPreferences;
|
|
|
|
|
|
|
|
|
|
/* The entire set of user settable/readable settings for our radio device.
|
|
|
|
|
@@ -326,6 +369,14 @@ typedef struct _RadioConfig {
|
|
|
|
|
#define _InputEventChar_MAX InputEventChar_KEY_BACK
|
|
|
|
|
#define _InputEventChar_ARRAYSIZE ((InputEventChar)(InputEventChar_KEY_BACK+1))
|
|
|
|
|
|
|
|
|
|
#define _RadioConfig_UserPreferences_Serial_Baud_MIN RadioConfig_UserPreferences_Serial_Baud_BAUD_Default
|
|
|
|
|
#define _RadioConfig_UserPreferences_Serial_Baud_MAX RadioConfig_UserPreferences_Serial_Baud_BAUD_921600
|
|
|
|
|
#define _RadioConfig_UserPreferences_Serial_Baud_ARRAYSIZE ((RadioConfig_UserPreferences_Serial_Baud)(RadioConfig_UserPreferences_Serial_Baud_BAUD_921600+1))
|
|
|
|
|
|
|
|
|
|
#define _RadioConfig_UserPreferences_Serial_Mode_MIN RadioConfig_UserPreferences_Serial_Mode_MODE_Default
|
|
|
|
|
#define _RadioConfig_UserPreferences_Serial_Mode_MAX RadioConfig_UserPreferences_Serial_Mode_MODE_PROTO
|
|
|
|
|
#define _RadioConfig_UserPreferences_Serial_Mode_ARRAYSIZE ((RadioConfig_UserPreferences_Serial_Mode)(RadioConfig_UserPreferences_Serial_Mode_MODE_PROTO+1))
|
|
|
|
|
|
|
|
|
|
#define _RadioConfig_UserPreferences_TelemetrySensorType_MIN RadioConfig_UserPreferences_TelemetrySensorType_None
|
|
|
|
|
#define _RadioConfig_UserPreferences_TelemetrySensorType_MAX RadioConfig_UserPreferences_TelemetrySensorType_SHTC3
|
|
|
|
|
#define _RadioConfig_UserPreferences_TelemetrySensorType_ARRAYSIZE ((RadioConfig_UserPreferences_TelemetrySensorType)(RadioConfig_UserPreferences_TelemetrySensorType_SHTC3+1))
|
|
|
|
|
@@ -337,9 +388,9 @@ extern "C" {
|
|
|
|
|
|
|
|
|
|
/* Initializer values for message structs */
|
|
|
|
|
#define RadioConfig_init_default {false, RadioConfig_UserPreferences_init_default}
|
|
|
|
|
#define RadioConfig_UserPreferences_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, 0, _Role_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, _GpsCoordinateFormat_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, _RadioConfig_UserPreferences_TelemetrySensorType_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, 0, 0, 0, 0, _InputEventChar_MIN, _InputEventChar_MIN, _InputEventChar_MIN, 0, 0, "", 0, 0, 0, 0}
|
|
|
|
|
#define RadioConfig_UserPreferences_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, 0, _Role_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, _GpsCoordinateFormat_MIN, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_Serial_Mode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_TelemetrySensorType_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, 0, 0, 0, 0, _InputEventChar_MIN, _InputEventChar_MIN, _InputEventChar_MIN, 0, 0, "", 0, 0, 0, _RadioConfig_UserPreferences_Serial_Baud_MIN}
|
|
|
|
|
#define RadioConfig_init_zero {false, RadioConfig_UserPreferences_init_zero}
|
|
|
|
|
#define RadioConfig_UserPreferences_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, 0, _Role_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, _GpsCoordinateFormat_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, _RadioConfig_UserPreferences_TelemetrySensorType_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, 0, 0, 0, 0, _InputEventChar_MIN, _InputEventChar_MIN, _InputEventChar_MIN, 0, 0, "", 0, 0, 0, 0}
|
|
|
|
|
#define RadioConfig_UserPreferences_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, 0, _Role_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, _GpsCoordinateFormat_MIN, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_Serial_Mode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_TelemetrySensorType_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, 0, 0, 0, 0, _InputEventChar_MIN, _InputEventChar_MIN, _InputEventChar_MIN, 0, 0, "", 0, 0, 0, _RadioConfig_UserPreferences_Serial_Baud_MIN}
|
|
|
|
|
|
|
|
|
|
/* Field tags (for use in manual encoding/decoding) */
|
|
|
|
|
#define RadioConfig_UserPreferences_position_broadcast_secs_tag 1
|
|
|
|
|
@@ -474,7 +525,7 @@ X(a, STATIC, SINGULAR, BOOL, serial_module_echo, 121) \
|
|
|
|
|
X(a, STATIC, SINGULAR, UINT32, serial_module_rxd, 122) \
|
|
|
|
|
X(a, STATIC, SINGULAR, UINT32, serial_module_txd, 123) \
|
|
|
|
|
X(a, STATIC, SINGULAR, UINT32, serial_module_timeout, 124) \
|
|
|
|
|
X(a, STATIC, SINGULAR, UINT32, serial_module_mode, 125) \
|
|
|
|
|
X(a, STATIC, SINGULAR, UENUM, serial_module_mode, 125) \
|
|
|
|
|
X(a, STATIC, SINGULAR, BOOL, ext_notification_module_enabled, 126) \
|
|
|
|
|
X(a, STATIC, SINGULAR, UINT32, ext_notification_module_output_ms, 127) \
|
|
|
|
|
X(a, STATIC, SINGULAR, UINT32, ext_notification_module_output, 128) \
|
|
|
|
|
@@ -519,7 +570,7 @@ X(a, STATIC, SINGULAR, STRING, canned_message_module_allow_input_source, 171
|
|
|
|
|
X(a, STATIC, SINGULAR, BOOL, canned_message_module_send_bell, 173) \
|
|
|
|
|
X(a, STATIC, SINGULAR, BOOL, mqtt_encryption_enabled, 174) \
|
|
|
|
|
X(a, STATIC, SINGULAR, FLOAT, adc_multiplier_override, 175) \
|
|
|
|
|
X(a, STATIC, SINGULAR, UINT32, serial_module_baud, 176)
|
|
|
|
|
X(a, STATIC, SINGULAR, UENUM, serial_module_baud, 176)
|
|
|
|
|
#define RadioConfig_UserPreferences_CALLBACK NULL
|
|
|
|
|
#define RadioConfig_UserPreferences_DEFAULT NULL
|
|
|
|
|
|
|
|
|
|
@@ -531,8 +582,8 @@ extern const pb_msgdesc_t RadioConfig_UserPreferences_msg;
|
|
|
|
|
#define RadioConfig_UserPreferences_fields &RadioConfig_UserPreferences_msg
|
|
|
|
|
|
|
|
|
|
/* Maximum encoded size of messages (where known) */
|
|
|
|
|
#define RadioConfig_UserPreferences_size 605
|
|
|
|
|
#define RadioConfig_size 608
|
|
|
|
|
#define RadioConfig_UserPreferences_size 597
|
|
|
|
|
#define RadioConfig_size 600
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
} /* extern "C" */
|
|
|
|
|
|