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

SleepyDog is included but not used, causing compilation errors #95

Closed
prototypicalpro opened this issue Apr 7, 2020 · 3 comments
Closed
Labels
bug Something isn't working
Milestone

Comments

@prototypicalpro
Copy link
Member

prototypicalpro commented Apr 7, 2020

Describe the bug
The Adafruit SleepyDog library is included in Loom, but never used:

#include "Sleep_Manager.h"
#include "RTC/RTC.h"
#include <Adafruit_SleepyDog.h>
#include <LowPower.h>
bool Loom_Sleep_Manager::sleep()
{
pre_sleep();
LowPower.standby();
// This is where programs waits until waking
post_sleep();
}
I suspect SleepyDog was previously used but was removed during feature development.

As SleepyDog conflicts with FeatherFault (see OPEnSLab-OSU/FeatherFault#5) which is needed by several projects in the lab, it would be nice if this dependency could be removed.

@prototypicalpro prototypicalpro added the bug Something isn't working label Apr 7, 2020
@prototypicalpro
Copy link
Member Author

prototypicalpro commented Apr 7, 2020

On second pass, I did find a place where SleepyDog is used:

Loom/src/Manager.cpp

Lines 361 to 371 in 49d1a5d

void LoomManager::nap(const uint16_t ms) const
{
Serial.end();
USBDevice.detach();
// Sleep, with max time of 16000 milliseconds
uint16_t sleepMS = Watchdog.sleep( (ms <= 16000) ? ms : 16000);
USBDevice.attach();
Serial.begin(SERIAL_BAUD);
}
Do projects in the lab use Loom::nap?

@MrKangs MrKangs added this to the Spring Term milestone Apr 8, 2020
@BGoto808
Copy link
Contributor

Looking at the Github wikis for all of the projects, the only project I see that uses the Loom::nap function is Smartrock. However, when looking at their Github, they have a more recent code that they have for field testing that does not use the Loom::nap function. I would have to check in with them to see whether they are using the code that uses the Loom::nap function or the one without it.

https://github.com/OPEnSLab-OSU/SmartRock/blob/master/SmartRock2.5/SmartRock2.5.ino

@BGoto808 BGoto808 removed their assignment Jun 5, 2020
@akerr501
Copy link
Contributor

SleepyDog has been removed from Loom with version 2.4.0. The nap function in Loom Manager has been moved outside to an example sketch that requires Adafruit SleepyDog to be downloaded outside of Loom, resolving any conflicts with FeatherFault

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

No branches or pull requests

4 participants