Even more places to use helper functions
This commit is contained in:
parent
aec3ef9fc7
commit
3de5dd2b37
1 changed files with 9 additions and 13 deletions
|
@ -343,7 +343,7 @@ static void plotSubOption(const char* label, int color) {
|
||||||
display.println(label);
|
display.println(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void plotNum(int value, int color) {
|
static void plotSubNum(int value, int color) {
|
||||||
int s = 0;
|
int s = 0;
|
||||||
if(value > 99) s = 2*7;
|
if(value > 99) s = 2*7;
|
||||||
else if(value > 9) s = 1*7;
|
else if(value > 9) s = 1*7;
|
||||||
|
@ -402,7 +402,7 @@ static void plotOctave(int color){
|
||||||
}
|
}
|
||||||
|
|
||||||
static void plotMIDI(int color) {
|
static void plotMIDI(int color) {
|
||||||
plotNum(MIDIchannel, color);
|
plotSubNum(MIDIchannel, color);
|
||||||
if (slowMidi && color) {
|
if (slowMidi && color) {
|
||||||
display.setTextColor(WHITE);
|
display.setTextColor(WHITE);
|
||||||
} else {
|
} else {
|
||||||
|
@ -432,7 +432,7 @@ static void plotBreathAT(int color){
|
||||||
|
|
||||||
static void plotVelocity(int color){
|
static void plotVelocity(int color){
|
||||||
if (velocity){
|
if (velocity){
|
||||||
plotNum(velocity, color);
|
plotSubNum(velocity, color);
|
||||||
} else {
|
} else {
|
||||||
plotSubOption("DYN", color);
|
plotSubOption("DYN", color);
|
||||||
}
|
}
|
||||||
|
@ -477,27 +477,23 @@ static void plotExtra(int color){
|
||||||
}
|
}
|
||||||
|
|
||||||
static void plotVibrato(int color){
|
static void plotVibrato(int color){
|
||||||
display.setTextColor(color);
|
|
||||||
display.setTextSize(2);
|
|
||||||
if (vibrato){
|
if (vibrato){
|
||||||
display.setCursor(90,33);
|
plotSubNum(vibrato, color);
|
||||||
display.println(vibrato);
|
|
||||||
} else {
|
} else {
|
||||||
display.setCursor(79,33);
|
plotSubOption("OFF", color);
|
||||||
display.println("OFF");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void plotVibSens(int color){
|
static void plotVibSens(int color){
|
||||||
plotNum(vibSens, color);
|
plotSubNum(vibSens, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void plotVibRetn(int color){
|
static void plotVibRetn(int color){
|
||||||
plotNum(vibRetn, color);
|
plotSubNum(vibRetn, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void plotVibSquelch(int color){
|
static void plotVibSquelch(int color){
|
||||||
plotNum(vibSquelch, color);
|
plotSubNum(vibSquelch, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void plotVibDirection(int color){
|
static void plotVibDirection(int color){
|
||||||
|
@ -557,7 +553,7 @@ static void plotVelBias(int color){
|
||||||
display.setTextColor(color);
|
display.setTextColor(color);
|
||||||
display.setTextSize(2);
|
display.setTextSize(2);
|
||||||
if (velBias){
|
if (velBias){
|
||||||
plotNum(velBias, color);
|
plotSubNum(velBias, color);
|
||||||
} else {
|
} else {
|
||||||
display.setCursor(79,33);
|
display.setCursor(79,33);
|
||||||
display.println("OFF");
|
display.println("OFF");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue