Add some debug info

Add some debug info
This commit is contained in:
Theo Arends 2019-08-08 18:14:36 +02:00
parent a1a6590715
commit 62a516c3f2
2 changed files with 5 additions and 4 deletions

View File

@ -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)

View File

@ -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;