separate convesions from the main source to allow test builds
extra unit to verify that both duration plain input and
spec work as intended
also fix wdt triggered when unknown symbols are encountered at the end
of duration string (e.g. 10000y)
if data size and crc are ok, make sure to notify the caller
rework parameter injection and make sure endianess is right
auto-calibration and range are both a setting and a build flag
amend b8921b9a89
* customize our multipliers. accuracy is a generic multiplier, mostly
depends on the environment temperature (see datasheet). sensitivity is
a ratio between the currently set mtreg value and the default
e.g. for mtreg 31, sensitivity is .45; for mtreg 69, sensitivity is 1.
* non-blocking pre(); since we have tick(), just wait until the reading
is available instead of stopping everything else in the sensor loop
* more specific error state when we are not ready to return a value
c/p PSTR attribute from Core files
dostring declaration with a macro instead of a scary looking boilerplate
saves varying amount of code space, mostly deals with our key and cmd strings
* stateless callbacks for mqttRegister. no module uses the lambda / std
func with captures or otherwise, so it is kind of pointless to have it
* make sure we know topic and payload length at all invocations and
not constantly trying to re-parse the same string over and over again
* clean-up api related to string parsing and make sure we allow
stringview as input
* clean-up id / unsigned number parsing to work with views instead of
using a generic strto{,u}l; sometimes this works, sometimes doesn't.
as noticed previously with IR implementation, it *will* parse until
the '\0' is found in the input and we can't interpret parts of the
string without doing a copy for the strtoul
* fixing additional bugs caught in ifan, leds, sensors and lights that
were causing build failures. plus, more range-based parsing code for
the same reason as described above
- setup uart at boot instead of delaying until some module needs it
removes global `SERIAL_BAUDRATE` and `DEBUG_PORT` in favour or
globally accessible numbered port configurations with `MODULE_NAME_PORT`
- automagically enable uart support for sensors that need it
- allow every sensor to configure uart0 (normal and swapped), uart1
and an optional software-serial mode support with an extra build flag
remove individual includes across the sensors
- settings queries and runtime port configuration (prefixed with uart)
- update dependencies header to cross-reference used ports at build time
- update deprecations header with serial baudrate notice
- clean-up comparison routines and get rid of most of the casts
- reduces total number of calls to terminalRegisterCommand
replace with a func accepting list of commands, which in
turn get instantiated as constexpr PROGMEM arrays
- reduce ram fragmentation, since we don't need to alloc as much
- reduce flash consumption b/c of lambda -> standalone func conversion
get rid of board module, replace with system calls for hostname, board
and password. move boot (quirks) handlers to system as well
espurna::build { ... } namespace for our app const values
rework more namespaces to use `espurna` root
makes internal references much easier (and shorter)
view class is not specific to settings, could use it across the app
remove duplicate code from IR
- store latest pzem reading and compare with the latest one each reading
- fix `Energy::Energy(double)` scale, it should be kWh and not Wh
- move watt-second accumulator to constructor, allow object addition
resolves#2500resolves#2523
- fixing default config values, make sure we take inputs into
an account and not assume we stay in the 0.0...1.0 range
- use shelly values from tasmota analog sensor impl
- handle edgecase when both resistances are zeroed
- clearer description of available connection schemes
in theory, there is also an option of having *both* up and down
resistors at the same time; right now we simply deduce NTC position by
making it an opposite of resistance. ldrsensor implementation currently
allows to explicitly set sensor position
One namespace for sensor functions and types.
Fix discrepancy between topic and indexed topic funcs.
Energy types fixes, make sure we use known ratios.
Sensor fixes, moving certain pin settings and defaults into the sensor
classes, using those in the actual sensor init code.
Energy is still within the sensor module, pending version bump before moving.
proper support for both conversion directions
ratio object stores the scaling, no need to deduce it through the enum
name anymore
we still don't really enforce incompatible units, though,
but it is unclear at what stage the error should come in
schedule immediately with module functions, don't wait
more flash-strings in the module and utility functions
support rare condition when body cannot be sent on connect, use poll to send it
don't wait for header line in body, and bail out when done parsing
make sure data is copied into the async variant, and remains there for
the duration of the connection
general async api is... more complicated that it needs to be
until wolfssl / brssl port is here, though, there is no other choice
secureclient config becomes a simple struct, pending further rework
generalize topic and value representation
breaking change for rpn, since the magnitude *may not* be indexed
also fixes debug logs, where we would always see units of the 1st
magnitude instead of the one being processed
stronger time types, overrides
init underlying lib object as a member
this might be changed to unique_ptr, in case we really want begin() to
be idempotent and being able to re-init things
(which might not be actually possible?)