From f4e95668ce1e413eaf3148f9d85999d16d02815c Mon Sep 17 00:00:00 2001 From: Brian Hrebec Date: Mon, 1 Apr 2024 16:48:04 -0500 Subject: [PATCH] Fixes --- NuEVI/src/config.h | 12 ++++++------ NuEVI/src/hardware.h | 13 +++++++------ NuEVI/src/menu.cpp | 12 ++++++------ NuEVI/src/xEVI.cpp | 1 - 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/NuEVI/src/config.h b/NuEVI/src/config.h index 4dce885..45b7202 100644 --- a/NuEVI/src/config.h +++ b/NuEVI/src/config.h @@ -50,14 +50,14 @@ #define BREATH_HI_LIMIT 12000 #define BITE_LO_LIMIT 500 #define BITE_HI_LIMIT 1000 -#define PITCHB_LO_LIMIT 500 -#define PITCHB_HI_LIMIT 1000 -#define EXTRA_LO_LIMIT 500 -#define EXTRA_HI_LIMIT 1000 +#define PITCHB_LO_LIMIT -100 +#define PITCHB_HI_LIMIT 100 +#define EXTRA_LO_LIMIT -100 +#define EXTRA_HI_LIMIT 100 #define CTOUCH_LO_LIMIT 500 #define CTOUCH_HI_LIMIT 1000 -#define LEVER_LO_LIMIT 500 -#define LEVER_HI_LIMIT 1000 +#define LEVER_LO_LIMIT -100 +#define LEVER_HI_LIMIT 100 #define SPIKE_LO_LIMIT 0 #define SPIKE_HI_LIMIT 200 diff --git a/NuEVI/src/hardware.h b/NuEVI/src/hardware.h index 8774f41..4493123 100644 --- a/NuEVI/src/hardware.h +++ b/NuEVI/src/hardware.h @@ -21,6 +21,13 @@ struct icm_result_t { float roll; }; +enum Slider : uint8_t { + SLIDER_PITCH_BEND = 0, + SLIDER_EXTRA = 1, + SLIDER_LEVER = 2, +}; + + void initHardware(); void updateFilters(preset_t &preset); bool checkButtonState(uint8_t mask); // return true if the given buttons are pressed @@ -107,10 +114,4 @@ icm_result_t readICM(); #define leverSliderPin2 8 #define extraSliderPin1 2 #define extraSliderPin2 3 -enum Slider : uint8_t { - SLIDER_PITCH_BEND = 0, - SLIDER_EXTRA = 1, - SLIDER_LEVER = 2, -}; - #endif diff --git a/NuEVI/src/menu.cpp b/NuEVI/src/menu.cpp index 062f1e3..1fbcca7 100644 --- a/NuEVI/src/menu.cpp +++ b/NuEVI/src/menu.cpp @@ -936,20 +936,20 @@ private: -std::array adjustValues = { { +std::array adjustValues = { { {"BREATH", &instrument_state_t::breathSignal, &calibration_t::breathThrValOffset, &calibration_t::breathMaxValOffset, BREATH_LO_LIMIT, BREATH_HI_LIMIT, &instrument_state_t::breathZero}, {"BR ALT", &instrument_state_t::breathAltSignal, &calibration_t::breathAltThrValOffset, &calibration_t::breathAltMaxValOffset, BREATH_LO_LIMIT, BREATH_HI_LIMIT, &instrument_state_t::breathAltZero}, {"BITE",&instrument_state_t::biteSignal, &calibration_t::biteThrVal, &calibration_t::biteMaxVal, BITE_LO_LIMIT, BITE_HI_LIMIT, NULL}, - {"PB DOWN",&instrument_state_t::pbDnSignal, &calibration_t::pbDnThrVal, &calibration_t::pbDnMaxVal, PITCHB_LO_LIMIT, PITCHB_HI_LIMIT, NULL}, - {"PB UP", &instrument_state_t::pbUpSignal, &calibration_t::pbUpThrVal, &calibration_t::pbUpMaxVal, PITCHB_LO_LIMIT, PITCHB_HI_LIMIT, NULL}, - {"EXTRA", &instrument_state_t::extraSignal, &calibration_t::extraThrVal, &calibration_t::extraMaxVal, EXTRA_LO_LIMIT, EXTRA_HI_LIMIT, NULL}, - {"LEVER", &instrument_state_t::leverSignal, &calibration_t::leverThrVal, &calibration_t::leverMaxVal, LEVER_LO_LIMIT, LEVER_HI_LIMIT, NULL}, + {"PB",&instrument_state_t::pbSignal, &calibration_t::pbMinVal, &calibration_t::pbMaxVal, PITCHB_LO_LIMIT, PITCHB_HI_LIMIT, NULL}, + {"PB DZ",&instrument_state_t::pbSignal, &calibration_t::pbDeadzone, &calibration_t::pbDeadzone, PITCHB_LO_LIMIT, PITCHB_HI_LIMIT, NULL}, + {"EXTRA", &instrument_state_t::extraSignal, &calibration_t::extraMinVal, &calibration_t::extraMaxVal, EXTRA_LO_LIMIT, EXTRA_HI_LIMIT, NULL}, + {"LEVER", &instrument_state_t::leverSignal, &calibration_t::leverMinVal, &calibration_t::leverMaxVal, LEVER_LO_LIMIT, LEVER_HI_LIMIT, NULL}, {"TOUCH", &instrument_state_t::avgCTouchSignal, &calibration_t::ctouchThrVal, &calibration_t::ctouchThrVal, CTOUCH_LO_LIMIT, CTOUCH_HI_LIMIT, NULL}, }}; -AdjustMenuScreen<9> adjustMenu("ADJUST", adjustValues); +AdjustMenuScreen<7> adjustMenu("ADJUST", adjustValues); //*********************************************************** diff --git a/NuEVI/src/xEVI.cpp b/NuEVI/src/xEVI.cpp index 32fb783..3eb7564 100644 --- a/NuEVI/src/xEVI.cpp +++ b/NuEVI/src/xEVI.cpp @@ -1041,7 +1041,6 @@ void loop() { readSwitches(); runStateMachine(); handleCCs(); - readSlider(1); // cvUpdate(); midiDiscardInput();