From f7950c417fd3fc788de0e20fcb9d82dd1d25a6f7 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 25 Mar 2025 15:41:14 -0700 Subject: [PATCH] Small fixes --- ToDo.txt | 18 +++++------------- data/booths/roamer-big.json | 2 +- data/system/system.json | 2 +- include/AppUpgrade.h | 3 ++- src/ATALights.cpp | 19 +++++++++++-------- src/Animations.cpp | 2 +- src/AppUpgrade.cpp | 1 - src/BleServer.cpp | 3 ++- src/main.cpp | 14 +++++++++----- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/ToDo.txt b/ToDo.txt index e2829d2..ac29ba7 100644 --- a/ToDo.txt +++ b/ToDo.txt @@ -1,18 +1,10 @@ -1 - Second Strip Animation - a - How to synchronize the 2 Animation - b - Set Default directions? -2 - Wifi Server +1) OTA switch to Minio -3 - OTA Upgrade +2) Global variable ( Circular or Linear LEDS) -4 - menu - a - file manager & editor - b - wifi credentials - c - firmware update - d - mode selection page - i - booth config and reboot - ii - +3) Long Hold to switch +4) Fix white flasing at booth -anyting new..... \ No newline at end of file +5) \ No newline at end of file diff --git a/data/booths/roamer-big.json b/data/booths/roamer-big.json index 90face0..091b2ce 100644 --- a/data/booths/roamer-big.json +++ b/data/booths/roamer-big.json @@ -104,7 +104,7 @@ "size": 168, "chip": "SK6812", "rgb-order": "rgb", - "shift":-42, + "shift":-52, "offset": 0, "power-div": 0, "i2s-ch": 0, diff --git a/data/system/system.json b/data/system/system.json index d72eb77..83bdb32 100644 --- a/data/system/system.json +++ b/data/system/system.json @@ -1,4 +1,4 @@ { "boardfile": "/boards/board15.json", - "configfile": "/booths/helio-posh.json" + "configfile": "/booths/roamer-big.json" } \ No newline at end of file diff --git a/include/AppUpgrade.h b/include/AppUpgrade.h index 20d5516..8734aad 100644 --- a/include/AppUpgrade.h +++ b/include/AppUpgrade.h @@ -8,7 +8,8 @@ #include #include "AppVersion.h" -#define DEFAULT_MANIFEST_URL "https://storage.googleapis.com/boothifier/latest/" +//#define DEFAULT_MANIFEST_URL "https://storage.googleapis.com/boothifier/latest/" +#define DEFAULT_MANIFEST_URL "https://minio.boothwizard.com/boothifier/latest/" #define BUFFER_SIZE 4096 extern TaskHandle_t Update_Task_Handle; diff --git a/src/ATALights.cpp b/src/ATALights.cpp index cac870d..6de664d 100644 --- a/src/ATALights.cpp +++ b/src/ATALights.cpp @@ -51,7 +51,7 @@ void Lights_Set_Brightness(uint8_t scale){ } void Lights_Set_White(uint8_t val){ - //pwmOut[0]->setOutput(led_status.white / 2.5f); + //pwmOut[0]->setOutput(val / 2.5f); } void Init_Lights_Task(void){ @@ -372,29 +372,32 @@ void Lights_Control_Task(void *parameters){ Anim_Rainbow(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, 30); break; case 2: - Anim_TimedFill(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, CRGB::Black, CRGB::White, 1000, 0); + Anim_TimedFill(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, CRGB::Black, CRGB::White, 1000, ledSettings[0].shift); + whiteTimeout = 20; break; case 3: - Anim_TimedFill(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, CRGB::Black, CRGB::White, 2000, 0); + Anim_TimedFill(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, CRGB::Black, CRGB::White, 2000, ledSettings[0].shift); + whiteTimeout = 20; break; case 4: - Anim_TimedFill(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, CRGB::Black, CRGB::White, 3000, 0); + Anim_TimedFill(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, CRGB::Black, CRGB::White, 3000, ledSettings[0].shift); + whiteTimeout = 20; break; case 5: createFirePalette(firePalette, CRGB::Red, CRGB::OrangeRed, CRGB::Orange); - Anim_Fire(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, 60, firePalette, 0); + Anim_Fire(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, 60, firePalette, ledSettings[0].shift); break; case 6: createFirePalette(firePalette, CRGB::DarkGreen, CRGB::Green, CRGB::LightGreen); - Anim_Fire(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, 60, firePalette, 0); + Anim_Fire(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, 60, firePalette, ledSettings[0].shift); break; case 7: createFirePalette(firePalette, CRGB::DarkBlue, CRGB::Blue, CRGB::LightBlue); - Anim_Fire(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, 60, firePalette, 0); + Anim_Fire(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, 60, firePalette, ledSettings[0].shift); break; case 8: createFirePalette(firePalette, CRGB::Purple, CRGB::Blue, CRGB::Violet); - Anim_Fire(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, 60, firePalette, 0); + Anim_Fire(AnimationLooping, ledSettings[0].leds, ledSettings[0].size, 60, firePalette, ledSettings[0].shift); break; case 9: loadColorPack(colorPack, colorPack_USA); diff --git a/src/Animations.cpp b/src/Animations.cpp index 0b36c2d..a498bed 100644 --- a/src/Animations.cpp +++ b/src/Animations.cpp @@ -463,7 +463,7 @@ void Anim_TimedFill(bool volatile& activeFlag, CRGB* leds, int size, CRGB baseCo for (int i = 0; i < ledsToLight; i++) { pos = (i + shift + size) % size; leds[pos] = fillCol; - leds[size - 1 - pos] = fillCol; // Mirror + leds[(size - 1 - i + shift + size) % size] = fillCol; // Correct mirroring calculation } // Update LEDs only when necessary diff --git a/src/AppUpgrade.cpp b/src/AppUpgrade.cpp index 433886d..cef9f2f 100644 --- a/src/AppUpgrade.cpp +++ b/src/AppUpgrade.cpp @@ -410,7 +410,6 @@ void firmwareUpdateTask(void* parameter) { vTaskDelete(NULL); } - void startVersionCheckTask() { if(versionCheckTask_Handle != NULL) { ESP_LOGW(TAG, "Version Check Tak already running"); diff --git a/src/BleServer.cpp b/src/BleServer.cpp index 358d148..637b717 100644 --- a/src/BleServer.cpp +++ b/src/BleServer.cpp @@ -32,7 +32,8 @@ void Init_BleServer( bool isSP110EActive, bool isUpgradeActive) { ESP_LOGI(tag, "Initializing BLE..."); static bool isInitialized = false; if (!isInitialized) { - NimBLEDevice::init("ATALIGHTS"); + //NimBLEDevice::init("ATALIGHTS"); + NimBLEDevice::init("SP110E-ATA"); //NimBLEDevice::setMTU(247); // Set preferred MTU size (max 247 for BLE) } diff --git a/src/main.cpp b/src/main.cpp index 3e63a62..4b26aef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -155,13 +155,14 @@ void setup() // Initialize BLE if (digitalRead(sys_settings.boardPins.btn[0]) == LOW) { - ESP_LOGW(tag, "Enabling BLE and Update Service"); + ESP_LOGE(tag, "Enabling BLE and Update Service"); Init_BleServer(true, true); ESP_LOGW(tag, "Enabling Wifi AP and Client"); Wifi_Init(); } else { + ESP_LOGE(tag, "Enabling BLE, No Update Service"); Init_BleServer(true, false); // Dont start the Upgrade service } @@ -292,10 +293,13 @@ void loop() #endif // Turn off white light after timeout - if(whiteTimeout > 0){ - whiteTimeout--; - if(whiteTimeout == 0){ - Lights_Set_White(0); + ON_EVERY_N_MILLISECONDS(100) + { + if(whiteTimeout > 0){ + whiteTimeout--; + if(whiteTimeout == 0){ + Lights_Set_White(0); + } } }