Small fixes
This commit is contained in:
parent
5a34353a32
commit
f7950c417f
18
ToDo.txt
18
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.....
|
||||
5)
|
||||
@ -104,7 +104,7 @@
|
||||
"size": 168,
|
||||
"chip": "SK6812",
|
||||
"rgb-order": "rgb",
|
||||
"shift":-42,
|
||||
"shift":-52,
|
||||
"offset": 0,
|
||||
"power-div": 0,
|
||||
"i2s-ch": 0,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"boardfile": "/boards/board15.json",
|
||||
"configfile": "/booths/helio-posh.json"
|
||||
"configfile": "/booths/roamer-big.json"
|
||||
}
|
||||
@ -8,7 +8,8 @@
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -410,7 +410,6 @@ void firmwareUpdateTask(void* parameter) {
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
|
||||
void startVersionCheckTask() {
|
||||
if(versionCheckTask_Handle != NULL) {
|
||||
ESP_LOGW(TAG, "Version Check Tak already running");
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
|
||||
14
src/main.cpp
14
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user