Add settings for fast boot, bcas mode, 3rd trill, dac out
This commit is contained in:
parent
c38adcd56c
commit
7b179d4343
6 changed files with 99 additions and 76 deletions
|
@ -80,6 +80,11 @@ unsigned short vibControl = 0;
|
||||||
|
|
||||||
unsigned short fastPatch[7] = {0,0,0,0,0,0,0};
|
unsigned short fastPatch[7] = {0,0,0,0,0,0,0};
|
||||||
|
|
||||||
|
uint16_t bcasMode; //Legacy CASSIDY compile flag
|
||||||
|
uint16_t trill3_interval;
|
||||||
|
uint16_t fastBoot;
|
||||||
|
uint16_t dacMode;
|
||||||
|
|
||||||
byte rotatorOn = 0;
|
byte rotatorOn = 0;
|
||||||
byte currentRotation = 0;
|
byte currentRotation = 0;
|
||||||
uint16_t rotations[4]; // semitones { -5, -10, -7, -14 };
|
uint16_t rotations[4]; // semitones { -5, -10, -7, -14 };
|
||||||
|
@ -262,14 +267,16 @@ void setup() {
|
||||||
|
|
||||||
|
|
||||||
//Read eeprom data into global vars
|
//Read eeprom data into global vars
|
||||||
readEEPROM(factoryReset);
|
readEEPROM();
|
||||||
|
|
||||||
|
|
||||||
|
//Parse out flags from bit field
|
||||||
|
fastBoot = dipSwBits & (1<<0);
|
||||||
legacy = dipSwBits & (1<<1);
|
legacy = dipSwBits & (1<<1);
|
||||||
legacyBrAct = dipSwBits & (1<<2);
|
legacyBrAct = dipSwBits & (1<<2);
|
||||||
slowMidi = dipSwBits & (1<<3);
|
slowMidi = dipSwBits & (1<<3);
|
||||||
gateOpenEnable = dipSwBits & (1<<4);
|
gateOpenEnable = dipSwBits & (1<<4);
|
||||||
specialKeyEnable = dipSwBits & (1<<5);
|
specialKeyEnable = dipSwBits & (1<<5);
|
||||||
|
bcasMode = dipSwBits & (1<<6);
|
||||||
activePatch = patch;
|
activePatch = patch;
|
||||||
|
|
||||||
touch_Thr = map(ctouchThrVal,ctouchHiLimit,ctouchLoLimit,ttouchLoLimit,ttouchHiLimit);
|
touch_Thr = map(ctouchThrVal,ctouchHiLimit,ctouchLoLimit,ttouchLoLimit,ttouchHiLimit);
|
||||||
|
@ -295,8 +302,9 @@ void setup() {
|
||||||
breathCalZero += analogRead(breathSensorPin);
|
breathCalZero += analogRead(breathSensorPin);
|
||||||
if (biteJumper) vibZeroBite += analogRead(A7); else vibZeroBite += touchRead(bitePin);
|
if (biteJumper) vibZeroBite += analogRead(A7); else vibZeroBite += touchRead(bitePin);
|
||||||
digitalWrite( statusLedPin, i&1 );
|
digitalWrite( statusLedPin, i&1 );
|
||||||
delay(250);
|
delay(fastBoot?75:250); //Shorter delay for fastboot
|
||||||
}
|
}
|
||||||
|
|
||||||
vibZero /= sampleCount;
|
vibZero /= sampleCount;
|
||||||
breathCalZero /= sampleCount;
|
breathCalZero /= sampleCount;
|
||||||
vibZeroBite /= sampleCount;
|
vibZeroBite /= sampleCount;
|
||||||
|
@ -306,15 +314,17 @@ void setup() {
|
||||||
vibThrBite = vibZeroBite - vibSquelchBite;
|
vibThrBite = vibZeroBite - vibSquelchBite;
|
||||||
vibThrBiteLo = vibZeroBite + vibSquelchBite;
|
vibThrBiteLo = vibZeroBite + vibSquelchBite;
|
||||||
|
|
||||||
digitalWrite(statusLedPin, LOW);
|
if(!fastBoot) {
|
||||||
delay(250);
|
digitalWrite(statusLedPin, LOW);
|
||||||
digitalWrite(statusLedPin,HIGH);
|
delay(250);
|
||||||
delay(250);
|
digitalWrite(statusLedPin,HIGH);
|
||||||
digitalWrite(statusLedPin,LOW);
|
delay(250);
|
||||||
|
digitalWrite(statusLedPin,LOW);
|
||||||
|
|
||||||
showVersion();
|
showVersion();
|
||||||
|
|
||||||
delay(1500);
|
delay(1500);
|
||||||
|
}
|
||||||
|
|
||||||
mainState = NOTE_OFF; // initialize main state machine
|
mainState = NOTE_OFF; // initialize main state machine
|
||||||
|
|
||||||
|
@ -359,54 +369,37 @@ void loop() {
|
||||||
mainState = RISE_WAIT; // Go to next state
|
mainState = RISE_WAIT; // Go to next state
|
||||||
}
|
}
|
||||||
if (legacy || legacyBrAct) {
|
if (legacy || legacyBrAct) {
|
||||||
#if defined(CASSIDY)
|
|
||||||
if (((pbUp > ((pitchbMaxVal + pitchbThrVal) / 2)) && (pbDn > ((pitchbMaxVal + pitchbThrVal) / 2)) && legacy) ||
|
bool bothPB = (pbUp > ((pitchbMaxVal + pitchbThrVal) / 2)) && (pbDn > ((pitchbMaxVal + pitchbThrVal) / 2));
|
||||||
((analogRead(breathSensorPin) < breathCalZero - 900) && legacyBrAct)) { // both pb pads touched or br suck
|
bool brSuck = analogRead(breathSensorPin) < (breathCalZero - (bcasMode?900:800));
|
||||||
#else
|
|
||||||
if (((pbUp > ((pitchbMaxVal + pitchbThrVal) / 2)) && (pbDn > ((pitchbMaxVal + pitchbThrVal) / 2)) && legacy) ||
|
if (
|
||||||
((analogRead(breathSensorPin) < breathCalZero - 800) && legacyBrAct && (pbUp > (pitchbMaxVal + pitchbThrVal) / 2) && (pbDn < (pitchbMaxVal + pitchbThrVal) / 2))) { // both pb pads touched or br suck
|
(bothPB && legacy) ||
|
||||||
#endif
|
(brSuck && legacyBrAct && (bothPB || bcasMode))
|
||||||
|
) { // both pb pads touched or br suck
|
||||||
|
|
||||||
|
|
||||||
fingeredNoteUntransposed = patchLimit(fingeredNoteUntransposed + 1);
|
fingeredNoteUntransposed = patchLimit(fingeredNoteUntransposed + 1);
|
||||||
if (exSensor >= ((extracThrVal + extracMaxVal) / 2)) { // instant midi setting
|
if (exSensor >= ((extracThrVal + extracMaxVal) / 2)) { // instant midi setting
|
||||||
if ((fingeredNoteUntransposed >= 73) && (fingeredNoteUntransposed <= 88)) {
|
if ((fingeredNoteUntransposed >= 73) && (fingeredNoteUntransposed <= 88)) {
|
||||||
MIDIchannel = fingeredNoteUntransposed - 72; // Mid C and up
|
MIDIchannel = fingeredNoteUntransposed - 72; // Mid C and up
|
||||||
#if !defined(CASSIDY)
|
|
||||||
digitalWrite(statusLedPin, LOW);
|
|
||||||
delay(150);
|
|
||||||
digitalWrite(statusLedPin, HIGH);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!pinkyKey) { // note number to patch number
|
if (!pinkyKey) { // note number to patch number
|
||||||
if (patch != fingeredNoteUntransposed) {
|
if (patch != fingeredNoteUntransposed) {
|
||||||
patch = fingeredNoteUntransposed;
|
patch = fingeredNoteUntransposed;
|
||||||
doPatchUpdate = 1;
|
doPatchUpdate = 1;
|
||||||
#if !defined(CASSIDY)
|
|
||||||
digitalWrite(statusLedPin, LOW);
|
|
||||||
delay(150);
|
|
||||||
digitalWrite(statusLedPin, HIGH);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
} else { // hi and lo patch numbers
|
} else { // hi and lo patch numbers
|
||||||
if (fingeredNoteUntransposed > 75) {
|
if (fingeredNoteUntransposed > 75) {
|
||||||
if (patch != patchLimit(fingeredNoteUntransposed + 24)) {
|
if (patch != patchLimit(fingeredNoteUntransposed + 24)) {
|
||||||
patch = patchLimit(fingeredNoteUntransposed + 24); // add 24 to get high numbers 108 to 127
|
patch = patchLimit(fingeredNoteUntransposed + 24); // add 24 to get high numbers 108 to 127
|
||||||
doPatchUpdate = 1;
|
doPatchUpdate = 1;
|
||||||
#if !defined(CASSIDY)
|
|
||||||
digitalWrite(statusLedPin, LOW);
|
|
||||||
delay(150);
|
|
||||||
digitalWrite(statusLedPin, HIGH);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (patch != patchLimit(fingeredNoteUntransposed - 36)) {
|
if (patch != patchLimit(fingeredNoteUntransposed - 36)) {
|
||||||
patch = patchLimit(fingeredNoteUntransposed - 36); // subtract 36 to get low numbers 0 to 36
|
patch = patchLimit(fingeredNoteUntransposed - 36); // subtract 36 to get low numbers 0 to 36
|
||||||
doPatchUpdate = 1;
|
doPatchUpdate = 1;
|
||||||
#if !defined(CASSIDY)
|
|
||||||
digitalWrite(statusLedPin, LOW);
|
|
||||||
delay(150);
|
|
||||||
digitalWrite(statusLedPin, HIGH);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1186,24 +1179,13 @@ void readSwitches() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate midi note number from pressed keys
|
// Calculate midi note number from pressed keys
|
||||||
#if defined(CASSIDY)
|
|
||||||
|
|
||||||
fingeredNoteUntransposed = startNote
|
fingeredNoteUntransposed = startNote
|
||||||
- 2*K1 - K2 - 3*K3 //"Trumpet valves"
|
- 2*K1 - K2 - 3*K3 //"Trumpet valves"
|
||||||
- 5*K4 //Fifth key
|
- 5*K4 //Fifth key
|
||||||
+ 2*K5 + K6 + 3*K7 //Trill keys (different from standard)
|
+ 2*K5 + K6 + trill3_interval*K7 //Trill keys. 3rd trill key interval controlled by setting
|
||||||
+ octaveR*12; //Octave rollers
|
+ octaveR*12; //Octave rollers
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
fingeredNoteUntransposed = startNote
|
|
||||||
- 2*K1 - K2 - 3*K3 //"Trumpet valves"
|
|
||||||
- 5*K4 //Fifth key
|
|
||||||
+ 2*K5 + K6 + 4*K7 //Trill keys
|
|
||||||
+ octaveR*12; //Octave rollers
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int fingeredNoteRead = fingeredNoteUntransposed + transpose - 12 + qTransp;
|
int fingeredNoteRead = fingeredNoteUntransposed + transpose - 12 + qTransp;
|
||||||
|
|
||||||
if (pinkyKey) pitchlatch = fingeredNoteUntransposed; //use pitchlatch to make settings based on note fingered
|
if (pinkyKey) pitchlatch = fingeredNoteUntransposed; //use pitchlatch to make settings based on note fingered
|
||||||
|
|
|
@ -73,6 +73,11 @@ extern byte currentRotation;
|
||||||
extern uint16_t rotations[4];
|
extern uint16_t rotations[4];
|
||||||
extern uint16_t parallel; // semitones
|
extern uint16_t parallel; // semitones
|
||||||
|
|
||||||
|
extern uint16_t bcasMode; //Legacy CASSIDY compile flag
|
||||||
|
extern uint16_t trill3_interval;
|
||||||
|
extern uint16_t fastBoot;
|
||||||
|
extern uint16_t dacMode;
|
||||||
|
|
||||||
extern uint16_t wlPower;
|
extern uint16_t wlPower;
|
||||||
|
|
||||||
extern int touch_Thr;
|
extern int touch_Thr;
|
||||||
|
|
|
@ -156,10 +156,6 @@ void initDisplay() {
|
||||||
void showVersion() {
|
void showVersion() {
|
||||||
display.setTextColor(WHITE);
|
display.setTextColor(WHITE);
|
||||||
display.setTextSize(1);
|
display.setTextSize(1);
|
||||||
#if defined(CASSIDY)
|
|
||||||
display.setCursor(0,0);
|
|
||||||
display.print("BC");
|
|
||||||
#endif
|
|
||||||
#if defined(CVSCALEBOARD)
|
#if defined(CVSCALEBOARD)
|
||||||
display.setCursor(15,0);
|
display.setCursor(15,0);
|
||||||
display.print("CV");
|
display.print("CV");
|
||||||
|
@ -450,6 +446,10 @@ static void midiCustomDrawFunc(SubMenuRef __unused, char* __unused, const char**
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Poke at a certain bit in a bit field
|
||||||
|
void setBit(uint16_t &bitfield, const uint8_t pos, const uint8_t value) {
|
||||||
|
bitfield = (bitfield & ~(1<<pos)) | ((value?1:0)<<pos);
|
||||||
|
}
|
||||||
|
|
||||||
//***********************************************************
|
//***********************************************************
|
||||||
|
|
||||||
|
@ -458,8 +458,7 @@ const MenuEntrySub legacyPBMenu = {
|
||||||
[](SubMenuRef __unused, char* out, const char ** __unused unit) {
|
[](SubMenuRef __unused, char* out, const char ** __unused unit) {
|
||||||
strncpy(out, legacy?"ON":"OFF", 4);
|
strncpy(out, legacy?"ON":"OFF", 4);
|
||||||
}, [](const MenuEntrySub & __unused sub) {
|
}, [](const MenuEntrySub & __unused sub) {
|
||||||
dipSwBits = dipSwBits & ~(1<<1);
|
setBit(dipSwBits, 1, legacy);
|
||||||
dipSwBits |= (legacy <<1);
|
|
||||||
writeSetting(DIPSW_BITS_ADDR,dipSwBits);
|
writeSetting(DIPSW_BITS_ADDR,dipSwBits);
|
||||||
}
|
}
|
||||||
, nullptr
|
, nullptr
|
||||||
|
@ -470,9 +469,8 @@ const MenuEntrySub legacyBRMenu = {
|
||||||
[](SubMenuRef __unused, char* out, const char ** __unused unit) {
|
[](SubMenuRef __unused, char* out, const char ** __unused unit) {
|
||||||
strncpy(out, legacyBrAct?"ON":"OFF", 4);
|
strncpy(out, legacyBrAct?"ON":"OFF", 4);
|
||||||
}, [](const MenuEntrySub & __unused sub) {
|
}, [](const MenuEntrySub & __unused sub) {
|
||||||
dipSwBits = dipSwBits & ~(1<<2);
|
setBit(dipSwBits, 2, legacyBrAct);
|
||||||
dipSwBits |= (legacyBrAct <<2);
|
writeSetting(DIPSW_BITS_ADDR, dipSwBits);
|
||||||
writeSetting(DIPSW_BITS_ADDR,dipSwBits);
|
|
||||||
}
|
}
|
||||||
, nullptr
|
, nullptr
|
||||||
};
|
};
|
||||||
|
@ -482,9 +480,8 @@ const MenuEntrySub gateOpenMenu = {
|
||||||
[](SubMenuRef __unused, char* out, const char ** __unused unit) {
|
[](SubMenuRef __unused, char* out, const char ** __unused unit) {
|
||||||
strncpy(out, gateOpenEnable?"ON":"OFF", 4);
|
strncpy(out, gateOpenEnable?"ON":"OFF", 4);
|
||||||
}, [](const MenuEntrySub & __unused sub) {
|
}, [](const MenuEntrySub & __unused sub) {
|
||||||
dipSwBits = dipSwBits & ~(1<<4);
|
setBit(dipSwBits, 4, gateOpenEnable);
|
||||||
dipSwBits |= (gateOpenEnable <<4);
|
writeSetting(DIPSW_BITS_ADDR, dipSwBits);
|
||||||
writeSetting(DIPSW_BITS_ADDR,dipSwBits);
|
|
||||||
}
|
}
|
||||||
, nullptr
|
, nullptr
|
||||||
};
|
};
|
||||||
|
@ -494,9 +491,51 @@ const MenuEntrySub specialKeyMenu = {
|
||||||
[](SubMenuRef __unused, char* out, const char ** __unused unit) {
|
[](SubMenuRef __unused, char* out, const char ** __unused unit) {
|
||||||
strncpy(out, specialKeyEnable?"ON":"OFF", 4);
|
strncpy(out, specialKeyEnable?"ON":"OFF", 4);
|
||||||
}, [](const MenuEntrySub & __unused sub) {
|
}, [](const MenuEntrySub & __unused sub) {
|
||||||
dipSwBits = dipSwBits & ~(1<<5);
|
setBit(dipSwBits, 5, specialKeyEnable);
|
||||||
dipSwBits |= (specialKeyEnable <<5);
|
writeSetting(DIPSW_BITS_ADDR, dipSwBits);
|
||||||
writeSetting(DIPSW_BITS_ADDR,dipSwBits);
|
}
|
||||||
|
, nullptr
|
||||||
|
};
|
||||||
|
|
||||||
|
const MenuEntrySub trill3Menu = {
|
||||||
|
MenuType::ESub, "3RD TRILL", "3RD TRILL", &trill3_interval, 3, 4, MenuEntryFlags::ENone,
|
||||||
|
[](SubMenuRef __unused, char* out, const char** __unused unit) {
|
||||||
|
numToString(trill3_interval, out, true);
|
||||||
|
},
|
||||||
|
[](SubMenuRef __unused) { writeSetting(TRILL3_INTERVAL_ADDR, trill3_interval); }
|
||||||
|
, nullptr
|
||||||
|
};
|
||||||
|
|
||||||
|
const MenuEntrySub bcasModeMenu = {
|
||||||
|
MenuType::ESub, "BCAS MODE", "BCAS MODE", &bcasMode, 0, 1, MenuEntryFlags::ENone,
|
||||||
|
[](SubMenuRef __unused, char* out, const char** __unused unit) {
|
||||||
|
strncpy(out, bcasMode?"ON":"OFF", 4);
|
||||||
|
},
|
||||||
|
[](SubMenuRef __unused) {
|
||||||
|
setBit(dipSwBits, 6, bcasMode);
|
||||||
|
writeSetting(DIPSW_BITS_ADDR, dipSwBits);
|
||||||
|
}
|
||||||
|
, nullptr
|
||||||
|
};
|
||||||
|
|
||||||
|
const MenuEntrySub dacModeMenu = {
|
||||||
|
MenuType::ESub, "DAC OUT", "DAC OUT", &dacMode, 0, 1, MenuEntryFlags::ENone,
|
||||||
|
[](SubMenuRef __unused, char* out, const char** __unused unit) {
|
||||||
|
const char* dacModeLabels[] = { "BRTH", "PTCH"};
|
||||||
|
strncpy(out, dacModeLabels[dacMode], 5);
|
||||||
|
},
|
||||||
|
[](SubMenuRef __unused) { writeSetting(DAC_MODE_ADDR, dacMode); }
|
||||||
|
, nullptr
|
||||||
|
};
|
||||||
|
|
||||||
|
const MenuEntrySub fastBootMenu = {
|
||||||
|
MenuType::ESub, "FAST BOOT", "FAST BOOT", &fastBoot, 0, 1, MenuEntryFlags::ENone,
|
||||||
|
[](SubMenuRef __unused, char* out, const char** __unused unit) {
|
||||||
|
strncpy(out, fastBoot?"ON":"OFF", 4);
|
||||||
|
},
|
||||||
|
[](SubMenuRef __unused) {
|
||||||
|
setBit(dipSwBits, 0, fastBoot);
|
||||||
|
writeSetting(DIPSW_BITS_ADDR, dipSwBits);
|
||||||
}
|
}
|
||||||
, nullptr
|
, nullptr
|
||||||
};
|
};
|
||||||
|
@ -516,6 +555,10 @@ const MenuEntry* extrasMenuEntries[] = {
|
||||||
(MenuEntry*)&legacyBRMenu,
|
(MenuEntry*)&legacyBRMenu,
|
||||||
(MenuEntry*)&gateOpenMenu,
|
(MenuEntry*)&gateOpenMenu,
|
||||||
(MenuEntry*)&specialKeyMenu,
|
(MenuEntry*)&specialKeyMenu,
|
||||||
|
(MenuEntry*)&trill3Menu,
|
||||||
|
(MenuEntry*)&bcasModeMenu,
|
||||||
|
(MenuEntry*)&dacModeMenu,
|
||||||
|
(MenuEntry*)&fastBootMenu,
|
||||||
(MenuEntry*)&wlPowerMenu,
|
(MenuEntry*)&wlPowerMenu,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
|
#include "hardware.h"
|
||||||
|
#include <Arduino.h>
|
||||||
|
|
||||||
|
|
||||||
//Read settings from eeprom. Returns wether or not anything was written (due to factory reset or upgrade)
|
//Read settings from eeprom. Returns wether or not anything was written (due to factory reset or upgrade)
|
||||||
bool readEEPROM() {
|
bool readEEPROM() {
|
||||||
|
@ -88,11 +91,8 @@ bool readEEPROM() {
|
||||||
writeSetting(VIB_SENS_BITE_ADDR, VIB_SENS_BITE_FACTORY);
|
writeSetting(VIB_SENS_BITE_ADDR, VIB_SENS_BITE_FACTORY);
|
||||||
writeSetting(VIB_SQUELCH_BITE_ADDR, VIB_SQUELCH_BITE_FACTORY);
|
writeSetting(VIB_SQUELCH_BITE_ADDR, VIB_SQUELCH_BITE_FACTORY);
|
||||||
writeSetting(VIB_CONTROL_ADDR, VIB_CONTROL_FACTORY);
|
writeSetting(VIB_CONTROL_ADDR, VIB_CONTROL_FACTORY);
|
||||||
|
|
||||||
writeSetting(TRILL3_INTERVAL_ADDR, TRILL3_INTERVAL_FACTORY);
|
writeSetting(TRILL3_INTERVAL_ADDR, TRILL3_INTERVAL_FACTORY);
|
||||||
writeSetting(BCAS_MODE_ADDR, BCAS_MODE_FACTORY);
|
|
||||||
writeSetting(DAC_MODE_ADDR, DAC_MODE_FACTORY);
|
writeSetting(DAC_MODE_ADDR, DAC_MODE_FACTORY);
|
||||||
writeSetting(FASTBOOT_ADDR, FASTBOOT_FACTORY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
writeSetting(VERSION_ADDR, EEPROM_VERSION);
|
writeSetting(VERSION_ADDR, EEPROM_VERSION);
|
||||||
|
@ -149,13 +149,9 @@ bool readEEPROM() {
|
||||||
vibSensBite = readSetting(VIB_SENS_BITE_ADDR);
|
vibSensBite = readSetting(VIB_SENS_BITE_ADDR);
|
||||||
vibSquelchBite = readSetting(VIB_SQUELCH_BITE_ADDR);
|
vibSquelchBite = readSetting(VIB_SQUELCH_BITE_ADDR);
|
||||||
vibControl = readSetting(VIB_CONTROL_ADDR);
|
vibControl = readSetting(VIB_CONTROL_ADDR);
|
||||||
|
|
||||||
bcasMode = readSetting(BCAS_MODE_ADDR);
|
|
||||||
|
|
||||||
trill3_interval = readSetting(TRILL3_INTERVAL_ADDR);
|
trill3_interval = readSetting(TRILL3_INTERVAL_ADDR);
|
||||||
if(trill3_interval<3 || trill3_interval > 4) trill3_interval = TRILL3_INTERVAL_FACTORY; //Deal with possible bad values
|
if(trill3_interval<3 || trill3_interval > 4) trill3_interval = TRILL3_INTERVAL_FACTORY; //Deal with possible bad values
|
||||||
|
|
||||||
fastBoot = readSetting(FASTBOOT_ADDR);
|
|
||||||
dacMode = readSetting(DAC_MODE_ADDR);
|
dacMode = readSetting(DAC_MODE_ADDR);
|
||||||
|
|
||||||
return hasWritten;
|
return hasWritten;
|
||||||
|
|
|
@ -53,9 +53,7 @@
|
||||||
#define VIB_SQUELCH_BITE_ADDR 94
|
#define VIB_SQUELCH_BITE_ADDR 94
|
||||||
#define VIB_CONTROL_ADDR 96
|
#define VIB_CONTROL_ADDR 96
|
||||||
#define TRILL3_INTERVAL_ADDR 98
|
#define TRILL3_INTERVAL_ADDR 98
|
||||||
#define BCAS_MODE_ADDR 100
|
#define DAC_MODE_ADDR 100
|
||||||
#define DAC_MODE_ADDR 102
|
|
||||||
#define FASTBOOT_ADDR 104
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,9 +108,7 @@
|
||||||
#define VIB_CONTROL_FACTORY 0
|
#define VIB_CONTROL_FACTORY 0
|
||||||
|
|
||||||
#define TRILL3_INTERVAL_FACTORY 4
|
#define TRILL3_INTERVAL_FACTORY 4
|
||||||
#define BCAS_MODE_FACTORY 0
|
|
||||||
#define DAC_MODE_FACTORY DAC_MODE_BREATH
|
#define DAC_MODE_FACTORY DAC_MODE_BREATH
|
||||||
#define FASTBOOT_FACTORY 0
|
|
||||||
|
|
||||||
|
|
||||||
bool readEEPROM();
|
bool readEEPROM();
|
||||||
|
|
|
@ -36,6 +36,7 @@ CXXFILES= ../NuEVI/menu.cpp \
|
||||||
src/simusbmidi.cpp \
|
src/simusbmidi.cpp \
|
||||||
src/filters.cpp \
|
src/filters.cpp \
|
||||||
../NuEVI/midi.cpp \
|
../NuEVI/midi.cpp \
|
||||||
|
../NuEVI/settings.cpp \
|
||||||
src/Adafruit_GFX_sim.cpp \
|
src/Adafruit_GFX_sim.cpp \
|
||||||
src/Adafruit_SSD1306_sim.cpp \
|
src/Adafruit_SSD1306_sim.cpp \
|
||||||
src/Adafruit_MPR121_sim.cpp \
|
src/Adafruit_MPR121_sim.cpp \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue