-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Live Script refactors, use bool3State, add wrover build, and more
pio.ini - ESPAsyncE131: back to standard v1.0.3 (WIP) - ESPLiveScript: use ewowi fork to control latest version and add pending PR's - Add wrover build SysModUI - initCheckBox by reference: use bool3State - initValue: don't need varFun to do initValue (as also without pointers must be set) SysModWeb: - use 192.168.1 in curl examples (thx to the club lights 12 pro ;-) ), use pid,id in curl examples StarJson - lookFor: add uint8_t, comment uint16_t and int as not used at the moment UserModLive - rename addExternals to addDefaultExternals - compile without progName parameter - replace taskExists with findExecutable - execute(BackGround)Task and killAndDelete using exeID instead of fileName (faster) - xecute(BackGround)Task add main as default function - executeTask add optional int Argument - script var: check if fileNr != UINT8_MAX, don't compile again if already in memory, execute only if compile successful, use BackGroundTask - scripts columns: use vector iterators - add size column - addDefaultExternals: init scPreBaseScript - compile: return exeID, executable as stack var UserModMPU6050 - use bool3State
- Loading branch information
Showing
10 changed files
with
156 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,8 @@ lib_deps = | |
build_flags = | ||
-D STARBASE_USERMOD_E131 | ||
lib_deps = | ||
https://github.com/forkineye/ESPAsyncE131.git#9655aae7 ; no tag #v1.0.3 as commits after these tags exists | ||
https://github.com/forkineye/ESPAsyncE131.git#v1.0.3 | ||
; https://github.com/forkineye/ESPAsyncE131.git#9655aae7 ; no tag #v1.0.3 as commits after these tags exists | ||
|
||
[STARBASE_USERMOD_HA] | ||
build_flags = | ||
|
@@ -70,7 +71,8 @@ lib_deps = | |
build_flags = | ||
-D STARBASE_USERMOD_LIVE | ||
lib_deps = | ||
https://github.com/hpwit/ESPLiveScript.git#5928b9d ;v2.9.3 @ 20241027 18:40 | ||
; https://github.com/hpwit/ESPLiveScript.git#17b4bb7 ;v2.9.3 @ 20241030 15:39 | ||
https://github.com/ewowi/ESPLiveScript.git#v2.9.3 ;ewowi repo adds some proposed PR's and makes sure we don't have unexpected updates | ||
|
||
[STARBASE] | ||
build_flags = | ||
|
@@ -143,6 +145,23 @@ build_flags = | |
lib_deps = | ||
${env.lib_deps} | ||
|
||
; https://github.com/platformio/platform-espressif32/issues/1360 | ||
; https://community.platformio.org/t/support-esp32-wrover-module/17717 | ||
; note: flasghing to new board goes wrong, try first without ICVD then with and without etc until it works (witchcraft) | ||
[env:esp32_wrover] | ||
board = esp-wrover-kit ; esp-wrover-kit ;https://github.com/platformio/platform-espressif32/blob/develop/boards/esp-wrover-kit.json | ||
; recommended to pin to a platform version, see https://github.com/platformio/platform-espressif32/releases | ||
platform = [email protected] ;using platformio/framework-arduinoespressif32 @ ~3.20014.0 / framework-arduinoespressif32 @ 3.20014.231204 (2.0.14) | ||
upload_speed = 1500000 | ||
build_flags = | ||
${env.build_flags} | ||
-D CONFIG_IDF_TARGET_ESP32=1 | ||
-D ARDUINO_USB_CDC_ON_BOOT=0 ; Make sure that the right HardwareSerial driver is picked in arduino-esp32 (needed on "classic ESP32") | ||
-DBOARD_HAS_PSRAM | ||
-mfix-esp32-psram-cache-issue | ||
lib_deps = | ||
${env.lib_deps} | ||
|
||
|
||
[env:pico32] | ||
board = pico32 ;https://github.com/platformio/platform-espressif32/blob/develop/boards/pico32.json | ||
|
@@ -237,7 +256,7 @@ platform = [email protected] ;default is Espressif 32 (6.5.0) | |
; platform = espressif32@ ~6.3.2 ; WLEDMM: | ||
; platform = platformio/espressif32@^6.7.0 ;TroyHacks: | ||
; platform_packages ;default is framework-arduinoespressif32 @ 3.20014.231204 (2.0.14) | ||
; WLEDMM: platformio/framework-arduinoespressif32 @ 3.20009.0 ;; select arduino-esp32 v2.0.9 (arduino-esp32 2.0.10 thru 2.0.14 are buggy so avoid them) | ||
; WLEDMM: platformio/framework-arduinoespressif32 @ 3.20009.0 ; select arduino-esp32 v2.0.9 (arduino-esp32 2.0.10 thru 2.0.14 are buggy so avoid them) | ||
; TroyHacks: platformio/[email protected] | ||
; ;toolchain-riscv32-esp@~12.2 | ||
; ;toolchain-xtensa-esp32s3@~12.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,13 +209,13 @@ void SysModWeb::connectedChanged() { | |
|
||
|
||
// ppf("%s server (re)started\n", name); //causes crash for some reason... | ||
ppf("server (re)started\n"); | ||
ppf("connectedChanged: web server (re)started %s \n", name); | ||
} | ||
//else remove handlers... | ||
} | ||
|
||
//WebSocket connection to 'ws://192.168.8.152/ws' failed: The operation couldn’t be completed. Protocol error | ||
//WS error 192.168.8.126 9 (2) | ||
//WebSocket connection to 'ws://192.168.1.152/ws' failed: The operation couldn’t be completed. Protocol error | ||
//WS error 192.168.1.126 9 (2) | ||
//WS event data 0.0.0.0 (1) 0 0 0=0? 34 0 | ||
//WS pong 0.0.0.0 9 (1) | ||
//wsEvent deserializeJson failed with code EmptyInput | ||
|
@@ -476,7 +476,7 @@ void SysModWeb::serveNewUI(WebRequest *request) { | |
|
||
void SysModWeb::serveUpload(WebRequest *request, const String& fileName, size_t index, byte *data, size_t len, bool final) { | ||
|
||
// curl -F '[email protected]' 192.168.8.213/upload | ||
// curl -F '[email protected]' 192.168.1.213/upload | ||
ppf("serveUpload r:%s f:%s i:%d l:%d f:%d\n", request->url().c_str(), fileName.c_str(), index, len, final); | ||
|
||
mdl->setValue("Files", "upload", index/10000); | ||
|
@@ -530,7 +530,7 @@ void SysModWeb::serveUpload(WebRequest *request, const String& fileName, size_t | |
|
||
void SysModWeb::serveUpdate(WebRequest *request, const String& fileName, size_t index, byte *data, size_t len, bool final) { | ||
|
||
// curl -F '[email protected]' 192.168.8.213/upload | ||
// curl -F '[email protected]' 192.168.1.213/upload | ||
// ppf("serveUpdate r:%s f:%s i:%d l:%d f:%d\n", request->url().c_str(), fileName.c_str(), index, len, final); | ||
|
||
mdl->setValue("System", "update", index/10000); | ||
|
@@ -711,7 +711,7 @@ void SysModWeb::serializeState(JsonVariant root) { | |
|
||
} | ||
void SysModWeb::serializeInfo(JsonVariant root) { | ||
const char * jsonInfo = "{\"ver\":\"0.14.1-b30.36\",\"rel\":\"abc_wled_controller_v43_M\",\"vid\":2402252,\"leds\":{\"count\":1024,\"countP\":1024,\"pwr\":1124,\"fps\":32,\"maxpwr\":9500,\"maxseg\":32,\"matrix\":{\"w\":32,\"h\":32},\"seglc\":[1],\"lc\":1,\"rgbw\":false,\"wv\":0,\"cct\":0},\"str\":false,\"name\":\"WLED-Wladi\",\"udpport\":21324,\"live\":false,\"liveseg\":-1,\"lm\":\"\",\"lip\":\"\",\"ws\":2,\"fxcount\":195,\"palcount\":75,\"cpalcount\":0,\"maps\":[{\"id\":0}],\"outputs\":[1024],\"wifi\":{\"bssid\":\"\",\"rssi\":0,\"signal\":100,\"channel\":1},\"fs\":{\"u\":20,\"t\":983,\"pmt\":0},\"ndc\":16,\"arch\":\"esp32\",\"core\":\"v3.3.6-16-gcc5440f6a2\",\"lwip\":0,\"totalheap\":294784,\"getflash\":4194304,\"freeheap\":115988,\"freestack\":6668,\"minfreeheap\":99404,\"e32core0code\":12,\"e32core0text\":\"SW restart\",\"e32core1code\":12,\"e32core1text\":\"SW restart\",\"e32code\":4,\"e32text\":\"SW error (panic or exception)\",\"e32model\":\"ESP32-D0WDQ5 rev.3\",\"e32cores\":2,\"e32speed\":240,\"e32flash\":4,\"e32flashspeed\":80,\"e32flashmode\":2,\"e32flashtext\":\" (DIO)\",\"uptime\":167796,\"opt\":79,\"brand\":\"WLED\",\"product\":\"MoonModules\",\"mac\":\"08b61f6fa800\",\"ip\":\"192.168.8.171\"}"; | ||
const char * jsonInfo = "{\"ver\":\"0.14.1-b30.36\",\"rel\":\"abc_wled_controller_v43_M\",\"vid\":2402252,\"leds\":{\"count\":1024,\"countP\":1024,\"pwr\":1124,\"fps\":32,\"maxpwr\":9500,\"maxseg\":32,\"matrix\":{\"w\":32,\"h\":32},\"seglc\":[1],\"lc\":1,\"rgbw\":false,\"wv\":0,\"cct\":0},\"str\":false,\"name\":\"WLED-Wladi\",\"udpport\":21324,\"live\":false,\"liveseg\":-1,\"lm\":\"\",\"lip\":\"\",\"ws\":2,\"fxcount\":195,\"palcount\":75,\"cpalcount\":0,\"maps\":[{\"id\":0}],\"outputs\":[1024],\"wifi\":{\"bssid\":\"\",\"rssi\":0,\"signal\":100,\"channel\":1},\"fs\":{\"u\":20,\"t\":983,\"pmt\":0},\"ndc\":16,\"arch\":\"esp32\",\"core\":\"v3.3.6-16-gcc5440f6a2\",\"lwip\":0,\"totalheap\":294784,\"getflash\":4194304,\"freeheap\":115988,\"freestack\":6668,\"minfreeheap\":99404,\"e32core0code\":12,\"e32core0text\":\"SW restart\",\"e32core1code\":12,\"e32core1text\":\"SW restart\",\"e32code\":4,\"e32text\":\"SW error (panic or exception)\",\"e32model\":\"ESP32-D0WDQ5 rev.3\",\"e32cores\":2,\"e32speed\":240,\"e32flash\":4,\"e32flashspeed\":80,\"e32flashmode\":2,\"e32flashtext\":\" (DIO)\",\"uptime\":167796,\"opt\":79,\"brand\":\"WLED\",\"product\":\"MoonModules\"}"; | ||
JsonDocument docInfo; | ||
|
||
deserializeJson(root, jsonInfo); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,18 +87,18 @@ class SysModWeb:public SysModule { | |
void serveJson(WebRequest *request); | ||
|
||
|
||
// curl -F '[email protected]' 192.168.8.213/upload | ||
// curl -F '[email protected]' 192.168.1.213/upload | ||
void serveUpload(WebRequest *request, const String& fileName, size_t index, byte *data, size_t len, bool final); | ||
// curl -s -F "update=@/Users/ewoudwijma/Developer/GitHub/ewowi/StarBase/.pio/build/esp32dev/firmware.bin" 192.168.8.102/update /dev/null & | ||
// curl -s -F "update=@/Users/ewoudwijma/Developer/GitHub/ewowi/StarBase/.pio/build/esp32dev/firmware.bin" 192.168.1.102/update /dev/null & | ||
void serveUpdate(WebRequest *request, const String& fileName, size_t index, byte *data, size_t len, bool final); | ||
void serveFiles(WebRequest *request); | ||
|
||
//processJsonUrl handles requests send in javascript using fetch and from a browser or curl | ||
//try this !!!: curl -X POST "http://192.168.121.196/json" -d '{"pin2":false}' -H "Content-Type: application/json" | ||
//curl -X POST "http://4.3.2.1/json" -d '{"pin2":false}' -H "Content-Type: application/json" | ||
//curl -X POST "http://4.3.2.1/json" -d '{"brightness":20, "v":true}' -H "Content-Type: application/json" | ||
//curl -X POST "http://192.168.8.125/json" -d '{"effect":2}' -H "Content-Type: application/json" | ||
//curl -X POST "http://192.168.8.152/json" -d '{"nrOfLeds":2000}' -H "Content-Type: application/json" | ||
//try this !!!: | ||
//curl -X POST "http://4.3.2.1/json" -d '{"Pins.pin19":false}' -H "Content-Type: application/json" | ||
//curl -X POST "http://4.3.2.1/json" -d '{"Fixture.brightness":20, "v":true}' -H "Content-Type: application/json" | ||
//curl -X POST "http://192.168.1.125/json" -d '{"leyers.effect":2}' -H "Content-Type: application/json" | ||
//curl -X POST "http://192.168.1.152/json" -d '{"nrOfLeds":2000}' -H "Content-Type: application/json" | ||
|
||
//handle "v" and processJson (on /json) | ||
void jsonHandler(WebRequest *request, JsonVariant json); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.