- 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
sync and async dns functions for both terminal and this
both use callbacks with IPAddress helper instead of using ip_addr_t
(at least, for now. seems like it is in need of our own wrapper, too)
- fix initialization routine to auto-select appropriate port between
either hardware-only serial or hardware-plus-software serial
both depend on which TX and RX pins are selected
- allow to use 'swapped' uart0 mode with pinx 13 and 15
- software serial is no longer forced upon the user, setup depends on
which tx and rx are used in config
- allow to either send or receive data as HEX strings
mqtt received `616263` gets written as `abc` and vice versa
- (optional) send termination byte when writing to serial
avoid weird conversion from string -> time_t -> string
remove magic inline macros converting string value to time_t.
instead, just pick specific string regions and explicitly constexpr'ify conversion
(ref. https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html)
ntp could lose the value, since we never use it properly
(although, ctime functions do; it is rather tricky with timezones, though)
nofuss could use any value, might as well use the string that is already
provided by the compiler that has the same property as the used timestamp
One server implementation instead of two, plus simplify I/O operations
scheduling by processing everything in loop regardless of the server
type used.
Make it possible to accept authorization and several commands in a
single packet. If we fail the check, clients discards rest of the data.
Since we finally track connection state, debug info gets set *only* to
authorized clients.
effectively, same thing as `const __FlashStringHelper*`
but, we know the actual size at build time vs. calling `strlen_P`
can't specialize the way things are read until v6; current implemenation
simply attaches arbitrary char pointer to the internal buffer, which is
then read byte-by-byte when writing output json stream
revert to static json buffer class in `/discovery`
will move more things to it, but probably should move to v6 first
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
ref. 8ceeebdb24
does not really do much, just causes yet another 'why does this driver
ignores pin 1 or 3' question by anyone trying to use buttons or relays
since we configure pins on per-driver basis and dont have global
'roles' assigned to each pin, it is pretty tricky to understand every
other dependency coming in at setup() time. right now, first one wins.
a bit more complex pre-setup() dependency resolution could also work,
and some concept that we depend on uart as peripheral and not just some pins
Totally breaks on unicode input.
Main reason to add this in the first place was handling of
terminal escape sequences, but perhaps it would be better off to do
that on another layer.
For example, <Backspace> will inject an invisible symbol into the resulting
'chunk', at least one other thing to do is to validate after we append
things into an 'argv' that it at least looks like some kind of text.
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'.
implementation is a bit clunky, since WIFISERVER seems to be working
much slower with (or because?) of no-delay
pending some changes so we *always* schedule telnet comms in the loop
(which also would leave just one SERVER option, and also enable encryption)
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.
cannot depend on checkprogsize, since it depends on .elf and not .bin
also, compare with the block-aligned size
add notes about reserved space
warning might become annoying, though :)