remove variant
This commit is contained in:
@@ -16,6 +16,7 @@ void c_chaingame::nextPattern(void)
|
||||
|
||||
void c_chaingame::runGame(void)
|
||||
{
|
||||
//check if we are idle
|
||||
if (!patternFlag && !cheatButtonFlag)
|
||||
{
|
||||
if (buttonIsPressed(ledpattern[patternIndex]))
|
||||
@@ -38,12 +39,14 @@ void c_chaingame::runGame(void)
|
||||
}
|
||||
}
|
||||
|
||||
// check if the actual pattern switch is off
|
||||
if (!buttonIsPressed(ledpattern[patternIndex]))
|
||||
{
|
||||
// pattern switch is open, turn off pattern LED
|
||||
turnOffLed(ledpattern[patternIndex]);
|
||||
}
|
||||
|
||||
// check if the game is in cheat mode and cheat switch is off
|
||||
if (!buttonIsPressed(cheatbutton) && cheatButtonFlag)
|
||||
{
|
||||
// cheat switch is open, turn of cheat LED
|
||||
@@ -52,6 +55,7 @@ void c_chaingame::runGame(void)
|
||||
cheatbutton = 0;
|
||||
}
|
||||
|
||||
// if all siwtches are off turn all LEDs off
|
||||
if (!anybutton())
|
||||
{
|
||||
//all switches are open, turn off all LEDs
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Arduino.h"
|
||||
#include "arduino.h"
|
||||
#include "board.h"
|
||||
#include "buttons.h"
|
||||
#include "led.h"
|
||||
|
||||
Reference in New Issue
Block a user