mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-19 17:22:59 +00:00
Adds a userPrefs.h file, default blank, used for default settings for custom builds (#4325)
* add a userPrefs.h file, default blank, which can be used to easily set defaults on custom builds. * Add Splash Screen to userPrefs * Add channel 0 defaults to userPrefs.h * CONFIG_LORA_IGNORE_MQTT_DEFAULT * Unify naming for USERPREFS defines --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include "../userPrefs.h"
|
||||
#include "configuration.h"
|
||||
#if !MESHTASTIC_EXCLUDE_GPS
|
||||
#include "GPS.h"
|
||||
@@ -237,10 +238,22 @@ void NodeDB::installDefaultConfig()
|
||||
config.lora.tx_enabled =
|
||||
true; // FIXME: maybe false in the future, and setting region to enable it. (unset region forces it off)
|
||||
config.lora.override_duty_cycle = false;
|
||||
#ifdef CONFIG_LORA_REGION_USERPREFS
|
||||
config.lora.region = CONFIG_LORA_REGION_USERPREFS;
|
||||
#else
|
||||
config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET;
|
||||
#endif
|
||||
#ifdef LORACONFIG_MODEM_PRESET_USERPREFS
|
||||
config.lora.modem_preset = LORACONFIG_MODEM_PRESET_USERPREFS;
|
||||
#else
|
||||
config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST;
|
||||
#endif
|
||||
config.lora.hop_limit = HOP_RELIABLE;
|
||||
#ifdef CONFIG_LORA_IGNORE_MQTT_USERPREFS
|
||||
config.lora.ignore_mqtt = CONFIG_LORA_IGNORE_MQTT_USERPREFS;
|
||||
#else
|
||||
config.lora.ignore_mqtt = false;
|
||||
#endif
|
||||
#ifdef PIN_GPS_EN
|
||||
config.position.gps_en_gpio = PIN_GPS_EN;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user