Use helper function for midi channel as well
This commit is contained in:
parent
8772e28907
commit
8087f93677
1 changed files with 21 additions and 25 deletions
|
@ -335,6 +335,24 @@ static void drawSubBox(const char* label)
|
||||||
display.println(label);
|
display.println(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void plotSubOption(const char* label, int color) {
|
||||||
|
display.setTextColor(color);
|
||||||
|
display.setTextSize(2);
|
||||||
|
int x_pos = 91-strlen(label)*4;
|
||||||
|
display.setCursor(x_pos,33);
|
||||||
|
display.println(label);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void plotNum(int value, int color) {
|
||||||
|
int s = 0;
|
||||||
|
if(value > 99) s = 2*7;
|
||||||
|
else if(value > 9) s = 1*7;
|
||||||
|
display.setTextColor(color);
|
||||||
|
display.setTextSize(2);
|
||||||
|
display.setCursor(90-s ,33);
|
||||||
|
display.println(value);
|
||||||
|
}
|
||||||
|
|
||||||
static void plotTranspose(int color){
|
static void plotTranspose(int color){
|
||||||
int value = transpose - 12;
|
int value = transpose - 12;
|
||||||
const char *sign = (value < 0) ? "-":"+";
|
const char *sign = (value < 0) ? "-":"+";
|
||||||
|
@ -383,12 +401,9 @@ static void plotOctave(int color){
|
||||||
display.println(abs(octave-3));
|
display.println(abs(octave-3));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void plotMIDI(int color){
|
static void plotMIDI(int color) {
|
||||||
display.setTextColor(color);
|
plotNum(MIDIchannel, color);
|
||||||
display.setTextSize(2);
|
if (slowMidi && color) {
|
||||||
display.setCursor(90,33);
|
|
||||||
display.println(MIDIchannel);
|
|
||||||
if (slowMidi && color){
|
|
||||||
display.setTextColor(WHITE);
|
display.setTextColor(WHITE);
|
||||||
} else {
|
} else {
|
||||||
display.setTextColor(BLACK);
|
display.setTextColor(BLACK);
|
||||||
|
@ -398,25 +413,6 @@ static void plotMIDI(int color){
|
||||||
display.print("S");
|
display.print("S");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void plotSubOption(const char* label, int color)
|
|
||||||
{
|
|
||||||
display.setTextColor(color);
|
|
||||||
display.setTextSize(2);
|
|
||||||
int x_pos = 91-strlen(label)*4;
|
|
||||||
display.setCursor(x_pos,33);
|
|
||||||
display.println(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void plotNum(int value, int color) {
|
|
||||||
int s = 0;
|
|
||||||
if(value > 99) s = 2*7;
|
|
||||||
else if(value > 9) s = 1*7;
|
|
||||||
display.setTextColor(color);
|
|
||||||
display.setTextSize(2);
|
|
||||||
display.setCursor(90-s ,33);
|
|
||||||
display.println(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char* breathCCMenuLabels[] = { "OFF", "MW", "BR", "VL", "EX", "MW+",
|
static const char* breathCCMenuLabels[] = { "OFF", "MW", "BR", "VL", "EX", "MW+",
|
||||||
"BR+", "VL+", "EX+", "CF", "20" };
|
"BR+", "VL+", "EX+", "CF", "20" };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue