This commit is contained in:
Felix Pankratz 2024-12-28 16:13:44 +01:00
parent 1e97ba3a95
commit e8c734af83
2 changed files with 7 additions and 20 deletions

View File

@ -11,8 +11,8 @@ enum DisplayStyle {
Congress,
Supercomputer,
Cyber,
Plasma,
Flame,
NumStyles
Flame
};
DisplayStyle next_style(DisplayStyle style);
#endif

View File

@ -17,7 +17,7 @@
MatrixPanel_I2S_DMA *matrix = nullptr;
Mode mode = HighVis;
DisplayStyle style = Flame;
DisplayStyle style = Rain;
unsigned long last_switch;
@ -43,7 +43,7 @@ void setup(){
matrix = new MatrixPanel_I2S_DMA(mxconfig);
matrix->begin();
matrix->setBrightness8(64);
matrix->setBrightness8(255);
matrix->fillScreenRGB888(0, 0, 0);
matrix->setTextWrap(false);
matrix->setFont(&Pilowlava_Regular8pt7b);
@ -56,7 +56,7 @@ void loop() {
if (millis() - last_switch > CYCLE_TIME_MS) {
// next style
style = DisplayStyle((style + 1) % (NumStyles - 1));
style = next_style(style); //DisplayStyle((style + 1) % (NumStyles - 1));
last_switch = millis();
}
@ -76,20 +76,7 @@ void loop() {
}
if(!digitalRead(NEXT_BUTTON)) {
switch(style) {
case Rain:
style = Congress;
break;
case Congress:
style = Supercomputer;
break;
case Supercomputer:
style = Cyber;
break;
case Cyber:
style = Rain;
break;
}
style = next_style(style);
while(!digitalRead(NEXT_BUTTON)); // Wait for release
}