From db94319cea4d474642d109c8af1770aca7af9774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lino?= Date: Wed, 12 Aug 2015 10:45:53 +0100 Subject: [PATCH] fixed clockIgnore. --- brew.ino | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/brew.ino b/brew.ino index 3b15415..c4d8622 100644 --- a/brew.ino +++ b/brew.ino @@ -899,6 +899,7 @@ void MainMenu_Back() { void xCountTheTime( int temperatureRange ) { unsigned long now = millis(); + #ifdef DEBUG debugPrintFunction("xCountTheTime"); debugPrintVar("millis()", now); @@ -907,7 +908,8 @@ void xCountTheTime( int temperatureRange ) { // Check if the machine is in the right temperature range, for the current mode, if(!(basePT100.getCurrentTemperature() > (cookTemperature - temperatureRange) && basePT100.getCurrentTemperature() < (cookTemperature + temperatureRange))) { - clockIgnore += now - clockStartTime - clockCounter; + clockIgnore += now - clockStartTime - clockIgnore; + #ifdef DEBUG debugPrintVar("clockIgnore", clockIgnore); #endif @@ -915,7 +917,8 @@ void xCountTheTime( int temperatureRange ) { // Calculate the remaining time on the clock clockCounter = cookTime - (now - clockStartTime - clockIgnore); - #ifdef DEBUG + +#ifdef DEBUG debugPrintVar("clockCounter", clockCounter); #endif } -- 2.24.1