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

kurt/update-off-menu-colors #92

Merged
merged 4 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Helios/Helios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,15 +337,15 @@ void Helios::handle_state_modes()
switch (magnitude) {
default:
case 0: Led::clear(); break;
case 5: Led::set(0x3c, 0, 0); break; // Exit Lock
case TIME_TILL_GLOW_LOCK_UNLOCK: Led::set(0x3c, 0, 0); break; // Exit
}
} else {
switch (magnitude) {
default:
case 0: Led::clear(); break; // nothing
case 1: Led::set(0x3c, 0, 0); break; // Enter Glow Lock
case 2: Led::set(0, 0, 0x3c); break; // Master Reset
case 3: Led::set(0, 0x3c, 0); break; // Global Brightness
case 2: Led::set(0, 0x3c, 0); break; // Global Brightness
case 3: Led::set(0, 0, 0x3c); break; // Master Reset
}
}
}
Expand All @@ -368,7 +368,7 @@ void Helios::handle_off_menu(uint8_t mag, bool past)
// if still locked then handle the unlocking menu which is just if mag == 5
if (has_flag(FLAG_LOCKED)) {
switch (mag) {
case 5: // red lock
case TIME_TILL_GLOW_LOCK_UNLOCK: // red lock
cur_state = STATE_TOGGLE_LOCK;
break;
default:
Expand All @@ -386,12 +386,12 @@ void Helios::handle_off_menu(uint8_t mag, bool past)
cur_state = STATE_TOGGLE_LOCK;
Led::clear();
return; // RETURN HERE
case 2: // blue reset defaults
cur_state = STATE_SET_DEFAULTS;
return; // RETURN HERE
case 3: // green global brightness
case 2: // green global brightness
cur_state = STATE_SET_GLOBAL_BRIGHTNESS;
return; // RETURN HERE
case 3: // blue reset defaults
cur_state = STATE_SET_DEFAULTS;
return; //RETURN HERE
default:
// just go back to sleep in hold-past off menu
enter_sleep();
Expand Down Expand Up @@ -432,7 +432,7 @@ void Helios::handle_on_menu(uint8_t mag, bool past)
case 4: // shift mode down
cur_state = STATE_SHIFT_MODE;
break;
case 5: // ???
case 5: // randomizer
cur_state = STATE_RANDOMIZE;
break;
default: // hold past
Expand Down Expand Up @@ -720,9 +720,9 @@ void Helios::handle_state_set_defaults()
}
// show low white for exit or red for select
if (menu_selection) {
Led::strobe(20, 10, RGB_RED_BRI_LOW, RGB_OFF);
Led::strobe(80, 20, RGB_RED_BRI_LOW, RGB_OFF);
} else {
Led::strobe(60, 20, RGB_WHITE_BRI_LOWEST, RGB_OFF);
Led::strobe(20, 10, RGB_WHITE_BRI_LOWEST, RGB_OFF);
}
// when the user long clicks a selection
if (Button::onLongClick()) {
Expand Down
7 changes: 6 additions & 1 deletion Helios/HeliosConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
// How long the led flashes when selecting something
#define TIME_TILL_LONG_CLICK_FLASH 1000

// Unlock Glow Lock Duration
//
// How long the hold the button to unlock chip
#define TIME_TILL_GLOW_LOCK_UNLOCK 2

// Long Click Threshold
//
// The maximum length a long click can be
Expand Down Expand Up @@ -94,7 +99,7 @@
// ============================================================================
// Storage Constants
//
// These are various storage sizes of data and some math to help
// These are various storage sizes of data and some math to help
// calculate sizes or space requirements, note these will produce
// compiler errors unless you include the respective headers

Expand Down
Loading
Loading