added precision option to config

This commit is contained in:
dj1an 2021-06-24 14:30:19 +02:00
parent 8522c65962
commit c3403ea7c0
2 changed files with 3 additions and 1 deletions

View file

@ -43,7 +43,7 @@ Configuration ConfigurationManagement::readConfiguration()
if(data.containsKey("callsign"))
conf.callsign = data["callsign"].as<String>();
conf.debug = data["debug"] | false;
conf.enhance_precision = data["enhance_precision"] | false;
if(data.containsKey("beacon") && data["beacon"].containsKey("message"))
conf.beacon.message = data["beacon"]["message"].as<String>();
conf.beacon.timeout = data["beacon"]["timeout"] | 1;
@ -84,6 +84,7 @@ void ConfigurationManagement::writeConfiguration(Configuration conf)
data["callsign"] = conf.callsign;
data["debug"] = conf.debug;
data["enhance_precision"] = conf.enhance_precision;
data["beacon"]["message"] = conf.beacon.message;
data["beacon"]["timeout"] = conf.beacon.timeout;
data["beacon"]["symbol"] = conf.beacon.symbol;

View file

@ -51,6 +51,7 @@ public:
String callsign;
bool debug;
bool enhance_precision;
Beacon beacon;
Smart_Beacon smart_beacon;
LoRa lora;