* garland: fix issue with division by zero in first scene setup
* garland: update setters code
* garland: fix web UI
* garland: update scene default settings
* garland: update palettes, add random run animation
* garland: enable and update anim_glow
* garland: update anim_spread
* garland: add anim_crossing
* garland: get rid of redundant variables in main class
* garland: provide anims with all palettes
* garland: unify anim_waves and anim_run to use ColorWave class
* garland: update format for color_wave.h and garland.cpp
* graland: update anim code with clear rands and auto counters
* garland: implement pixel caching for color waves to reduce redundant calculations
* garland: fix anim dolphins out of range issue
* garland: tune anim comets
* garland: combine all wave-based anims; add wave comet anim
* garland: fixes for PR notes
- revert to ignoring rgb in color+white+cct case by resetting all its
inputs to minimum and only controlling white channels
- ignore ww and cw in rgb+cct case; use approximated color, thus allowing
us to set a different 'cold temperature' limit
- fix webui layout rules based on root element class(es) and consistent
order for our control elements that does not depend on the order in which
`processData` handles configuration kvs
- internal refactoring to flatten input processing funcs selection
(to possibly replace our boolean flags with a simple list)
register channels with their respective tags, instead of using count
both on backend and frontend
revert to useCCT mireds slider rule, disallow white channels with useWhite
* correct id=... and element references, partial changes to element
order were not using the new global 'light' container
* separate block for picker, does not seem consistent to depend on json
key order when processing device cfg
* visibility != display; make sure color picker is hidden when there is
no color control, but not visible when color is on but state is off
* make sure we don't apply hsv and brightnesss, only take hue and saturation
when calculating inputs. use value as brightness percentage, wrapping
the original function (which also makes other modules use this codepath)
* deduce interface elements based on both setting and incoming
properties. wrap everything in {light: ...} in both inputs and
outputs, alse allow to update multiple properties at the same time
* add light state toggle when special lights relay is not set up
* remove channel, state and brightness elements through css styling
instead of going to the elements directly. no need to chech whether
certain elements exist
Make the buffer work on '\n' instead of a limit, flush asap.
Still using single 'DEBUG' output for both terminal and debug prints;
we no longer have 'pre' and 'msg' distinction - there is just 'msg'.
Make every available call site 'private'
e.g. typing command in telnet no longer prints to serial or WebUI
Serial input is now optional, see `TERMINAL_SERIAL_SUPPORT`.
Telnet using async server is a proper Print implementation now.
WebUI, MQTT and HTTP input is allowed to inject multiple lines at once.
Modernize our helper classes and remove legacy 2.3.0 quirks.
Replace global Terminal object and allow to separately
split, parse ARGV list and perform command search and invocation with
standalone function calls.
(but, notice that we still depend on a globally shared 'commands' list)
This greatly reduces used RAM (but, slightly increases our ROM).
Update our test suite to use namespaces and new calling convention.
removes the extra 'save' button from the ui and the code that handles it
also make sure to use the updated foreach_prefix when looking for the
match in the settings
resolve#2502
Since 'Enter' is also a submit button and another style gets applied,
both seem to overlap. Not very important on a desktop, but might be
easier to navigate on mobile screen
(plus, move settings backup buttons back at the top, accidentally moved
those to the bottom in the previous commit)
On the DEBUG page as well, trying to fix the scrolling behaviour when the
logging stream just started and will only jump after it spends some time at
the top row. Watching the element state to pause the autoscroll when we
manually move the slider, and resume it once the slider touches the bottom
of the textarea. Entering the command will reset the state and enable
the autoscrolling immediately
Make more use of control-groups instead of adding a manual alignment
class to each element. Surprisingly, this is slightly larger than the
previous .gz.html output, but not enough to not consider the readability.
Status page updated to take the lengthy hostnames and version strings
into an account, remove those from the sidebar.
Clean-up terminal module. Use the same style for both input and output,
move the terminal handler and debug handler into an appropriate .cpp
Generate explicit events. Don't have a separate group observer that
tracks deletion, but handle it immediately from the 'button' event
Replace kv array with a direct key updates. While the backed part still
must optimize for size, from this side we should operate on keys directly
Settling on naming 'options' for enumerations (...possibly, everything
else in the future, would that make sense to store for 'setting' object)
Update terminal commands that were reporting status to also report a
full list of 'indexed' settings for the specific entity
Also updates the WebUI outputs which are (hopefuly) are already handled
as-is through the .js processing pipeline and the .html properties
receiving certain special string values
More namespacing and save ~2KiB of RAM by reducing the amount of loaded keys strings
However, ROM side of things may suffer b/c of template specializations for the
generic conversion functions when there are many different types involved.
- remove 'local' index and replace sensor code depending on it with the
existing 'slot' aka 'magnitude index' used in value() and type()
- common method to store and retrieve ratios for voltage, current,
active power and energy. default implementation is no-op, sensor
should implement ratio adjustment & calculations to use 'slot' indexes
- re-implement 'expected' values ui. display the actual ratio values,
and have a separate page for updating them in a more apparent way
- remove legacy settings that were adjusting expected values
- remove legacy settings that were resetting ratios and analog calibration
- generic webui action caller, add ratios and analog calibration resets
all of 'emon' sensors were updated to utilize the new approach to the
ratio handling. pulsemeter is somewhat an outlier, but it is unclear
whether removing the energy ratio is justified
terminal part was also updated
- implement `expected` command that hooks into the new ratioFromValue
(and what webui uses to calculate ratios)
- implement `energy` command to list only MAGNITUDE_ENERGY
- remove old pzem004t commands doing ratio reset and total energy count
another global update is related to espurna::duration
- rework module-local heartbeat and led durations into a global
espurna::duration
- update sensor internals to use specific units instead of multiplying things
on line-by-line basis. export count() to the api
Generic way to find out which units the magnitude type supports.
Clean-up UI related to temperature, energy and power units.
Resolves#2482
Also apply some refactoring to the 'schema'-generated
payloads by using the EnumerableConfig helper class.
Class received some new features:
- optional callback, verifying that index should be used at all
specific use-case is magnitudes list that needs only 'counted' ones
- std::iota / ranges::iota_view -like helper object for sequences
starting with something other than 0
Reordered payloads, prefer queueing over sending everything at once.
Otherwise, some things are still hidden
(or, depend on the order of incoming messages)
Make thermostat code use those as well, instead of injecting
thermostatVisible in every json payload