Relays list is indexed through the LED ids, don't use relayCount()
Also delay the LED update until the status actually changes, b/c
the relayStatus() value is used.
resolve#2436
Fix not resetting the lock when checking the size.
Don't lock in the boot and in the processing, both are executed in CONT
context. Still lock the relaySync() itself, since it will call relayStatus().
This goes back to the original implementation, but does not seem to be
relevant right now.
SDK status is an unreliable source of info even when connecting.
Make sure to register both GotIp and onDisconnected and wait for the
events in the wait-loop, checking which one arrived first.
Plus, make sure the connection task object was actually created, before
proceeding with the connect-loop.
- reduce info lines on boot
- more compact `info` command. show versions, modules and crash info when there is one
- add `storage` command to display flash layout (experimental)
- display full chip id aka MAC, including the oui
- fix telnet never printing the crash data b/c telnet in not yet authorized
- fix eeprom size not reflecting the space used by the backup sectors
- use static flash strings when possible for the fw info
Perform actual checks in the connect() method.
Make sure empty SSID, too-big SSID, too-small or too-big passphrases fail it and force a retry.
Fixes the comment that claimed the WiFi.begin() result was checked...
Local copy of the ::begin, since it is easier to work with the SDK API directly.
- more static flash strings and flash string formats
- println() will write \r\n when we mostly just use the \n
(and avoid mixing it up in the same function)
* basic json api - get all schedules
* rename func and change check func
* added _setKey helper funcs and add schedule api
* added specific schedule control
* removed unnecessary include
* fixed according to comments: removed redundent std::moves and switched to build namespace when possible
- replace JustWifi with a custom WiFi module
- re-implemented Core methods that deal with scanning, directly work with the SDK callback
- re-implemented Core method for opmode to avoid dealing with the 2.7.x pseudo modes
- re-implemented Core method for forced-(modem)-sleep (with the intention to merge with OpmodeNull... todo)
- disable reconnect and autoconnect from SDK, avoid unintentionally storing ssid & pass for these and
make connection routine watch for events instead. timeout is implemented as a local timer
- do not store runtime data that can be retrieved via SDK calls
- settings are loaded only when starting AP or STA, networks are no longer kept in memory
- settings STA ssidN must be unique
- remove char buffer from the event callback
- trigger station-disconnected event when actually disconnected, not when connecting or explicitly requesting it
- generic rssi sorting method for initial connection, do rssi checks while connected to find a better network
Drop (temporarily?) wps and smartconfig. Both are implementable with the new approach,
but come with some weird expectations from the SDK side (no extra heap with wps, broadcasting plain-text
passphrase with smartconfig, storing station config implicitly, etc.).
Both are sort-of fixed with RTOS SDK, but it is still a big question of whether to support them at all in the current state.
Namespace build configurations of modules, make more things into constexpr
(not fully finished though)
Unify code using ...Count() to parse IDs
Avoid using unsigned char aka uint8_t as index, prefer size_t
as most code already uses it anyway. Making sure we never accidentally
truncate the value or try to read it as 32bit-wide. Also, simplify
access to built in containers, since those use the wide type as well.
Renames led and button types, more consistent initialization and field access.
Move inline classes into a separate file.
Make serialize() into a basic function, support numeric conversions with base option
Refactor numeric conversions and add some more helper functions for the
build flags.
Send out keys as schema, fill given template based on the 4 common input types.
Also, refactor relayLastSch into schRestore and move into the schedule template.
Moving relayCount to a wide int, this will probably not build...