From 4a0cc632207ef2b151b7f335f181b1d7aa045a06 Mon Sep 17 00:00:00 2001 From: Lee Bussy Date: Sat, 28 Nov 2020 12:02:33 -0600 Subject: [PATCH] Save BPM on each tick --- src/bubbles.cpp | 1 + src/main.cpp | 3 +++ src/webserver.h | 1 - 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bubbles.cpp b/src/bubbles.cpp index bfe89ac..041f10c 100644 --- a/src/bubbles.cpp +++ b/src/bubbles.cpp @@ -60,6 +60,7 @@ bool Bubbles::update() bubAvg.push(lastBpm); sampleSize = tempVesAvg.size(); + saveBpm(); return true; } diff --git a/src/main.cpp b/src/main.cpp index df6d1c5..b7f0a8b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -107,6 +107,7 @@ void loop() urlTarget.detach(); urlTarget.attach(config.urltarget.freq * 60, setDoURLTarget); config.urltarget.update = false; + saveConfig(); } if (config.brewersfriend.update) { @@ -114,6 +115,7 @@ void loop() bfTimer.detach(); bfTimer.attach(config.brewersfriend.freq * 60, setDoBFTarget); config.brewersfriend.update = false; + saveConfig(); } if (config.brewfather.update) { @@ -121,6 +123,7 @@ void loop() bfTimer.detach(); bfTimer.attach(config.brewfather.freq * 60, setDoBrewfTarget); config.brewfather.update = false; + saveConfig(); } serialLoop(); yield(); diff --git a/src/webserver.h b/src/webserver.h index 577f8ff..8fc6447 100644 --- a/src/webserver.h +++ b/src/webserver.h @@ -27,7 +27,6 @@ SOFTWARE. */ #define USE_LITTLEFS #endif -#include "resetreasons.h" #include "wifihandler.h" #include "execota.h" #include "bubbles.h"