diff --git a/src/main.cpp b/src/main.cpp index ba99c88aa..1bd94221e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -317,7 +317,9 @@ void setup() #endif #ifdef DEBUG_PORT - consoleInit(); // Set serial baud rate and init our mesh console + if (radioConfig.preferences.serial_disabled) { + consoleInit(); // Set serial baud rate and init our mesh console + } #endif initDeepSleep(); diff --git a/src/mesh/generated/admin.pb.h b/src/mesh/generated/admin.pb.h index a2e753546..73dbc00af 100644 --- a/src/mesh/generated/admin.pb.h +++ b/src/mesh/generated/admin.pb.h @@ -79,7 +79,7 @@ extern const pb_msgdesc_t AdminMessage_msg; #define AdminMessage_fields &AdminMessage_msg /* Maximum encoded size of messages (where known) */ -#define AdminMessage_size 351 +#define AdminMessage_size 354 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/radioconfig.pb.h b/src/mesh/generated/radioconfig.pb.h index 12224b99b..3dfbbdda0 100644 --- a/src/mesh/generated/radioconfig.pb.h +++ b/src/mesh/generated/radioconfig.pb.h @@ -85,6 +85,7 @@ typedef struct _RadioConfig_UserPreferences { bool is_router; bool is_low_power; bool fixed_position; + bool serial_disabled; bool factory_reset; bool debug_log_enabled; pb_size_t ignore_incoming_count; @@ -150,9 +151,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, _LocationSharing_MIN, _GpsOperation_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, _RadioConfig_UserPreferences_EnvironmentalMeasurementSensorType_MIN, 0, 0} +#define RadioConfig_UserPreferences_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, _LocationSharing_MIN, _GpsOperation_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, _RadioConfig_UserPreferences_EnvironmentalMeasurementSensorType_MIN, 0, 0} #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, _LocationSharing_MIN, _GpsOperation_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, _RadioConfig_UserPreferences_EnvironmentalMeasurementSensorType_MIN, 0, 0} +#define RadioConfig_UserPreferences_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, _LocationSharing_MIN, _GpsOperation_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, _RadioConfig_UserPreferences_EnvironmentalMeasurementSensorType_MIN, 0, 0} /* Field tags (for use in manual encoding/decoding) */ #define RadioConfig_UserPreferences_position_broadcast_secs_tag 1 @@ -177,6 +178,7 @@ extern "C" { #define RadioConfig_UserPreferences_is_router_tag 37 #define RadioConfig_UserPreferences_is_low_power_tag 38 #define RadioConfig_UserPreferences_fixed_position_tag 39 +#define RadioConfig_UserPreferences_serial_disabled_tag 40 #define RadioConfig_UserPreferences_factory_reset_tag 100 #define RadioConfig_UserPreferences_debug_log_enabled_tag 101 #define RadioConfig_UserPreferences_ignore_incoming_tag 103 @@ -237,6 +239,7 @@ X(a, STATIC, SINGULAR, UINT32, gps_attempt_time, 36) \ X(a, STATIC, SINGULAR, BOOL, is_router, 37) \ X(a, STATIC, SINGULAR, BOOL, is_low_power, 38) \ X(a, STATIC, SINGULAR, BOOL, fixed_position, 39) \ +X(a, STATIC, SINGULAR, BOOL, serial_disabled, 40) \ X(a, STATIC, SINGULAR, BOOL, factory_reset, 100) \ X(a, STATIC, SINGULAR, BOOL, debug_log_enabled, 101) \ X(a, STATIC, REPEATED, UINT32, ignore_incoming, 103) \ @@ -276,8 +279,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_size 348 -#define RadioConfig_UserPreferences_size 345 +#define RadioConfig_size 351 +#define RadioConfig_UserPreferences_size 348 #ifdef __cplusplus } /* extern "C" */