|
@@ -65,7 +65,7 @@ bool readSDFile() {
|
|
|
if (!inibSDreading) { // if currently delaying, don't read a line
|
|
|
if (btnFile.available()) {
|
|
|
buf = btnFile.readStringUntil('\n');
|
|
|
-
|
|
|
+ Serial.println("readline");
|
|
|
//check selector (1st word of line) and execute corresponding function
|
|
|
String selector = getSubstring(buf, ' ', 0);
|
|
|
//Serial.println(selector);
|
|
@@ -107,6 +107,16 @@ bool readSDFile() {
|
|
|
lustre_stepBrightness = constrain( abs((lustre_targetBrightness - lustre_currentBrightness)) / (float)((fadeTime.toInt()+1)/refreshRate), 0, 255) ;
|
|
|
if(lustre_currentBrightness > lustre_targetBrightness) { lustre_stepBrightness *= -1 ;}
|
|
|
}
|
|
|
+ Serial.print ("LEDS : zone ");
|
|
|
+ Serial.print (zone);
|
|
|
+ Serial.print (" - palette ");
|
|
|
+ Serial.print (palette);
|
|
|
+ Serial.print (" - brightness : ");
|
|
|
+ Serial.print (lustre_targetBrightness);
|
|
|
+ Serial.print (" - fade time : ");
|
|
|
+ Serial.print (fadeTime);
|
|
|
+ Serial.print (" - steps : ");
|
|
|
+ Serial.println (lustre_stepBrightness);
|
|
|
|
|
|
|
|
|
}
|
|
@@ -118,17 +128,18 @@ bool readSDFile() {
|
|
|
table_targetBrightness = bright.toInt();
|
|
|
table_stepBrightness = constrain( abs((table_targetBrightness - table_currentBrightness)) / (float)(fadeTime.toInt()/refreshRate), 1, 255) ;
|
|
|
if(table_currentBrightness > table_targetBrightness) { table_stepBrightness *= -1 ;}
|
|
|
- }
|
|
|
Serial.print ("LEDS : zone ");
|
|
|
Serial.print (zone);
|
|
|
Serial.print (" - palette ");
|
|
|
Serial.print (palette);
|
|
|
Serial.print (" - brightness : ");
|
|
|
- Serial.print (lustre_targetBrightness);
|
|
|
+ Serial.print (table_targetBrightness);
|
|
|
Serial.print (" - fade time : ");
|
|
|
Serial.print (fadeTime);
|
|
|
Serial.print (" - steps : ");
|
|
|
- Serial.println (lustre_stepBrightness);
|
|
|
+ Serial.println (table_stepBrightness);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
//Serial.println("Led mode " + getSubstring(buf, ' ', 1));
|
|
@@ -172,7 +183,7 @@ bool readSDFile() {
|
|
|
//delay(wait.toInt());
|
|
|
}
|
|
|
|
|
|
- else if (selector == ""){}
|
|
|
+ //else if (selector == ""){}
|
|
|
|
|
|
else {
|
|
|
Serial.print(selector);
|
|
@@ -185,8 +196,9 @@ bool readSDFile() {
|
|
|
else {
|
|
|
Serial.println("EOF");
|
|
|
inibSDreading = true;
|
|
|
+ Serial.println(inibSDreading);
|
|
|
// btnFile.close();
|
|
|
- EvtResetButtonContext();
|
|
|
+ //EvtResetButtonContext();
|
|
|
|
|
|
|
|
|
}
|