From 9b3e4192815356dd366607e6813645541ace6ab7 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Wed, 11 Jan 2023 15:40:23 +0100 Subject: [PATCH] small fix compiler complained that it cannot find the right "abs()" implementation. So let's help 'em. --- wled00/src/dependencies/time/DS1307RTC.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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