Some additions:
pio.ini: add debug entries
cfg.cpp, set.cpp, xml/cpp: keep storing basic 2D setup
index.js: use ledmapFileNames
settings_2D.htm: keep using basic and advanced
FX_2Dfcn.cpp: use gaptable and also MM ledmaps
FX_fcn.cpp: extend enumerateledmaps with AC ledmapNames (but not used in UI)
index.js:
- add ledmapFileNames array and fill with lm.segmentname.json names
- use name in dropdowns and in loadmap
fcn_declare and util.cpp: move enumerateLedmaps to FX.h and FX_fcn.cpp
FX_fcn.cpp: deserializemap: use segment name lednames
index.js:
- add global ledmap variable
- updateLen conditional draw parameter
- draw black out not mapped
json.cpp:
- add "ledmap" in (de)serializeState (not info)
- use loadedLedmap
wled.cpp/h:
- loadLedMap is boolean, use loadedLedmap for ledmap
- show * password
liveviewws2D: colorAmp
settings2D: add id and name, change max to 255
* Additional functions: isPinPWM, isPinINT
* aliases: PM_ADC1 instead of PinManagerClass::ADC1
* make getADCPin work on "classic ESP32"
--> Tested and works on 8266, ESP32 (default platform), ESP32 (V4 Platform). ESP32-S3, ESP32-S2, ESP32-C3
bool isPinTouch(int gpio); // true if gpio supports touch functions
bool isPinAnalog(int gpio); // true if gpio supports analogRead
bool isPinADC1(int gpio); // true if gpio supports analogRead, and it belongs to ADC unit 1
bool isPinADC2(int gpio); // true if gpio supports analogRead, and it belongs to ADC unit 2
#define PM_NO_PIN 255
typedef enum { ADC_none = 0, ADC1 = 1, ADC2 = 2 } AdcIdentifier;
uint8_t getADCPin(AdcIdentifier adcUnit, uint8_t adcPort); // get GPIO number for ADC unit x, channel y. 255 = no such pin
...this was a little innocent comment in the examples provided by the device manufacturer.
It seems that sometimes the WiFi radio does not switch on, and `WiFi.setTxPower(WIFI_POWER_5dBm);` properly initialized the "Raisun".
- show VBAT pin (if board definitely has that feature)
- some WROVER board have cross-connection between GPIO 25/27 and PIN 16/17
- experimental support for boards that have NEOPIXEL_I2C_POWER
got myself an adafruit "qt py -S2" with tinyUF2 bootloader. So I wanted to get that working. And it does work :-).
FFT time = 10ms (instead of 2ms on classic ESP32) is a very good result, also virtual USB runs much better now.
I was wondering why sometimes the new MCUs still work better in Arduino IDE, so compared our build flags to what is used in Arduino IDE:
-S2 always has -DARDUINO_USB_MODE=0
-C3 always has -DARDUINO_USB_MODE=1
-S3 supports all possible modes
- new partition table for boards with UF2 boot (Adafruit qt py S2)
- better treatment of debug out using "USBCDC" native port
- workarounds for watchdog crashes on -S2
- Add missing but mandatory build flags for -S2 and -C3
- switch off debug messages to USBCDC, if WLED_DEBUG is not set
- ensure that analogread pins are valid - invalid pins cause lots of error messages and finally lead to watchdog reset on some MCUs.
wled.h:
- Don't use Serial directly -S2 as S2 serial driver is buggy.
- added USER_FLUSH macro
wled.cpp
- replace fluh with FLUSH
- print ArduionoOTA info (if enabled)
wled_server.cpp:
- added userlog info after file upload.
pinn_manager:
- don't show "(default)" is the PIN is actually assigned to HW drivers
- bugfix for getPinOwner()
- add WLED_NUM_PINS constant, to get rid of magic number "50"
- only show I2S defaults when USERMOD_AUDIOREACTIVE is enabled
- added alternate names for SPI pins
- small correction for -C3
* set.cpp: reject non-ADC pins as analog button pins (bugfix)
* pinmanager:
record conflicts
added getOwnerText(PinOwner tag) and getPinConflicts(int gpio)
GPIO | Assigned to | Info
--------|-----------------------|------------
i/o 0 Button !! Conflict with AudioReactive (UM) !! (default) I2S MCLK
i/o 1 debug output Serial TX
i/o 2 ./. (default) LED pin
i/o 3 ./. Serial RX
i/o 5 ./. (default) SPI SS
i/o 13 Button !! Conflict with IR Receiver !!
PIN ALLOC error: GPIO19 for analog button #2 is not an analog pin!
Improvements for debugging GPIO conflicts. HTML UI integration still pending.
* pinManager can be asked for pin owner (String) and pin special purpose (string).
* wled.cpp: show GPIO allocation when compiling with WLED_DEBUG
* pinmanager: show Pin Owner as name when possible.
The results looks like this
GPIO | Assigned to | Info
--------|-----------------------|------------
i/o 0 Button
i/o 1 debug Serial TX
i/o 2 DMX out
i/o 3 ./. Serial RX
i/o 5 ./. SPI SS
i/o 15 AudioReactive (UM)
i/o 16 LEDs (digital)
i/o 17 Relay
i/o 18 ./. SPI CLK
i/o 19 IR Receiver SPI MISO
i/o 21 I2C I2C SDA
i/o 22 I2C I2C SCL
i/o 23 ./. SPI MOSI
i/o 32 AudioReactive (UM)
* feat(wifi): add compile time configurtation
Add `WLED_AP_SSID` and `WLED_AP_PASS` defines to allow configuring the
SoftAP SSID and Password at compile time. Default to existing values.
Add `WLED_AP_SSID_UNIQUE` flag to append the device portion of the mac
address to `WLED_AP_SSID`.
Exampleof all flags (note the quoting to preserve
"stringification"):
```
build_flags =
-D WLED_AP_SSID='"MyAP"'
-D WLED_AP_PASS='"MyPassword"'
-D WLED_AP_SSID_UNIQUE
```
* Removed two error defines
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
- added "max used PSRAM" info
- moved all mem infos into one part
- only check PSRAM if BOARD_HAS_PSRAM
- oappend: debug message in case that stack buffer is too small.
This is a nice little chip info tool that I've created some time ago.
When building with `-D WLED_DEBUG`, it reports some interesting information about your ESP32 on serial monitor.
````
====================================
Chip info for ESP32-D0WDQ5
SDK: v4.4.1-472-gc9140caf8c
------------------------------------
XTAL FREQ: 40 MHz
APB FREQ: 80.0 MHz
CPU FREQ: 240 MHz
ESP32 DEVICE: ESP32-D0WD-V3 rev.3, 2 core(s), 240MHz.
Chip feature flags: 0b110010
* 0b0000010 Chip has 2.4GHz WiFi
* 0b0001000 Chip has Bluetooth LE
* 0b0010000 Chip has Bluetooth Classic
FLASH CHIP FREQ (magic): 80.0 MHz
FLASH SIZE (magic byte): 4.00 MB
FLASH MODE (magic byte): 2 ; 0=QIO, 1=QOUT, 2=DIO, 3=DOUT or other
FLASH CHIP ID: 0x16405E
FLASH CHIP FREQ: 80.0 MHz
FLASH REAL SIZE: 4.00 MB
FLASH REAL MODE: DIO
------------------------------------
RAM HEAP SIZE: 261.79 KB
FREE RAM: 232.57 KB
MAX RAM alloc: 107.99 KB
ESP32 PSRAM: found.
* SPI RAM Chip availeable: 64MBits = 8MBytes
total PSRAM: 4094 KB
FREE PSRAM: 4093.89 KB
MAX PSRAM alloc:4031.99 KB
used PSRAM: 0 Bytes
* PSRAM free after malloc / ps_malloc : 2833.85 KB
* Can allocate big memory with ps_malloc()
* Can allocate big memory with malloc()
CPU #0 - last reset reason = 1 POWERON_RESET => Vbat power on reset
CPU #1 - last reset reason = 14 EXT_CPU_RESET => APP CPU reset by PRO CPU
====================================
````
This fixes a "division by zero" in WLED_DEBUG code.
LittleFS init seems to take some time, so we can arrive at "Loops/sec" with 0 loops executed --> crash.