Vol fader handling works

master
unicod 3 years ago
parent a3f5922478
commit 8695984f60

@ -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);

@ -22,6 +22,8 @@
extern TimedPin LedBoard;
extern TimedPin LedChOn1;
extern TimedPin LedChOn2;
extern TimedPin LedInc1;
extern TimedPin LedDec1;
extern MIDI_NAMESPACE::SerialMIDI<HardwareSerial> serialMIDI;
extern MIDI_NAMESPACE::MidiInterface<MIDI_NAMESPACE::SerialMIDI<HardwareSerial>> 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;

@ -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;

Loading…
Cancel
Save