diff --git a/nametag/src/enums.h b/nametag/src/enums.h index 61a856e..bdbd2f4 100644 --- a/nametag/src/enums.h +++ b/nametag/src/enums.h @@ -11,8 +11,8 @@ enum DisplayStyle { Congress, Supercomputer, Cyber, - Plasma, - Flame, - NumStyles + Flame }; + +DisplayStyle next_style(DisplayStyle style); #endif diff --git a/nametag/src/main.cpp b/nametag/src/main.cpp index 5eae744..ff458a9 100644 --- a/nametag/src/main.cpp +++ b/nametag/src/main.cpp @@ -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 }