File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ enum SleepMode {
3131/// slowly fade themm on/off
3232const SLEEP_MODE : SleepMode = SleepMode :: Fading ;
3333
34+ const STARTUP_ANIMATION : bool = true ;
35+
3436const MAX_CURRENT : usize = 500 ;
3537
3638/// Maximum brightness out of 255
@@ -234,6 +236,9 @@ fn main() -> ! {
234236 let mut game_timer = timer. get_counter ( ) . ticks ( ) ;
235237
236238 let mut startup_percentage = Some ( 0 ) ;
239+ if !STARTUP_ANIMATION {
240+ state. grid = percentage ( 100 ) ;
241+ }
237242
238243 // Detect whether the sleep pin is connected
239244 // Early revisions of the hardware didn't have it wired up, if that is the
@@ -266,7 +271,7 @@ fn main() -> ! {
266271 if matches ! ( state. sleeping, SleepState :: Awake ) && render_again {
267272 // On startup slowly turn the screen on - it's a pretty effect :)
268273 match startup_percentage {
269- Some ( p) if p <= 100 => {
274+ Some ( p) if p <= 100 && STARTUP_ANIMATION => {
270275 state. grid = percentage ( p) ;
271276 startup_percentage = Some ( p + 5 ) ;
272277 }
You can’t perform that action at this time.
0 commit comments