use shift button to change channel when held + rotate.
This commit is contained in:
@ -29,9 +29,11 @@
|
|||||||
* Press: change between selecting a parameter and editing the parameter.
|
* Press: change between selecting a parameter and editing the parameter.
|
||||||
* Hold & Rotate: change current selected output channel.
|
* Hold & Rotate: change current selected output channel.
|
||||||
*
|
*
|
||||||
* BTN1: Play/pause the internal clock.
|
* BTN1:
|
||||||
|
* Play/pause - start or stop the internal clock.
|
||||||
*
|
*
|
||||||
* BTN2: Stop all clocks.
|
* BTN2:
|
||||||
|
* Shift - hold and rotate encoder to change current selected output channel.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -68,7 +70,6 @@ void setup() {
|
|||||||
|
|
||||||
// Button press handlers.
|
// Button press handlers.
|
||||||
gravity.play_button.AttachPressHandler(HandlePlayPressed);
|
gravity.play_button.AttachPressHandler(HandlePlayPressed);
|
||||||
gravity.shift_button.AttachPressHandler(HandleShiftPressed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
@ -162,12 +163,6 @@ void HandlePlayPressed() {
|
|||||||
app.refresh_screen = true;
|
app.refresh_screen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleShiftPressed() {
|
|
||||||
gravity.clock.Stop();
|
|
||||||
ResetOutputs();
|
|
||||||
app.refresh_screen = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HandleEncoderPressed() {
|
void HandleEncoderPressed() {
|
||||||
// Check if leaving editing mode should apply a selection.
|
// Check if leaving editing mode should apply a selection.
|
||||||
if (app.editing_param) {
|
if (app.editing_param) {
|
||||||
@ -193,6 +188,12 @@ void HandleEncoderPressed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HandleRotate(int val) {
|
void HandleRotate(int val) {
|
||||||
|
// Shift & Rotate check
|
||||||
|
if (gravity.shift_button.On()) {
|
||||||
|
HandlePressedRotate(val);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!app.editing_param) {
|
if (!app.editing_param) {
|
||||||
// Navigation Mode
|
// Navigation Mode
|
||||||
const int max_param = (app.selected_channel == 0) ? PARAM_MAIN_LAST : PARAM_CH_LAST;
|
const int max_param = (app.selected_channel == 0) ? PARAM_MAIN_LAST : PARAM_CH_LAST;
|
||||||
|
|||||||
Reference in New Issue
Block a user