From 8695984f60b6619685320573b0acf780c53d9d10 Mon Sep 17 00:00:00 2001 From: unicod Date: Sat, 29 Oct 2022 15:05:01 +0200 Subject: [PATCH] Vol fader handling works --- XAirMixerControl.ino | 8 ++++---- ui.cpp | 4 ++++ ui.h | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/XAirMixerControl.ino b/XAirMixerControl.ino index 3429eac..bb5f54d 100644 --- a/XAirMixerControl.ino +++ b/XAirMixerControl.ino @@ -59,10 +59,10 @@ const uint8_t pinLedDec2 = A3; TimedPin LedBoard(LED_BUILTIN); TimedPin LedChOn1(pinLedChOn1, true); TimedPin LedChOn2(pinLedChOn2, true); -TimedPin LedInc1(pinLedInc1, true); -TimedPin LedDec1(pinLedDec1, true); -TimedPin LedInc2(pinLedInc2, true); -TimedPin LedDec2(pinLedDec2, true); +TimedPin LedInc1(pinLedInc1); +TimedPin LedDec1(pinLedDec1); +TimedPin LedInc2(pinLedInc2); +TimedPin LedDec2(pinLedDec2); diff --git a/ui.cpp b/ui.cpp index 3428276..6994132 100644 --- a/ui.cpp +++ b/ui.cpp @@ -22,6 +22,8 @@ extern TimedPin LedBoard; extern TimedPin LedChOn1; extern TimedPin LedChOn2; +extern TimedPin LedInc1; +extern TimedPin LedDec1; extern MIDI_NAMESPACE::SerialMIDI serialMIDI; extern MIDI_NAMESPACE::MidiInterface> MIDI; @@ -118,6 +120,8 @@ void UiSt_MixerStartup(UI_SM* const me, uint16_t event) { LedBoard.Blink(30, 270, 5); LedChOn1.Blink(500, 500); LedChOn2.Blink(500, 500); + LedInc1.Blink(500, 500); + LedDec1.Blink(500, 500); }break; case EV_STATE_EXIT: { }break; diff --git a/ui.h b/ui.h index 1be61f4..6183846 100644 --- a/ui.h +++ b/ui.h @@ -73,8 +73,8 @@ struct MixerFaderState { uint8_t FaderMixer; /// volume received from mixer uint8_t FaderLocal; /// local volume (sent to mixer) uint8_t FaderMin; /// min volume - uint8_t FaderMax; /// max volume uint8_t FaderStd; /// std volume + uint8_t FaderMax; /// max volume BTN_CODES UiButtonInc; /// assigned button BTN_CODES UiButtonDec; /// assigned button TimedPin* LedInc; @@ -92,7 +92,7 @@ struct MixerFaderState { ) : MidiCtrlNr(ctrl_nr), FaderMixer(0), - FaderLocal(0), + FaderLocal(volstd), FaderMin(volmin), FaderStd(volstd), FaderMax(volmax), @@ -110,8 +110,8 @@ struct MixerFaderState { } LedInc->Blink(t_on, t_off); - t_on = 950; - t_off = 50; + t_on = 50; + t_off = 950; if (FaderLocal < FaderStd) { t_on = 950; t_off = 50;