|
@@ -60,23 +60,22 @@ void tlcWrite(){
|
|
|
}
|
|
|
|
|
|
void buttonFocus(int index) {
|
|
|
+
|
|
|
+ btnFile.close();
|
|
|
+ //delay(50);
|
|
|
+
|
|
|
currentButton = index ;
|
|
|
//Serial.println(currentButton);
|
|
|
//turn off all leds but currentButton one
|
|
|
for (int i ; i < sizeof(ledState)/sizeof(uint32_t) ; i++) {
|
|
|
-
|
|
|
if (i == currentButton ) {
|
|
|
ledState[11-i] = 10000 ; //65536 max
|
|
|
}
|
|
|
else { ledState[11-i] = 50 ; }
|
|
|
tlcWrite();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ }
|
|
|
//et après ya plein de trucs à faire
|
|
|
- btnFile.close();
|
|
|
- delay(50);
|
|
|
+
|
|
|
String file = "button";
|
|
|
file+=index ;
|
|
|
file+=".txt";
|
|
@@ -191,7 +190,7 @@ bool button9(){
|
|
|
void EvtResetButtonContext () {
|
|
|
Serial.println("Resetting event context");
|
|
|
mgr.resetContext();
|
|
|
- delay (50);
|
|
|
+ //delay (50);
|
|
|
// button listeners
|
|
|
mgr.addListener(new EvtPinListener(BUTTON_PIN[0], (EvtAction)button0));
|
|
|
mgr.addListener(new EvtPinListener(BUTTON_PIN[1], (EvtAction)button1));
|