Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using FeatherFault with SleepyDog fails to compile #5

Open
prototypicalpro opened this issue Apr 7, 2020 · 1 comment
Open

Using FeatherFault with SleepyDog fails to compile #5

prototypicalpro opened this issue Apr 7, 2020 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@prototypicalpro
Copy link
Member

FeatherFault fails to compile when being used with the Adafruit SleepyDog Library. This issue is caused by both FeatherFault and SleepyDog defining WDT_Handler function, causing a multiple definition error during link time:

C:\Users\User\AppData\Local\Temp\arduino_build_638914\libraries\Adafruit_SleepyDog_Library\utility\WatchdogSAMD.cpp.o: In function `WDT_Handler':

C:\Users\User\Documents\Arduino\libraries\Adafruit_SleepyDog_Library\utility/WatchdogSAMD.cpp:167: multiple definition of `WDT_Handler'

C:\Users\User\AppData\Local\Temp\arduino_build_638914\libraries\FeatherFault\FeatherFault.cpp.o:C:\Users\zackp\OneDrive\Documents\Arduino\libraries\FeatherFault\src/FeatherFault.cpp:148: first defined here

collect2.exe: error: ld returned 1 exit status

FeatherFault needs to be able to respond to the watchdog timer, so removing WDT_Handler is out of the question. The only idea I have to resolve this issue is to implement the FeatherFault watchdog code in terms of the SleepyDog library--resulting in less-than-ideal reliability and another dependency.

For the moment I will mark this as wontfix, though I am open to other solutions.

@kamocat
Copy link
Contributor

kamocat commented Apr 8, 2020

We knew about this conflict when we started this library.
The best option is to use something else to time your sleep - the OPEnS RTC works very well.
Another option might be to implement sleep functionality in the FeatherFault library, to replace SleepyDog entirely. I would be open to including a loop counter to allow for a sleep period of several minutes (although the feather would still wake up every 8 seconds to service the watchdog interrupt)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants