Skip to content

Commit

Permalink
Bugfix: Inonsistent Brew & Steam switch behaviours #413 #414
Browse files Browse the repository at this point in the history
Debounce on Brew trigger. Steam trigger code duplication disabled debounce.  Debounce times to 20ms.
Added variable brewSwitchLongPress and set to 500ms.
Rename BREWSWITCHDELAY to SHOTTIMERDISPLAYDELAY, adapt comments to fit to functionality.
Rename brewSwitchLongPress -> brewTriggerLongPress and
lastButtonStateBrew -> lastStateBrewTrigger
clean brewvoid
rename a lot of variables to naming scheme
rename var steam and power trigger

more rename variables
  • Loading branch information
genkigenki authored and fiendie committed Jan 8, 2024
1 parent 751c016 commit 738328d
Show file tree
Hide file tree
Showing 10 changed files with 254 additions and 296 deletions.
2 changes: 1 addition & 1 deletion src/EmbeddedWebserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void serverSetup() {
});

server.on("/toggleBackflush", HTTP_POST, [](AsyncWebServerRequest *request) {
int backflush = flipUintValue(backflushON);
int backflush = flipUintValue(backflushOn);

setBackflush(backflush);
debugPrintf("Toggle backflush mode: %i \n", backflush);
Expand Down
6 changes: 3 additions & 3 deletions src/MQTT.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ String getMachineName(MACHINE machine) {
* MQTT is also using maxWifiReconnects!
*/
void checkMQTT() {
if (offlineMode == 1 || brewcounter > kBrewIdle) return;
if (offlineMode == 1 || brewCounter > kBrewIdle) return;

if ((millis() - lastMQTTConnectionAttempt >= wifiConnectionDelay) && (MQTTReCnctCount <= maxWifiReconnects)) {
if (!mqtt.connected()) {
Expand Down Expand Up @@ -451,7 +451,7 @@ int sendHASSIODiscoveryMsg() {
// Switch Devices
DiscoveryObject pidOn = GenerateSwitchDevice("pidON", "Use PID");
DiscoveryObject steamON = GenerateSwitchDevice("steamON", "Steam");
DiscoveryObject backflushON = GenerateSwitchDevice("backflushON", "Backflush");
DiscoveryObject backflushOn = GenerateSwitchDevice("backflushOn", "Backflush");
DiscoveryObject startUsePonM = GenerateSwitchDevice("startUsePonM", "Use PonM");


Expand All @@ -474,7 +474,7 @@ int sendHASSIODiscoveryMsg() {
brewtime,
pidOn,
steamON,
backflushON,
backflushOn,
startUsePonM
};

Expand Down
55 changes: 0 additions & 55 deletions src/brewscaleini.h

This file was deleted.

Loading

0 comments on commit 738328d

Please sign in to comment.