adding hints for the compiler for optimization.
In case your custom build complains about "const", just remove the keyword. based on e82f38e277, but going further :-)
* "const" class functions : function does not modify any class attributes ( --> "this" becomes const)
* __attribute__((pure)) : function return value depends only on the parameters and/or global variables. The function does not modify any global or static variables.
* __attribute__((const)) : function only examines arguments (no globals), and has no effects except the return value. This slightly more strict than "pure"
* hot: tells the compiler "this functions is called very often"
* cold: the opposite of hot
it seems that reading/writing "larger" files from LittleFS causes LED flickering.
This change adds a simple cache for "file not found" results, so that repeated file.exists() calls are avoided.
* fix compiler warnings (uninitialized vars, ambiguous functions calls)
* restore some lost function prototypes
* avoid negative pixel indices
* only use "fast" color_add when there is no risk of "overshooting" results
* minor optimizations
* adding suspendPlaylist() to playlist engine code
* autoplaylist usermod calls suspendPlaylist() before switching to another preset
* fix a potential overflow on `lfc` (uint8_t -> uint16_t)
.... actually we undo gamma adjustments, because screens (laptop, pad, etc) will apply their own gamma corrections.
Activate in LED settings: "Use Gamma correction for preview"
Colors in WLED are sometimes gamma corrected, sometimes not. This change tries to make the best out of the color mess, but its still not working properly in all configurations.
* Initial checkin for ESP-NOW remote feature
* cleanup irrelevant comment
* don't bring in espnow package includes when feature disabled
* Formatting and removing inaccurate call mode hardcoding
* Fork ESP Now code by platform (8266 v. esp32)
* compiled html update
* Disable ESP-NOW remote by default on ESP32 until tested
* Enable ESP-NOW remote for ESP32
* Rename ESP NOW define
---------
Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
* it seems that NPB is very sensitive when being interrupted during LEDs driving. This change tries to avoid flash (file) writes when the strip is active.
* minor optimization: yield is completely unnecessary on ESP32 (we have a real OS).
* make local functions "static"
* use fast_ int types where possible
* use native min/max instead of MIN/MAX macros. Macros evaluate each parameter TWICE!!
* adding __attribute__((pure)) and __attribute((const)) to help the compiler optimize
* ws.cpp: reduce max "live leds" in fastpath mode
* use _fast_ integer types in loops - in contrast to "uint16_t" etc, the compiler can leave out range/overflow corrections, so it might run faster.
* fcn_declare.h: revive "WLED_USE_REAL_MATH" option, which can be a bit faster on ESP32.
usermod_mpu6050_imu.h and usermod_temperature.h:
- remove bool enabled = false/true (now default false)
- remove static const char _name[] and _enabled[]
- add constructor which calls superclass (temp?)
- replace _enabled with "enabled"
- remove const char PROGMEM init for _name[] and _enabled[]
settings_um.htm:
- Add usermod table with class properties (name and enabled) -> WIP as not all UM's now and enable will be checkbox ? (compare with info tab...?)
fcn_declare.h
- add _name and enabled to Usermod class and add name to constructor
usermods_list.cpp
- add Usermod name to constructor for mpu6050 and temperature)
- to do add enabled is true to constructor
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
- rename replaceOption to rOption
- rename removeOptions to dOptions
- set oAppend buffer size back to 3096
- WLEDMM warning on settings2D Populate
- add AppendConfig per usermod
- add request parameter to getSettinsJS
- add lookupName