updated structure, overrides. strong time type
testing timesource changes. this should work, but might need to tweak
things if it starts to fail b/c of flash code loads
use bitset when locking, avoid manual index & mask calculation
update check() to use boolean logic instead of returning int status
remove wip address-range, just use the {begin, end} pair
uint8_t instead of unsigned char when dealing with data
Avoid confusion between ref and pointer when looping over sensors
Re-use helper class in the magnitude object as well
Remove custom code related to filter movement, just use unique_ptr
Plus, updates filter code to use stl vector where possible
Experimening with dynamic cls id. Perhaps this should be something
else... but, at least there are no longer any header-defined values.
Added support for Itead Sonoff POW R3 (https://itead.cc/product/sonoff-powr3/)
This device is essentially the same as the POW R2, except:
- the relay is a normally closed type,
- the current and power ratings of the device are higher.
amends e51e259f02
fixing incorrect conversion from kelvin, and also add full
conversion from possible farenheit source (if that ever happens)
experimenting with the idea of unit conversion... while a table-like
approach will work and will be slightly shorter, it would not have the
specific type checks and constexpr still does not play well with lambdas
plus, any conversion function referenced as a pointer will not really
be a constexpr (...and still require c++17 to work correctly when iterating)
cursor no longer calculates 'offset' but stores the absolute position
this also helps not introducing that specific math to the outside code
more const-correctness fixes and general accessors instead of plain structs
access and modification, where specific ctor or helper method should've
been used instead
Restore behaviour from dd12251e437ba1283024 unintentionally removed it
Instead of reverting to the 'atof' code, just use the provided string
as-is via RawJson (aka `serialized()` in the v6)
Note that the old approach may have caused some silent data loss b/c the
data could have been stored in 'double' or 'u64', where the ArduinoJson
only stores 'u32' and 'float' in it's internal buffer and does not (really)
warn us about any type incompatibilities.
(at least by default. but, the alternative is to store all floating point
numbers as 'double' internally, see ArduinoJson/Configuration.hpp)
resolves#2503
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
Cursor is in a weird spot, by being both the pointer to the data and the
read-range that is used of specify the range in which we operate
Next TODO would be to move even more things to 'const', but that would
at least require to rework the cursor object and also remove it from the
members list.
Also, try to fix the API helper objects to persist the referenced struct
(best effort only, though, it is still possible to break things when not careful)