Skip to content

Example fail to compile #15

Description

@italocjs

Example of PCF8523 fails to compile under platformio + esp32 (arduino framework)

.pio/libdeps/esp32dev/RTC/src/DS3231.cpp: In member function 'void DS3231::setEpoch(time_t, bool)':
.pio/libdeps/esp32dev/RTC/src/DS3231.cpp:614:19: error: 'UNIX_OFFSET' was not declared in this scope
   epoch = epoch - UNIX_OFFSET;
                   ^~~~~~~~~~~
.pio/libdeps/esp32dev/RTC/src/DS3231.cpp: In member function 'time_t DS3231::getEpoch(bool)':
.pio/libdeps/esp32dev/RTC/src/DS3231.cpp:750:12: error: 'UNIX_OFFSET' was not declared in this scope
   epoch += UNIX_OFFSET;
            ^~~~~~~~~~~
.pio/libdeps/esp32dev/RTC/src/DS1307.cpp: In member function 'void DS1307::setEpoch(time_t, bool)':
.pio/libdeps/esp32dev/RTC/src/DS1307.cpp:504:19: error: 'UNIX_OFFSET' was not declared in this scope
   epoch = epoch - UNIX_OFFSET;
                   ^~~~~~~~~~~
.pio/libdeps/esp32dev/RTC/src/DS3231.cpp: In member function 'uint8_t DS3231::getHours()':
.pio/libdeps/esp32dev/RTC/src/DS3231.cpp:271:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
.pio/libdeps/esp32dev/RTC/src/DS1307.cpp: In member function 'time_t DS1307::getEpoch(bool)':
.pio/libdeps/esp32dev/RTC/src/DS1307.cpp:535:12: error: 'UNIX_OFFSET' was not declared in this scope
   epoch += UNIX_OFFSET;
            ^~~~~~~~~~~
*** [.pio\build\esp32dev\libdcf\RTC\DS3231.cpp.o] Error 1
.pio/libdeps/esp32dev/RTC/src/DS1307.cpp: In member function 'uint8_t DS1307::getHours()':
.pio/libdeps/esp32dev/RTC/src/DS1307.cpp:234:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
*** [.pio\build\esp32dev\libdcf\RTC\DS1307.cpp.o] Error 1
======================================================= [FAILED] Took 5.80 seconds =======================================================


 *  The terminal process "C:\Users\italo\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions