Zeige aktuelle Konsole auch an, wenn sie via MQTT geschaltet wurde.
This commit is contained in:
parent
dbd05e4408
commit
206e043bd8
|
@ -266,6 +266,12 @@ bool switchHandler(const HomieRange& range, const String& value) {
|
||||||
swSer.write(commandbytes[1]);
|
swSer.write(commandbytes[1]);
|
||||||
swSer.write(commandbytes[2]);
|
swSer.write(commandbytes[2]);
|
||||||
swSer.write(commandbytes[3]);
|
swSer.write(commandbytes[3]);
|
||||||
|
// Zeige aktuelle Quelle auf dem Strip an
|
||||||
|
strip.None();
|
||||||
|
strip.clear();
|
||||||
|
strip.show();
|
||||||
|
strip.colorBox(commandbytes[1]-128, strip.Color(255, 255, 255));
|
||||||
|
strip.show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -338,6 +344,7 @@ void loop() {
|
||||||
ArduinoOTA.handle();
|
ArduinoOTA.handle();
|
||||||
|
|
||||||
while (swSer.available() > 0) {
|
while (swSer.available() > 0) {
|
||||||
|
ArduinoOTA.handle();
|
||||||
lastMillis = millis();
|
lastMillis = millis();
|
||||||
int r1 = swSer.read();
|
int r1 = swSer.read();
|
||||||
Serial.print(currentnumber);
|
Serial.print(currentnumber);
|
||||||
|
@ -363,15 +370,8 @@ void loop() {
|
||||||
// Zeige aktuelle Quelle auf dem Strip an
|
// Zeige aktuelle Quelle auf dem Strip an
|
||||||
strip.None();
|
strip.None();
|
||||||
strip.clear();
|
strip.clear();
|
||||||
// for (int j=0;j<NUMPIXELS;j++)
|
|
||||||
// {
|
|
||||||
// strip.setPixelColor(j, strip.Color(0, 0, 0));
|
|
||||||
// }
|
|
||||||
strip.show();
|
strip.show();
|
||||||
strip.colorBox(inputbytes[1]-128, strip.Color(255, 255, 255));
|
strip.colorBox(inputbytes[1]-128, strip.Color(255, 255, 255));
|
||||||
// strip.setPixelColor((inputbytes[1]-128)*3, strip.Color(255, 0, 0));
|
|
||||||
// strip.setPixelColor((inputbytes[1]-128)*3+1, strip.Color(255, 0, 0));
|
|
||||||
// strip.setPixelColor((inputbytes[1]-128)*3+2, strip.Color(255, 0, 0));
|
|
||||||
strip.show();
|
strip.show();
|
||||||
|
|
||||||
currentnumber = 0;
|
currentnumber = 0;
|
||||||
|
|
Loading…
Reference in New Issue