From 62a516c3f2dda495b215d9744c47d41ff5f0b608 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 8 Aug 2019 18:14:36 +0200 Subject: [PATCH] Add some debug info Add some debug info --- sonoff/_changelog.ino | 3 ++- sonoff/xdrv_09_timers.ino | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 9c1c9d92b..2c8210483 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,7 +1,8 @@ /*********************************************************************************************\ * 6.6.0.4 20190806 * Add support for CHIRP soil moisture sensor by Christian Baars - * Add debug compile features using defines DEBUG_TASMOTA_DRIVER and DEBUG_TASMOTA_SENSOR. See example in xdrv_09_timers.ino + * Add debug compile features using defines DEBUG_TASMOTA_CORE, DEBUG_TASMOTA_DRIVER and DEBUG_TASMOTA_SENSOR. + * See DEBUG_CORE_LOG example in sonoff.ino and DEBUG_DRIVER_LOG example in xdrv_09_timers.ino * * 6.6.0.3 20190725 * Change filename of configuration backup from using FriendlyName1 to Hostname solving diacritic issues (#2422) diff --git a/sonoff/xdrv_09_timers.ino b/sonoff/xdrv_09_timers.ino index 90a61c250..7be4dc459 100644 --- a/sonoff/xdrv_09_timers.ino +++ b/sonoff/xdrv_09_timers.ino @@ -285,11 +285,11 @@ void TimerEverySecond(void) set_time += timer_window[i]; // Add random time offset if (set_time < 0) { set_time = abs(timer_window[i]); } // After midnight and within negative window so stay today but allow positive randomness; if (set_time > 1439) { set_time = 1439; } // Stay today - +#ifdef DEBUG_TASMOTA_DRIVER if (0 == i) { - DEBUG_DRIVER_LOG(PSTR("TIM: Timer 1 XTimerTime %d, Window %d, SetTime %d"), xtimer.time, timer_window[i], set_time); + DEBUG_DRIVER_LOG(PSTR("TIM: Timer 1, Time %d, Window %d, SetTime %d"), xtimer.time, timer_window[i], set_time); } - +#endif if (time == set_time) { if (xtimer.days & days) { Settings.timer[i].arm = xtimer.repeat;