Skip to content

Commit

Permalink
Added sleep mode when pressing C15R3
Browse files Browse the repository at this point in the history
  • Loading branch information
gbevin committed Jan 7, 2016
1 parent 4494b8c commit c231a9f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions linnstrument-firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,12 @@ boolean switchPressAtStartup(byte switchRow) {
return false;
}

void activateSleepMode() {
controlButton = -1;
clearDisplayImmediately();
setDisplayMode(displaySleep);
}

void applyLowPowerMode() {
// change the behavior for low power mode
if (Device.operatingLowPower) {
Expand Down
4 changes: 1 addition & 3 deletions ls_handleTouches.ino
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,7 @@ boolean handleNewTouch() {
// check if we should activate sleep mode
if ((sensorRow == GLOBAL_SETTINGS_ROW && cell(0, PER_SPLIT_ROW).touched == touchedCell) ||
(sensorRow == PER_SPLIT_ROW && cell(0, GLOBAL_SETTINGS_ROW).touched == touchedCell)) {
controlButton = -1;
clearDisplayImmediately();
setDisplayMode(displaySleep);
activateSleepMode();
return false;
}

Expand Down
3 changes: 3 additions & 0 deletions ls_settings.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2020,6 +2020,9 @@ void handleGlobalSettingNewTouch() {
case 1:
changeMidiIO(0);
break;
case 2:
activateSleepMode();
break;
case 3:
if (!Device.serialMode) {
Device.operatingLowPower = !Device.operatingLowPower;
Expand Down

0 comments on commit c231a9f

Please sign in to comment.