Pārlūkot izejas kodu

ExtShow working and shell script for updating ESP

Emil 3 gadi atpakaļ
vecāks
revīzija
15def15598
4 mainītis faili ar 5 papildinājumiem un 4 dzēšanām
  1. 1 0
      ota.sh
  2. 2 2
      src/LightCluster.cpp
  3. 1 1
      src/LightCluster.h
  4. 1 1
      src/main.cpp

+ 1 - 0
ota.sh

@@ -0,0 +1 @@
+curl -F 'update=@.pio/build/esp32doit-devkit-v1/firmware.bin' http://192.168.1.170/admin/doUpdate

+ 2 - 2
src/LightCluster.cpp

@@ -5,8 +5,8 @@
 #include "LightCluster.h"
 #include "main.h"
 
-bool LightCluster::runAnimation() {
-    if (shouldRun()) {
+bool LightCluster::runAnimation(bool force = false) {
+    if (shouldRun() || force) {
         //Serial.println("Animation begin");
         //delay(100);
         animationObject->runAnimation(animationNumber);

+ 1 - 1
src/LightCluster.h

@@ -23,7 +23,7 @@ public:
     bool useMaxBrightness;
     uint8_t brightness = 255;
 
-    bool runAnimation();
+    bool runAnimation(bool force);
     void changeAnimation(int newAnimationNumber);
 
     LightCluster(light *incomingLights, int size, int animation, Animations *animationObject);

+ 1 - 1
src/main.cpp

@@ -625,7 +625,7 @@ void loop() {
 
     bool hasRun = false;
     for (int i = 0; i < numClusters; i++) {
-        hasRun = hasRun || clusters[i]->runAnimation();
+        hasRun = hasRun || clusters[i]->runAnimation(extShow);
     }
     if (hasRun || extShow) {
         noInterrupts();