bunch of stuff idk i'm tired

This commit is contained in:
Ryzerth
2021-04-22 05:38:25 +02:00
parent 72cbf741b3
commit a4c25280b3
10 changed files with 67 additions and 32 deletions

View File

@@ -25,14 +25,17 @@ public:
_config->aquire();
if(_config->conf.contains(prefix)) {
if(!_config->conf[prefix].contains("RAW")) {
if (!_config->conf[prefix]["RAW"].contains("snapInterval")) { _config->conf[prefix]["RAW"]["snapInterval"] = snapInterval; }
if(!_config->conf[prefix].contains("CW")) {
_config->conf[prefix]["CW"]["snapInterval"] = snapInterval;
_config->conf[prefix]["CW"]["squelchLevel"] = squelchLevel;
}
json conf = _config->conf[prefix]["RAW"];
snapInterval = conf["snapInterval"];
json conf = _config->conf[prefix]["CW"];
if (conf.contains("snapInterval")) { snapInterval = conf["snapInterval"]; }
if (conf.contains("squelchLevel")) { squelchLevel = conf["squelchLevel"]; }
}
else {
_config->conf[prefix]["RAW"]["snapInterval"] = snapInterval;
_config->conf[prefix]["CW"]["snapInterval"] = snapInterval;
_config->conf[prefix]["CW"]["squelchLevel"] = squelchLevel;
}
_config->release(true);