Converted lambdas to normal functions to save RAM
This commit is contained in:
parent
9561556302
commit
e08a3a5291
1 changed files with 29 additions and 20 deletions
|
@ -32,6 +32,10 @@ static bool refreshScreen;
|
||||||
|
|
||||||
//***********************************************************
|
//***********************************************************
|
||||||
|
|
||||||
|
static void breathSave(const AdjustMenuEntry& e) {
|
||||||
|
writeSetting(BREATH_THR_ADDR, *e.entries[0].value);
|
||||||
|
writeSetting(BREATH_MAX_ADDR, *e.entries[1].value);
|
||||||
|
}
|
||||||
|
|
||||||
const AdjustMenuEntry breathAdjustMenu = {
|
const AdjustMenuEntry breathAdjustMenu = {
|
||||||
"BREATH",
|
"BREATH",
|
||||||
|
@ -39,57 +43,63 @@ const AdjustMenuEntry breathAdjustMenu = {
|
||||||
{ &breathThrVal, breathLoLimit, breathHiLimit },
|
{ &breathThrVal, breathLoLimit, breathHiLimit },
|
||||||
{ &breathMaxVal, breathLoLimit, breathHiLimit }
|
{ &breathMaxVal, breathLoLimit, breathHiLimit }
|
||||||
},
|
},
|
||||||
[] (const AdjustMenuEntry& e) {
|
breathSave
|
||||||
writeSetting(BREATH_THR_ADDR, *e.entries[0].value);
|
|
||||||
writeSetting(BREATH_MAX_ADDR, *e.entries[1].value);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void portamentoSave(const AdjustMenuEntry& e) {
|
||||||
|
writeSetting(PORTAM_THR_ADDR, *e.entries[0].value);
|
||||||
|
writeSetting(PORTAM_MAX_ADDR, *e.entries[1].value);
|
||||||
|
}
|
||||||
|
|
||||||
const AdjustMenuEntry portamentoAdjustMenu = {
|
const AdjustMenuEntry portamentoAdjustMenu = {
|
||||||
"PORTAMENTO",
|
"PORTAMENTO",
|
||||||
{
|
{
|
||||||
{ &portamThrVal, portamLoLimit, portamHiLimit },
|
{ &portamThrVal, portamLoLimit, portamHiLimit },
|
||||||
{ &portamMaxVal, portamLoLimit, portamHiLimit }
|
{ &portamMaxVal, portamLoLimit, portamHiLimit }
|
||||||
},
|
},
|
||||||
[] (const AdjustMenuEntry& e) {
|
portamentoSave
|
||||||
writeSetting(PORTAM_THR_ADDR, *e.entries[0].value);
|
|
||||||
writeSetting(PORTAM_MAX_ADDR, *e.entries[1].value);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void pbSave(const AdjustMenuEntry& e) {
|
||||||
|
writeSetting(PITCHB_THR_ADDR, *e.entries[0].value);
|
||||||
|
writeSetting(PITCHB_MAX_ADDR, *e.entries[1].value);
|
||||||
|
}
|
||||||
|
|
||||||
const AdjustMenuEntry pitchBendAdjustMenu = {
|
const AdjustMenuEntry pitchBendAdjustMenu = {
|
||||||
"PITCH BEND",
|
"PITCH BEND",
|
||||||
{
|
{
|
||||||
{ &pitchbThrVal, pitchbLoLimit, pitchbHiLimit },
|
{ &pitchbThrVal, pitchbLoLimit, pitchbHiLimit },
|
||||||
{ &pitchbMaxVal, pitchbLoLimit, pitchbHiLimit }
|
{ &pitchbMaxVal, pitchbLoLimit, pitchbHiLimit }
|
||||||
},
|
},
|
||||||
[] (const AdjustMenuEntry& e) {
|
pbSave
|
||||||
writeSetting(PITCHB_THR_ADDR, *e.entries[0].value);
|
|
||||||
writeSetting(PITCHB_MAX_ADDR, *e.entries[1].value);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void extracSave(const AdjustMenuEntry& e) {
|
||||||
|
writeSetting(EXTRAC_THR_ADDR, *e.entries[0].value);
|
||||||
|
writeSetting(EXTRAC_MAX_ADDR, *e.entries[1].value);
|
||||||
|
}
|
||||||
|
|
||||||
const AdjustMenuEntry extraSensorAdjustMenu = {
|
const AdjustMenuEntry extraSensorAdjustMenu = {
|
||||||
"EXTRA CONTROLLER",
|
"EXTRA CONTROLLER",
|
||||||
{
|
{
|
||||||
{ &extracThrVal, extracLoLimit, extracHiLimit },
|
{ &extracThrVal, extracLoLimit, extracHiLimit },
|
||||||
{ &extracMaxVal, extracLoLimit, extracHiLimit }
|
{ &extracMaxVal, extracLoLimit, extracHiLimit }
|
||||||
},
|
},
|
||||||
[] (const AdjustMenuEntry& e) {
|
extracSave
|
||||||
writeSetting(EXTRAC_THR_ADDR, *e.entries[0].value);
|
|
||||||
writeSetting(EXTRAC_MAX_ADDR, *e.entries[1].value);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static void ctouchThrSave(const AdjustMenuEntry& e) {
|
||||||
|
writeSetting(CTOUCH_THR_ADDR, *e.entries[0].value);
|
||||||
|
}
|
||||||
|
|
||||||
const AdjustMenuEntry ctouchAdjustMenu = {
|
const AdjustMenuEntry ctouchAdjustMenu = {
|
||||||
"TOUCH SENSE",
|
"TOUCH SENSE",
|
||||||
{
|
{
|
||||||
{ &ctouchThrVal, ctouchLoLimit, ctouchHiLimit },
|
{ &ctouchThrVal, ctouchLoLimit, ctouchHiLimit },
|
||||||
{ nullptr, 0, 0 }
|
{ nullptr, 0, 0 }
|
||||||
},
|
},
|
||||||
[] (const AdjustMenuEntry& e) {
|
ctouchThrSave
|
||||||
writeSetting(CTOUCH_THR_ADDR, *e.entries[0].value);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const AdjustMenuEntry* adjustMenuEntries[] = {
|
const AdjustMenuEntry* adjustMenuEntries[] = {
|
||||||
|
@ -234,7 +244,6 @@ void plotSensorPixels(){
|
||||||
forcePix = 0;
|
forcePix = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************
|
//***********************************************************
|
||||||
|
|
||||||
static bool drawAdjustBar(uint16_t buttons, int row, const AdjustValue* entry, uint16_t *pos) {
|
static bool drawAdjustBar(uint16_t buttons, int row, const AdjustValue* entry, uint16_t *pos) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue