Skip to content

Commit

Permalink
Merge pull request #124 from OPEnSLab-OSU/merge-critical-fix
Browse files Browse the repository at this point in the history
Critical fix to Hypnos
  • Loading branch information
WL-Richards authored Jan 26, 2024
2 parents 7815792 + c328115 commit c437d5b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/Hardware/Loom_Hypnos/Loom_Hypnos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,14 +406,6 @@ void Loom_Hypnos::sleep(bool waitForSerial, bool disable33, bool disable5){
hasAlarmTriggered = RTC_DS.getAlarm(1).unixtime() <= RTC_DS.now().unixtime();
}


//disable(disable33, disable5);
pre_sleep(); // Pre-sleep cleanup
disable(disable33, disable5); // Disable the power rails
shouldPowerUp = true;
LowPower.sleep(); // Go to sleep and hang
post_sleep(waitForSerial); // Wake up

if(!hasAlarmTriggered){

// Try to power down the active modules
Expand Down Expand Up @@ -446,7 +438,7 @@ void Loom_Hypnos::pre_sleep(){
attachInterrupt(digitalPinToInterrupt(pinToInterrupt.begin()->first), std::get<0>(pinToInterrupt.begin()->second), std::get<1>(pinToInterrupt.begin()->second));

// Disable the power rails
// disable(); <------------ TODO: test with this commented out
disable();
}
//////////////////////////////////////////////////////////////////////////////////////////////////////

Expand Down

0 comments on commit c437d5b

Please sign in to comment.