v0.0.9
This commit is contained in:
parent
f59704545b
commit
69086d8093
1 changed files with 370 additions and 134 deletions
|
|
@ -23,9 +23,9 @@ ConfigInterface::ConfigInterface(QObject *parent)
|
|||
QJsonObject top = QJsonDocument::fromJson(data).object();
|
||||
QString max, min, alert, mode, url;
|
||||
bool flipbits;
|
||||
max = top["max_threshold"].toString("100");
|
||||
min = top["min_threshold"].toString("20");
|
||||
alert = top["alert_threshold"].toString("60");
|
||||
max = top["max_threshold"].toString("110");
|
||||
min = top["min_threshold"].toString("10");
|
||||
alert = top["alert_threshold"].toString("30");
|
||||
flipbits = top["flip_bits"].toBool(true);
|
||||
mode = top["mode"].toString("http");
|
||||
url = top["url"].toString("https://unrealdragon.in/server/waterlevel");
|
||||
|
|
@ -39,9 +39,9 @@ ConfigInterface::ConfigInterface(QObject *parent)
|
|||
else {
|
||||
qDebug() << "File does not exist creating one...";
|
||||
QJsonObject top;
|
||||
top["max_threshold"] = "125";
|
||||
top["min_threshold"] = "25";
|
||||
top["alert_threshold"] = "100";
|
||||
top["max_threshold"] = "110";
|
||||
top["min_threshold"] = "10";
|
||||
top["alert_threshold"] = "30";
|
||||
top["flip_bits"] = true;
|
||||
top["mode"] = "http";
|
||||
top["url"] = "https://unrealdragon.in/server/waterlevel";
|
||||
|
|
@ -54,9 +54,9 @@ ConfigInterface::ConfigInterface(QObject *parent)
|
|||
config.write(data);
|
||||
config.flush();
|
||||
config.close();
|
||||
setMax("125");
|
||||
setMin("25");
|
||||
setAlert("100");
|
||||
setMax("110");
|
||||
setMin("10");
|
||||
setAlert("30");
|
||||
setFlipBits(true);
|
||||
setMode("http");
|
||||
setUrl("https://unrealdragon.in/server/waterlevel");
|
||||
|
|
|
|||
Loading…
Reference in a new issue