Fixed wrong color value

This commit is contained in:
Jens Noack 2020-10-06 07:29:45 +02:00
parent 98a548fd86
commit 3e57580589

View file

@ -205,7 +205,7 @@ void disp_start_set()
text_pass = 0; text_pass = 0;
if(text_sets.sets[text_curr_nr].text !='\0' && text_sets.sets[text_curr_nr].active == true) if(text_sets.sets[text_curr_nr].text !='\0' && text_sets.sets[text_curr_nr].active == true)
{ {
Serial.printf("[%lu] Set %d. Runtime %lu. Text:'%s'\n", millis(), text_curr_nr, text_sets.sets[text_curr_nr].time_ms, text_sets.sets[text_curr_nr].text); Serial.printf("[%lu] Set %d. Runtime %d. Text:'%s'\n", millis(), text_curr_nr, text_sets.sets[text_curr_nr].time_ms, text_sets.sets[text_curr_nr].text);
matrix.fillScreen(0); matrix.fillScreen(0);
textpixel = 6*strlen(text_sets.sets[text_curr_nr].text); textpixel = 6*strlen(text_sets.sets[text_curr_nr].text);
switch(text_sets.sets[text_curr_nr].align) switch(text_sets.sets[text_curr_nr].align)
@ -230,8 +230,8 @@ void disp_start_set()
void show_matrix(const char* text, int pos, uint16_t color) void show_matrix(const char* text, int pos, uint16_t color)
{ {
//Serial.printf("TEXT: %s (pos=%d, color=%d)\n", text, pos, color); Serial.printf("TEXT: %s (pos=%d, color=%d)\n", text, pos, color);
matrix.setTextColor(color); matrix.setTextColor(colors[color]);
matrix.setCursor(pos, 0); matrix.setCursor(pos, 0);
matrix.print(text); matrix.print(text);
matrix.show(); matrix.show();