Skip to content

Commit

Permalink
Merge pull request #79 from kevdliu/display_sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
ballaswag authored Apr 16, 2024
2 parents d576f4f + 724a9f7 commit fa6a286
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/sysinfo_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ std::vector<std::string> SysInfoPanel::log_levels = {

static std::map<int32_t, uint32_t> sleepsec_to_dd_idx = {
{-1, 0}, // never
{600, 1}, // 10 min
{1800, 2}, // 30 min
{3600, 3}, // 1 hour
{18000, 4} // 5 hour
{300, 1}, // 5 min
{600, 2}, // 10 min
{1800, 3}, // 30 min
{3600, 4}, // 1 hour
{18000, 5} // 5 hour
};

static std::map<std::string, uint32_t> sleep_label_to_sec = {
{"Never", -1}, // never
{"5 Minutes", 300}, // 5 min
{"10 Minutes", 600}, // 10 min
{"30 Minutes", 1800}, // 30 min
{"1 Hour", 3600}, // 1 hour
Expand Down Expand Up @@ -86,6 +88,7 @@ SysInfoPanel::SysInfoPanel()
lv_obj_align(display_sleep_dd, LV_ALIGN_RIGHT_MID, 0, 0);
lv_dropdown_set_options(display_sleep_dd,
"Never\n"
"5 Minutes\n"
"10 Minutes\n"
"30 Minutes\n"
"1 Hour\n"
Expand Down

0 comments on commit fa6a286

Please sign in to comment.