|
@@ -77,7 +77,8 @@ void buttonFocus(int index) {
|
|
|
String file = "button";
|
|
|
file+=index ;
|
|
|
file+=".txt";
|
|
|
- btnFile = SD.open(file.c_str()) ;
|
|
|
+ btnFile = SD.open(file.c_str(), FILE_READ) ;
|
|
|
+ btnFile.setTimeout(100);
|
|
|
//btnFile = SD.open("button0.txt");
|
|
|
Serial.println("");
|
|
|
Serial.println("opening " + file);
|
|
@@ -88,11 +89,11 @@ void buttonFocus(int index) {
|
|
|
// while(
|
|
|
|
|
|
EvtResetButtonContext() ; //clean context before starting reading the file
|
|
|
- Serial.println("ended buttonReset");
|
|
|
+ //Serial.println("ended buttonReset");
|
|
|
delay_length = 0 ;
|
|
|
inibSDreading = false ;
|
|
|
|
|
|
- Serial.println("ended focus");
|
|
|
+ //Serial.println("ended focus");
|
|
|
//mgr.addListener(new EvtTimeListener(10, true, (EvtAction)readSDFile));
|
|
|
//mgr.addListener(new EvtTimeListener(50, true, (EvtAction)fadeDimmer));
|
|
|
//readSDFile();
|
|
@@ -138,34 +139,22 @@ void audioVolume(){
|
|
|
|
|
|
bool button0(){
|
|
|
buttonFocus(0) ;
|
|
|
- //lustre_targetPalette = palette_FLAMINGO ;
|
|
|
- //lustre_currentBrightness = 255;
|
|
|
return false;
|
|
|
}
|
|
|
bool button1(){
|
|
|
buttonFocus(1) ;
|
|
|
- //lustre_targetPalette = palette_SOLEIL;
|
|
|
- //lustre_currentBrightness = 0;
|
|
|
-// testAll();
|
|
|
return false;
|
|
|
}
|
|
|
bool button2(){
|
|
|
buttonFocus(2) ;
|
|
|
- //lustre_targetPalette = palette_CREPUSCULE ;
|
|
|
- //lustre_currentBrightness = 0;
|
|
|
-
|
|
|
return false;
|
|
|
}
|
|
|
bool button3(){
|
|
|
buttonFocus(3) ;
|
|
|
- //lustre_targetPalette =palette_MER;
|
|
|
- //lustre_currentBrightness = 0;
|
|
|
return false;
|
|
|
}
|
|
|
bool button4(){
|
|
|
buttonFocus(4) ;
|
|
|
- //lustre_currentBrightness = 0;
|
|
|
-// stopAll();
|
|
|
return false;
|
|
|
}
|
|
|
bool button5(){
|