diff --git a/wled00/src/dependencies/time/DS1307RTC.cpp b/wled00/src/dependencies/time/DS1307RTC.cpp index 95518ad0..ff5a0a67 100644 --- a/wled00/src/dependencies/time/DS1307RTC.cpp +++ b/wled00/src/dependencies/time/DS1307RTC.cpp @@ -22,6 +22,7 @@ 5 Sep 2011 updated for Arduino 1.0 */ +#include #if defined (__AVR_ATtiny84__) || defined(__AVR_ATtiny85__) || (__AVR_ATtiny2313__) #include @@ -159,7 +160,7 @@ unsigned char DS1307RTC::isRunning() void DS1307RTC::setCalibration(char calValue) { - unsigned char calReg = abs(calValue) & 0x1f; + unsigned char calReg = abs(int(calValue)) & 0x1f; // WLEDMM fix for strange compiler warning if (calValue >= 0) calReg |= 0x20; // S bit is positive to speed up the clock Wire.beginTransmission(DS1307_CTRL_ID); #if ARDUINO >= 100