Commit Graph

3386 Commits

Author SHA1 Message Date
Maxim Prokhorov
5ccc70e42e pio: trying to work out 6.0.0 changes 2022-05-05 17:50:21 +03:00
dependabot[bot]
02581c6988 webui: bump minimist from 1.2.5 to 1.2.6 in /code (#2508)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-11 14:08:35 +03:00
Maxim Prokhorov
791576458f prometheus: anonymous namespace & fix warnings
clangd does not like integer SUPPORT flags and `||`
2022-02-12 17:52:37 +03:00
Maxim Prokhorov
afd914609d sns: comments & update sensor::Value helpers 2022-02-12 17:51:50 +03:00
Maxim Prokhorov
e5e8f86866 sns: really handle all of available temperature conversions
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)
2022-02-11 22:09:01 +03:00
Maxim Prokhorov
0933ab80e1 sns: fixup missing static object binding with gcc4.8 2022-02-11 13:54:30 +03:00
Maxim Prokhorov
456d1cc586 ci: reference dump() method for the settings storage 2022-02-11 13:53:34 +03:00
Maxim Prokhorov
c37bbb42a6 ci: make sure ctest prints it's failures 2022-02-11 13:53:05 +03:00
Maxim Prokhorov
ec17bf652c settings: clean-up & make sure kv result is actually moved
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
2022-02-11 13:48:39 +03:00
Maxim Prokhorov
ce7de7d812 mqtt: once again, do not quote numbers in MQTT JSON payload
Restore behaviour from dd12251e43
7ba1283024 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
2022-02-10 14:54:45 +03:00
Maxim Prokhorov
d4c18a6f52 web: would be a clang warning 2022-02-09 16:00:41 +03:00
Maxim Prokhorov
3e9acdf892 rpn: do not link with Core wifi lib 2022-02-09 16:00:41 +03:00
Maxim Prokhorov
69b6f8461d ntp: more flash strings 2022-02-09 16:00:41 +03:00
Maxim Prokhorov
812cd7dee2 system: sync HeapStats with upstream
both heap size values should be u32
2022-02-09 16:00:41 +03:00
Maxim Prokhorov
dfe01d1bbf relay: constexpr is already const 2022-02-09 16:00:41 +03:00
Maxim Prokhorov
28aa9622bb rfbridge: handle rfb{ON,OFF} just like any other setting
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
2022-02-09 16:00:41 +03:00
Maxim Prokhorov
1a4926da2d settings: const-correctness and simplify prefix search
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.
2022-02-09 15:43:08 +03:00
Maxim Prokhorov
9501595a16 relay: fix never attempting mqtt group subscriptions
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)
2022-02-09 15:43:08 +03:00
Maxim Prokhorov
c22b369c86 sns: ntc temperature returned as kelvin
also rework internals of the analog and ntc sensor classes to use
explicit delays and update it's comments
2022-01-31 21:23:17 +03:00
Maxim Prokhorov
e51e259f02 sns: handle all of available temperature conversions 2022-01-31 16:32:40 +03:00
Maxim Prokhorov
2338f54cf5 wifi: show the current config via terminal 2022-01-31 16:32:04 +03:00
Maxim Prokhorov
058c6344f3 wifi: missing scan settings query 2022-01-30 20:48:54 +03:00
Maxim Prokhorov
3100ff7319 webui: update blobs 2022-01-16 03:53:20 +03:00
Maxim Prokhorov
5c6a6dacfb webui: fix class typos and add more control groups 2022-01-16 03:53:20 +03:00
Maxim Prokhorov
588b1c46b1 webui: hint is not a class anymore and fix alexa element group 2022-01-15 19:18:12 +03:00
Maxim Prokhorov
988f566e7e maint: tweak .gitignore and remove redundant files
combine code/.gitignore and the one at the root of the repo

.bandit was part of codacy checks suite, current python code
should probably be updated to use either pylint directly and (/ or)
through the codeql python workflow
2022-01-14 22:23:16 +03:00
Maxim Prokhorov
95b89daaea webui: bump again for html-validate 2022-01-14 04:05:06 +03:00
Maxim Prokhorov
52a47a6cfb webui: bump dependencies lock 2022-01-14 03:50:36 +03:00
Maxim Prokhorov
05c696f869 webui: fix lint 2022-01-14 03:50:23 +03:00
Maxim Prokhorov
288b79c549 webui: reposition elements and trying to fix autoscroll
Since 'Enter' is also a submit button and another style gets applied,
both seem to overlap. Not very important on a desktop, but might be
easier to navigate on mobile screen
(plus, move settings backup buttons back at the top, accidentally moved
those to the bottom in the previous commit)

