Commit Graph

3638 Commits

Author SHA1 Message Date
Maxim Prokhorov
44ec40304c pio: build pzemv3 envs 2022-10-27 03:57:54 +03:00
Maxim Prokhorov
4269ddcf5f hw: include swserial in generic sensor builds 2022-10-27 03:57:54 +03:00
Maxim Prokhorov
138113ce50 build: show uart and uart_sw 2022-10-27 03:57:54 +03:00
Maxim Prokhorov
8f74789462 util: fix parsing 3 and more digit numbers 2022-10-27 03:57:54 +03:00
Maxim Prokhorov
6154f40a4e sns: fix v9261f uart parity mode 2022-10-27 01:02:09 +03:00
Maxim Prokhorov
504bda8299 web: always export arduinojson overrides 2022-10-27 00:55:55 +03:00
Maxim Prokhorov
6b3ce83198 mqtt: fix json topic generation 2022-10-24 18:32:06 +03:00
Maxim Prokhorov
2918d9fe5d light: channel id in terminal is not a path 2022-10-24 18:30:23 +03:00
Maxim Prokhorov
74ad71bf74 tests: fix device-only macro 2022-10-23 05:45:42 +03:00
Maxim Prokhorov
afb24f7ba6 webui: bump html-validate to 7.6.0 2022-10-23 03:56:19 +03:00
Maxim Prokhorov
aa84f98d5f webui: bump eslint to 8.26 2022-10-23 03:49:06 +03:00
Maxim Prokhorov
b6ac1140f2 webui: bump node dependencies 2022-10-23 03:47:47 +03:00
Maxim Prokhorov
7b8955341a api: streamable string view for json parser 2022-10-23 03:19:07 +03:00
Maxim Prokhorov
9d4bf43d66 rpn: fix variable name match 2022-10-23 03:19:07 +03:00
Maxim Prokhorov
c45a1ec097 rfb: fixed size buffer 2022-10-23 03:19:07 +03:00
Maxim Prokhorov
25be31251b mqtt: fixing types 2022-10-23 03:19:07 +03:00
Maxim Prokhorov
d85ddad6da system: de-dup progmem strings
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
2022-10-23 03:19:07 +03:00
Maxim Prokhorov
2f54210adf webui: fix ignoring exact key matches
see #2544

use updated class method for comparison
same prefix did not work with exact lengths
2022-10-23 03:18:57 +03:00
Maxim Prokhorov
c5ad7b4a75 pwm: zero-init things ourselves
looks like bootloader implementation avoids static and bss zero-init
does not solve the crashing, though
2022-10-23 03:18:57 +03:00
Maxim Prokhorov
2a7cabb4d3 light: rework hsv input in webui
* make sure we don't apply hsv and brightnesss, only take hue and saturation
  when calculating inputs. use value as brightness percentage, wrapping
  the original function (which also makes other modules use this codepath)
* deduce interface elements based on both setting and incoming
  properties. wrap everything in {light: ...} in both inputs and
  outputs, alse allow to update multiple properties at the same time
* add light state toggle when special lights relay is not set up
* remove channel, state and brightness elements through css styling
  instead of going to the elements directly. no need to chech whether
  certain elements exist
2022-10-23 03:18:57 +03:00
Maxim Prokhorov
a44860f50c light: repeat timer instead of re-init 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
448e6fc68a pwm: switch to arduino provider (temporarily?)
generic pwm causes hwdt, needs investigation
2022-10-23 03:18:57 +03:00
Maxim Prokhorov
c668e546a8 light: capture report value 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
af0cf39682 types: view default init missing 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
2471c16f93 light: do not update brightness in hsv 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
fe002258fc system: fstr -> pstr 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
657061bfb1 system: do not disarm non-repeating timer 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
5d1dc124e0 light: update provider readiness 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
81866dad44 hass: clean-up 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
9f5abad48e settings: gc 'empty' keys aswell 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
639b558100 settings: raw erase fixes
solves edge-case when we move our storage nearby a previously erased kv,
causing it to be treated as a key or a value with length 255 (... 0x00 0xff)

also stop set() from erasing data when it is not possible to store it in
the first place

additional test case similar to permutations one, make sure keys don't
disappear while we write to the storage a lot of times and possibly
introduce the two cases above
2022-10-23 03:18:57 +03:00
Maxim Prokhorov
f61b0738bd build: using __DATE__ and __TIME__
fixing previous builds getting stuck on Sep 21st

turns out it *really* uses file modification time
updating VERSION does not change a thing, it does not work like scons :>
2022-10-23 03:18:57 +03:00
Maxim Prokhorov
a11942fd7b mqtt: string views in API and internal callbacks
* 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
2022-10-23 03:18:57 +03:00
Maxim Prokhorov
0970269033 util: more string views for internal funcs 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
76dd26b9b2 rpc: string views, fix led command status 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
951fceff05 pio: no need to init Serial when debugging 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
e6a2de0094 button: commands are uppercase 2022-10-23 03:18:57 +03:00
Maxim Prokhorov
510d68d079 system: fixup timers and loop callbacks
* globally accessible system timer class; help out with our internal
  scheduling by always using strongly typed duration and dynamic
  time adjustment for durations longer than system limits
  (see `os_timer_t` documentation)
* our own class for scheduled callbacks which are either choosing a
  simple function pointer or std function wrapper, depending on the type
  passed into the constructor. specifically for scheduled functions,
  this allows us to filter globally scheduled functions and push them to
  the front of the queue when necessary to ensure certain order of calls
* replace Ticker instances with SystemTimer
* allow types {h, cpp} in unit tests
2022-10-23 03:18:57 +03:00
Maxim Prokhorov
179a6a84c6 hass: trying to fix lights
see #2539

separate color and white channel availability from settings;
allow color, hs, mired inputs but do not send anything when those are disabled

advertise `color_mode` support, match specific number of channels
with some special mode that should be used on the remote
(which are, currently, shown in separate control tabs)
2022-10-23 03:18:52 +03:00
Maxim Prokhorov
27a665a04d debug: restore serial output 2022-10-08 15:33:38 +03:00
Maxim Prokhorov
d59e7715f8 telnet: restore web setup 2022-10-08 15:33:22 +03:00
Maxim Prokhorov
35656314aa sns: typo 2022-09-28 14:59:25 +03:00
Maxim Prokhorov
0028effc48 sns: read and report values independent from settings
also replace external function calls that are already handled by Info
2022-09-26 15:22:18 +03:00
Maxim Prokhorov
b0af0afd19 hw: deprecated flag 2022-09-25 18:41:19 +03:00
Maxim Prokhorov
ea881b12d1 hw: fix port checks 2022-09-25 18:40:33 +03:00
Maxim Prokhorov
3eaba2883d uart: fix building when disabled 2022-09-25 14:28:38 +03:00
Maxim Prokhorov
73e3bdac2f cfg: inverse -> invert 2022-09-25 12:09:47 +03:00
Maxim Prokhorov
b52b128f5e cfg: more warnings about uart changes 2022-09-25 11:31:41 +03:00
Maxim Prokhorov
9e0dc73865 pzem004t(v3): commands need private access
also fix typos in the pzem004t lib import
2022-09-25 10:29:45 +03:00
Maxim Prokhorov
164d217bf7 sch: missing undef 2022-09-25 10:28:47 +03:00