[Feature] Adds mining pool screens #5

Merged
djuri merged 14 commits from kdmukai/btclock_v3:mining_stats_v2 into main 2024-12-20 00:11:02 +00:00
3 changed files with 5 additions and 5 deletions
Showing only changes of commit fabc6c1d28 - Show all commits

View file

@ -95,7 +95,7 @@ void setup()
setupBitaxeFetchTask();
}
if (preferences.getBool("miningPoolStatsEnabled", DEFAULT_MINING_POOL_STATS_ENABLED))
if (preferences.getBool("miningPoolStats", DEFAULT_MINING_POOL_STATS_ENABLED))
{
setupMiningPoolStatsFetchTask();
}
@ -337,7 +337,7 @@ void setupPreferences()
addScreenMapping(SCREEN_BITAXE_BESTDIFF, "BitAxe Best Difficulty");
}
if (preferences.getBool("miningPoolStatsEnabled", DEFAULT_MINING_POOL_STATS_ENABLED))
if (preferences.getBool("miningPoolStats", DEFAULT_MINING_POOL_STATS_ENABLED))
{
addScreenMapping(SCREEN_MINING_POOL_STATS_HASHRATE, "Mining Pool Hashrate");
addScreenMapping(SCREEN_MINING_POOL_STATS_EARNINGS, "Mining Pool Earnings");

View file

@ -192,7 +192,7 @@ void setCurrentScreen(uint newScreen) {
}
case SCREEN_MINING_POOL_STATS_HASHRATE:
case SCREEN_MINING_POOL_STATS_EARNINGS: {
if (preferences.getBool("miningPoolStatsEnabled", DEFAULT_MINING_POOL_STATS_ENABLED)) {
if (preferences.getBool("miningPoolStats", DEFAULT_MINING_POOL_STATS_ENABLED)) {
WorkItem miningPoolStatsUpdate = {TASK_MINING_POOL_STATS_UPDATE, 0};
xQueueSend(workQueue, &miningPoolStatsUpdate, portMAX_DELAY);
} else {

View file

@ -549,7 +549,7 @@ void onApiSettingsPatch(AsyncWebServerRequest *request, JsonVariant &json)
"mowMode", "suffixShareDot", "flOffWhenDark",
"flAlwaysOn", "flDisable", "flFlashOnUpd",
"mempoolSecure", "useNostr", "bitaxeEnabled",
"miningPoolStatsEnabled", "verticalDesc",
"miningPoolStats", "verticalDesc",
"nostrZapNotify", "stagingSource", "httpAuthEnabled"};
for (String setting : boolSettings)
@ -714,7 +714,7 @@ void onApiSettingsGet(AsyncWebServerRequest *request)
root["bitaxeEnabled"] = preferences.getBool("bitaxeEnabled", DEFAULT_BITAXE_ENABLED);
root["bitaxeHostname"] = preferences.getString("bitaxeHostname", DEFAULT_BITAXE_HOSTNAME);
root["miningPoolStatsEnabled"] = preferences.getBool("miningPoolStatsEnabled", DEFAULT_MINING_POOL_STATS_ENABLED);
root["miningPoolStats"] = preferences.getBool("miningPoolStats", DEFAULT_MINING_POOL_STATS_ENABLED);
root["miningPoolName"] = preferences.getString("miningPoolName", DEFAULT_MINING_POOL_NAME);
root["miningPoolUser"] = preferences.getString("miningPoolUser", DEFAULT_MINING_POOL_USER);