From 33bfc9ea08a1c0a0c84b2146602628e7061086ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20St=C3=A4ck?= Date: Thu, 25 Jul 2019 07:57:31 +0200 Subject: [PATCH] Use settings flag for DAC output mode (remove CVSCALEBOARD define) --- NuEVI/NuEVI.ino | 6 +++--- NuEVI/config.h | 8 +------- NuEVI/menu.cpp | 5 ----- NuEVI/settings.cpp | 2 -- 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/NuEVI/NuEVI.ino b/NuEVI/NuEVI.ino index 88dd235..02c5260 100644 --- a/NuEVI/NuEVI.ino +++ b/NuEVI/NuEVI.ino @@ -709,7 +709,7 @@ void loop() { pixelUpdateTime = millis(); } - #if defined(CVSCALEBOARD) // pitch CV from DAC and breath CV from PWM on pin 6, for filtering and scaling on separate board + if(dacMode == DAC_MODE_PITCH) { // pitch CV from DAC and breath CV from PWM on pin 6, for filtering and scaling on separate board targetPitch = (fingeredNote-24)*42; if (portIsOn){ if (targetPitch > cvPitch){ @@ -726,9 +726,9 @@ void loop() { } analogWrite(dacPin,constrain(cvPitch+map(pitchBend,0,16383,-84,84),0,4095)); analogWrite(pwmDacPin,breathCurve(map(constrain(pressureSensor,breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,500,4095))); //starting at 0.6V to match use of cv from sensor, so recalibration of cv offset/scaler is not needed - #else // else breath CV on DAC pin, directly to unused pin of MIDI DIN jack + else if(dacMode == DAC_MODE_BREATH) { // else breath CV on DAC pin, directly to unused pin of MIDI DIN jack analogWrite(dacPin,breathCurve(map(constrain(pressureSensor,breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,0,4095))); - #endif + } midiDiscardInput(); diff --git a/NuEVI/config.h b/NuEVI/config.h index 86fae05..0ebceae 100644 --- a/NuEVI/config.h +++ b/NuEVI/config.h @@ -5,14 +5,9 @@ // Compile options, comment/uncomment to change -#define FIRMWARE_VERSION "1.3.9" // FIRMWARE VERSION NUMBER HERE <<<<<<<<<<<<<<<<<<<<<<< - - -//#define CASSIDY -#define CVSCALEBOARD +#define FIRMWARE_VERSION "1.4.0" // FIRMWARE VERSION NUMBER HERE <<<<<<<<<<<<<<<<<<<<<<< #define ON_Delay 20 // Set Delay after ON threshold before velocity is checked (wait for tounging peak) -//#define touch_Thr 1200 // sensitivity for Teensy touch sensors #define CCN_Port 5 // Controller number for portamento level #define CCN_PortOnOff 65// Controller number for portamento on/off @@ -21,7 +16,6 @@ #define CC_INTERVAL 2 -// MAybe move these to config.h (as defines?) #define breathLoLimit 0 #define breathHiLimit 4095 #define portamLoLimit 700 diff --git a/NuEVI/menu.cpp b/NuEVI/menu.cpp index a0e2808..c2a058b 100644 --- a/NuEVI/menu.cpp +++ b/NuEVI/menu.cpp @@ -1,4 +1,3 @@ - #include #include #include @@ -156,10 +155,6 @@ void initDisplay() { void showVersion() { display.setTextColor(WHITE); display.setTextSize(1); - #if defined(CVSCALEBOARD) - display.setCursor(15,0); - display.print("CV"); - #endif display.setCursor(85,52); display.print("v."); display.println(FIRMWARE_VERSION); diff --git a/NuEVI/settings.cpp b/NuEVI/settings.cpp index 0e3d688..b68860b 100644 --- a/NuEVI/settings.cpp +++ b/NuEVI/settings.cpp @@ -154,8 +154,6 @@ bool readEEPROM() { if(trill3_interval<3 || trill3_interval > 4) trill3_interval = TRILL3_INTERVAL_FACTORY; //Deal with possible zero/bad values - - //Flags stored in bit field fastBoot = dipSwBits & (1<