forked from btclock/btclock_v3
Fix bitcoin halving countdown and add EUR fetch price
This commit is contained in:
parent
3f49b3ef4e
commit
6dfc15832b
9 changed files with 72 additions and 19 deletions
|
@ -244,7 +244,7 @@ void onApiSettingsGet(AsyncWebServerRequest *request)
|
|||
root["mcapBigChar"] = preferences.getBool("mcapBigChar", true);
|
||||
root["mdnsEnabled"] = preferences.getBool("mdnsEnabled", true);
|
||||
root["otaEnabled"] = preferences.getBool("otaEnabled", true);
|
||||
|
||||
root["fetchEurPrice"] = preferences.getBool("fetchEurPrice", false);
|
||||
root["hostname"] = getMyHostname();
|
||||
root["ip"] = WiFi.localIP();
|
||||
|
||||
|
@ -305,6 +305,19 @@ void onApiSettingsPost(AsyncWebServerRequest *request)
|
|||
|
||||
settingsChanged = processEpdColorSettings(request);
|
||||
|
||||
if (request->hasParam("fetchEurPrice", true))
|
||||
{
|
||||
AsyncWebParameter *fetchEurPrice = request->getParam("fetchEurPrice", true);
|
||||
|
||||
preferences.putBool("fetchEurPrice", fetchEurPrice->value().toInt());
|
||||
settingsChanged = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
preferences.putBool("fetchEurPrice", 0);
|
||||
settingsChanged = true;
|
||||
}
|
||||
|
||||
if (request->hasParam("ledTestOnPower", true))
|
||||
{
|
||||
AsyncWebParameter *ledTestOnPower = request->getParam("ledTestOnPower", true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue