NorthernWidget / DS3231

Communicates between Arduino-programmed AVR and Maxim DS3231 RTC: splice of Ayars' (http://hacks.ayars.org/2011/04/ds3231-real-time-clock.html) and Jeelabs/Ladyada's (https://github.com/adafruit/RTClib) libraries
The Unlicense
186 stars 81 forks source link

Compile errors with recent getAXAlarm() and checkIfAlarm() overloads #68

Closed IowaDave closed 2 years ago

IowaDave commented 2 years ago

Posting an issue here that I am working to understand and resolve.

Recent PRs added overloads to the functions for getAXAlarm() and checkIfAlarm().

I am encountering fatal errors during compilation of the library's .cpp file with these overloads. The compiler seems to fail to find the second, overloading prototype in the header file.

For example:

error: prototype for 'void DS3231::getA1Time(byte&, byte&, byte&, byte&, byte&, bool&, bool&, bool&, bool)' does not match any in class 'DS3231' void DS3231::getA1Time(byte& A1Day, byte& A1Hour, byte& A1Minute, byte& A1Second, byte& AlarmBits, bool& A1Dy, bool& A1h12, bool& A1PM, bool clearAlarmBits) { ^~ error: candidate is: void DS3231::getA1Time(byte&, byte&, byte&, byte&, byte&, bool&, bool&, bool&) void DS3231::getA1Time(byte& A1Day, byte& A1Hour, byte& A1Minute, byte& A1Second, byte& AlarmBits, bool& A1Dy, bool& A1h12, bool& A1PM) { ^~

IowaDave commented 2 years ago

Closing this issue. The errors were due to a spelling error (by me!) in the name of the header file in the #include statement of the corresponding .cpp file.

Code writers should take more naps.