Use namespace instead of custom prefix everywhere.
Multiple init() funcs per namespace, instead of one large one for all
of available operators
Continue to apply namespace { ... }
For when scanning is disabled. Remove uniqueness requirement, since
settings may contain multiple SSID with different BSSID values.
wifi::Mac conversion helpers for both xxxxxxxxxx and xx:xx:xx:xx:xx:xx
Shuffle std::vector usage, trying out std::array for static data and
std::unique_ptr where common use-case is reserve / resize + emplace
Also try to workaroud exception string issue with gcc4.8, which should
not be a problem with gcc10.3 coming with Core 3.0.0, but... one solution at a time
Initialize the vector with the values directly, ::reserve(len) instead of ::resize(len) (throught the ctor)
Use assignment when the intent is to replace the target value, not to exchange with something else.
- queue the actual response, as sending immediatly seems to have
inconsistent results with the initial setup page
- allow single string password, just like a normal key
- provide default value for adminPass wsStore variant
- `reload` & `saved` are mutually exclusive
Generate initial connection list with all suitable networks, not only the best ones.
When scanning for a better network, remove results with worse rssi.
Don't remove extra scan results in the delayed scan function,
allow consumer to filter by itself.
Immediatly try to connect when reloading settings and previous attempt
had failed. Because of locking, previously this caused a soft-lock of the
internal loop that required waiting for the long Reconnect timeout to
expire first.
Refactor the module to include namespace { ... } and move build settings into .cpp
Saves ~1.5Kb and also allows gcc to issue unused warnings for declared functions.
As a side-effect of refactoring, (temporarily?) remove softAp leases support.
Current Core moved dhcps support into a C++ code, forcing internal logic
to reference a specific object. Better to wait a bit until that
stabilizes and try again. Plus, it is not currently available in the esp-idf.
Move settings & build flags into local namespace
Fix various functions referring to settings, when i2c is initialized once
Correctly use feature-flags in the .cpp instead of the .h
resolve#2451
Paranoid locking doesn't really matter in the current setup (but, leave some comments about how to solve it when it actually does).
Also copy internal tuple of save+transition+report and give the copy to the callback. Thus, don't assume the consumer is always nice,
and does not declare refs to internal struct variables, making this kind of hard to track.
Refactor internal code so it does not export functions to the built .o
Refactor WebUI:
- remove jquery dependency from the base custom.js and use vanilla JS
- remove jquery + jquery-datatables dependency from the RFM69 module
- replace jquery-datatables handlers with pure-css table + some basic cell filtering
(may be incomplete, but tbh it is not worth additional 50Kb to the .bin size)
- introduce a common way to notify about the app errors, show small text notification
at the top of the page instead of relying on user to find out about errors by using the Web Developer Tools
- replace <span name=...> with <span data-settings-key=...>
- replace <div> templates with <template>, disallowing modification
without an explicit DOM clone
- run `eslint` on html/custom.js and `html-validate` on html/index.html,
and fix issues detected by both tools
Streamline settings group handling in custom.js & index.html
- drop module-specific button-add-... in favour of button-add-settings-group
- only enforce data-settings-max requirement when the property actually exists
- re-create label for=... and input id=... when settings group is
modified, so checkboxes refer to the correct element
- introduce additional data-... properties to generalize settings group additions
- introduce Enumerable object to track some common list elements for
<select>, allow to re-create <option> list when messages come in
different order
Minor fixes that also came with this:
- fix relay code incorrectly parsing the payload, causing no relay names
to be displayed in the SWITCHES panel
- fix scheduler code accidentally combining keys b/c of the way C parses
string literals on separate lines, without any commas in-between
- thermostat should not reference tmpUnit directly in the webui, replace with
module-specific thermostatUnit that is handled on the device itself
- fix index.html initial setup invalid adminPass ids
- fix index.html layout when removing specific schedules
- generic mdns query function so we don't forget about the removeQuery()
- full handle mdns logic in the mqtt module, check for running mdns
instance and periodically poll for _mqtt._tcp service
- autoconnect only when MQTT is enabled *and* there is no server
- use mqtt::settings and mqtt::build namespaces for settings
- some refactoring for topic <-> setting application
- prefer const String& to const char* in topic generation