On the DEBUG page as well, trying to fix the scrolling behaviour when the
logging stream just started and will only jump after it spends some time at
the top row. Watching the element state to pause the autoscroll when we
manually move the slider, and resume it once the slider touches the bottom
of the textarea. Entering the command will reset the state and enable
the autoscrolling immediately
2022-01-14 03:28:32 +03:00
Maxim Prokhorov
29cac10192 mqtt: settings have a common prefix 2022-01-13 06:38:05 +03:00
Maxim Prokhorov
8e1ef04bc3 ci: make sure to ignore cmake cache in git 2022-01-13 06:21:36 +03:00
Maxim Prokhorov
170b791924 mqtt: settings query and rename mqtt.info command
Separate variables that are used just for the internal loop,
and the ones that are supposed to go into the client as args

Clean up logging and the terminal output, certain things are
now visible through the settings query and there's no need to
dump the build value
2022-01-13 06:20:28 +03:00
Maxim Prokhorov
19d56652cd btn: missing namespace 2022-01-13 06:07:26 +03:00
Maxim Prokhorov
eaa2e370eb ci: use esp8266 mock framework
Resolve the issue with the UnixHostDuino not really being compatible
with the esp8266 Core String (...and the rest of the Core, as well)

Port the CMakeLists.txt from the rpnlib and update it use FetchContent
instead of either manually fetching dependencies or using PIO artifacts
Caching is *expected* to work, but might need slight adjustments
2022-01-13 04:04:37 +03:00
Maxim Prokhorov
594763e349 webui: update blobs 2022-01-13 02:21:35 +03:00
Maxim Prokhorov
4c178948b5 webui: revamp grid elements
Make more use of control-groups instead of adding a manual alignment
class to each element. Surprisingly, this is slightly larger than the
previous .gz.html output, but not enough to not consider the readability.

Status page updated to take the lengthy hostnames and version strings
into an account, remove those from the sidebar.

Clean-up terminal module. Use the same style for both input and output,
move the terminal handler and debug handler into an appropriate .cpp
2022-01-13 02:16:28 +03:00
Maxim Prokhorov
b5dca42cbc webui: revamp group addition & deletion
Generate explicit events. Don't have a separate group observer that
tracks deletion, but handle it immediately from the 'button' event

Replace kv array with a direct key updates. While the backed part still
must optimize for size, from this side we should operate on keys directly
2022-01-12 17:26:30 +03:00
Maxim Prokhorov
2b83a883be relay: missing build flag check 2022-01-12 17:20:11 +03:00
Maxim Prokhorov
71231e0d7d ws: more flashstrings as keys 2022-01-12 17:19:51 +03:00
Maxim Prokhorov
38456d9ab7 debug: crash offset should increment by 4 2022-01-12 17:19:11 +03:00
Maxim Prokhorov
2c663ccbff btn: nicer structs 2022-01-12 17:18:36 +03:00
Maxim Prokhorov
034be83c52 sch: settings query 2021-12-30 02:03:03 +03:00
Maxim Prokhorov
1d9ac9e14f webui: always create Enumerable{Payload,Config} list 2021-12-30 02:03:03 +03:00
Maxim Prokhorov
2e254f2d60 webui: update blobs 2021-12-30 02:03:03 +03:00
Maxim Prokhorov
5dd2009214 webui: fix checkbox styling under pure-form
Using a more 'specific' CSS rule to override it's width and height
2021-12-30 02:03:03 +03:00
Maxim Prokhorov
9e390084c9 system: these are in ROM 2021-12-30 02:03:03 +03:00
Maxim Prokhorov
3aef6adf7d webui: update "select" options to use text values 2021-12-30 02:03:03 +03:00
Maxim Prokhorov
710f45c2b1 webui: magnitude should not print missing unit
In case the measurement is unitless, make sure to substitute the empty
.units[id] value with an empty string instead of the ambigious 'undefined'
2021-12-30 02:03:03 +03:00
Maxim Prokhorov
40c50f910e webui: do not lose select original=value when nothing is selected 2021-12-30 02:03:03 +03:00