Skip to content

Commit

Permalink
Merge pull request #44 from pimlie/patch-2
Browse files Browse the repository at this point in the history
feat: make TIME_TO_QUICK_SLEEP_SEC user configurable
  • Loading branch information
lanrat authored Jul 24, 2024
2 parents 99ac34c + ad6a673 commit a22dc30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config_example.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// How long to sleep between image refreshes
#define TIME_TO_SLEEP_MIN 20

// How long to sleep for quick activities like e.g. showing info and qr code (default 300 / 5 min)
//#define TIME_TO_QUICK_SLEEP_SEC 30

// Static IP information
// If unset uses DHCP, but updates may be slower, set to use a Static IP
// #define STATIC_IP "192.168.1.10"
Expand Down Expand Up @@ -61,4 +64,4 @@
#define DISPLAY_LAST_UPDATE_TIME true

// keep this to signal the program has a valid config file
#define CONFIG_H
#define CONFIG_H
2 changes: 2 additions & 0 deletions src/homeplate.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ void setupWakePins();

// Sleep
#define TIME_TO_SLEEP_SEC (TIME_TO_SLEEP_MIN * 60) // How long ESP32 will be in deep sleep (in seconds)
#ifndef TIME_TO_QUICK_SLEEP_SEC
#define TIME_TO_QUICK_SLEEP_SEC 5 * 60 // 5 minutes. How long ESP32 will be in deep sleep (in seconds) for short activities
#endif
void startSleep();
void setSleepRefresh(uint32_t sec);
void setSleepDuration(uint32_t sec);
Expand Down

0 comments on commit a22dc30

Please sign in to comment.