Commit Graph

4348 Commits

Author SHA1 Message Date
Maxim Prokhorov
488ee7a346 relay(callback): bitset operator[] returns reference 2025-12-01 01:38:44 +03:00
Maxim Prokhorov
7508e18c5b dcz(build): fixup anonymous namespace
amends b366d77a5e
only have a top-level one, allow more inlining
2025-12-01 01:25:07 +03:00
Maxim Prokhorov
263d50f718 dcz(relay): publish status only when processed at least once
ref. #1536 and #2653, wait for callback to make relays send'able
2025-12-01 01:24:36 +03:00
Maxim Prokhorov
df6d67f422 relay(callback): register & process active relays 2025-12-01 00:36:16 +03:00
Maxim Prokhorov
fa21e494cc dcz(build): should not bind public template to private type
not seen w/ gcc latest, but clangd -Wunused-function detects this
2025-12-01 00:36:16 +03:00
Maxim Prokhorov
2278d61f81 sch(build): duplicated strings 2025-12-01 00:36:16 +03:00
Maxim Prokhorov
1c2154e1f9 test(build): cleanup only when cache dir exists 2025-11-29 22:32:05 +03:00
Maxim Prokhorov
0ec63d9b76 test(build): expire old cache files before building
should not be kept indefinitely, since sources may've been changed already
ci cache dir is expected to only survive for the current build session,
prefer similar behaviour for local build tests
2025-11-29 22:22:19 +03:00
Maxim Prokhorov
84e43c7b59 rfbridge(build): -Wunused-function 2025-11-29 22:19:11 +03:00
Maxim Prokhorov
e137b286ac webui: rebuild blobs 2025-11-29 21:26:40 +03:00
Maxim Prokhorov
d745f5f633 webui(build): bump versions in package.json
solves dependabot noise, where unused packages get irrelevant issue triggers
pre 4.x.x vite, pre 6.x.x vitest. html-validate glob dependency also bump'ed
2025-11-29 21:20:13 +03:00
Maxim Prokhorov
688a18bce5 relay(terminal): error output helpers 2025-11-29 00:39:11 +03:00
Maxim Prokhorov
7672b9b068 relay(web): anonymous namespace 2025-11-29 00:25:17 +03:00
Maxim Prokhorov
70c6a7f478 relay(api): anonymous namespace 2025-11-29 00:23:41 +03:00
Maxim Prokhorov
f4e9af0958 relay(terminal): naming 2025-11-29 00:22:33 +03:00
Maxim Prokhorov
b476ea1401 relay(misc): removed comment 2025-11-29 00:21:56 +03:00
Maxim Prokhorov
9a253549cf relay(mqtt): common mqtt & api topics in flash 2025-11-29 00:21:21 +03:00
Maxim Prokhorov
10fcecdbf6 led(build): -Wunused-function false positive
techically true, but impl has to be there
note that class itself is namespace { ... } - scoped too
2025-11-28 22:57:43 +03:00
Maxim Prokhorov
2485abd99d led(api): unused .toggle() 2025-11-28 22:51:36 +03:00
Max Prokhorov
9fe8d9c9a4 relay(all): boot & sync refactoring (#2654)
- support sync mode at boot and in timers. boot mode also introduces separate ON & OFF delays specifically for handling sync mode in bulk w/o accessing individual relay settings
- boot sync ID configuration to control which relay drives synchronization behaviour during boot
  by default, last relay boot'ed is used for status. 
- properly retain hw gpio relay status when rebooting & deal with sync cases. fallback to normal setup when dealing with mixed relay provider configurations. currently, only hw gpio flagged as 'retain'ing
- relays now keep all status transition timers in a shared pool. mqtt disconnect, pulse & on / off delay cannot overlap
- some api calls try to avoid relays that were not boot'ed yet processing must happen at least once for it to begin working. internal api tracks 'first time' relay status is set. whenever any other call happens **internally**, it may override the initial one with something else
- various clean-ups in public & private api reuse. for one, internals now prefer internal (sic) funcs to at least optimize out id < .size() check when it is already known / parsed that id < .size()
2025-11-28 22:47:50 +03:00
Maxim Prokhorov
78a269ba68 rfbridge(build): move out of relay config section 2025-11-26 11:14:17 +03:00
Maxim Prokhorov
9be4f9fdb5 system(boot): missing build flag checks 2025-11-24 17:25:25 +03:00
Maxim Prokhorov
7ea658b7b5 system(boot): actually enable partially unstable setup 2025-11-24 17:17:15 +03:00
Maxim Prokhorov
14aff75a7d gpio(terminal): typo
output pins displayed as inputs when shift does not coincide
2025-11-24 17:16:02 +03:00
Maxim Prokhorov
245e456b44 settings(parse): force trailing suffix when already used it once
prevent ambiguous specs when parsing native durations, which
are implicitly used by default for numbers without suffixes
2025-11-20 23:45:21 +03:00
Maxim Prokhorov
f9a445dd95 relay(boot): skip hw gpio target status delay when soft resetting
since pin state was retained and should immediately use rtcmem mask value
2025-11-16 13:26:48 +03:00
Maxim Prokhorov
994b716caa led(pattern): check parsing success
result is not directly convertible
2025-11-15 23:32:06 +03:00
Maxim Prokhorov
9069546380 test(led): template for unchecked conversion test 2025-11-15 23:29:13 +03:00
Maxim Prokhorov
6093c17fea led: more refactoring
- correctly parse delays when 'repeats' is missing and avoid doing pointer math on nullptr
  empty pattern allowed in all cases, not just 0,0
- parse should signal about invalid inputs
- parse & serialize updated to support empty repeats
- [Rr] in addition to 0,0 as pattern repeat marker

also fixes led.h vs. led_internal.h usage in parser code
2025-11-15 23:04:08 +03:00
Maxim Prokhorov
2938029451 types(duration): micros & millis suffixes
since underlying struct should be able to hold both magnitudes
adjust tests & try to handle more cases
2025-11-15 22:46:05 +03:00
Maxim Prokhorov
37fbd91c13 sns(hlw8012): prefer fastmath over newlib math
since size does matter when upgrading from older versions via ota
also noticed in fauxmoesp, but has to be forked / symbol edited via build script
2025-11-10 02:53:35 +03:00
Maxim Prokhorov
25479ed59e led(loop): reduce number of funcs duplicating method calls
and since status is always expected to work as 'logical' one, not 'physical' one
2025-11-10 02:53:35 +03:00
Maxim Prokhorov
b716d4c2cc led(relay): dont check link w/ findme & relays
amends 0033735caa
since both modes are for every relay, not any specific one
2025-11-10 02:53:35 +03:00
Maxim Prokhorov
79633343b9 gpio(terminal): explicit mode in addition to write 2025-11-10 02:53:35 +03:00
Maxim Prokhorov
5e681eb009 mqtt(debug): display empty message as 0 bytes
since there is no quoting, should'nt mistake it for space(s)
2025-11-10 02:53:35 +03:00
Maxim Prokhorov
22fbd61db6 system(boot): led & buttons work when not too unstable
remap buttons to reset & leds to notify that device is not actually dead
if rebooting still happens from either module, still works as before
2025-11-10 02:53:35 +03:00
Maxim Prokhorov
7babf84b53 system(boot): persistent count clamp & code reuse 2025-11-10 02:53:35 +03:00
Maxim Prokhorov
bdf87e1a51 led(pattern): refactoring
w/ another -fsanitize=address hint, use separate objects instead of
relying on pattern itself holding everything api *may* need

combine pattern and preset patterns currently separate timers
pattern container reworked to allow small-size optimization

introduce a special '0,0' marker, repeating the whole pattern (instead
of just one delay at the end)

since pattern is part of the led struct proper, display it in settings query
update tests & reuse time parsing routines from utils
2025-11-10 02:53:35 +03:00
Maxim Prokhorov
8592474a9b btn(action): manual reset should not increment unstable counter 2025-11-09 18:52:44 +03:00
Maxim Prokhorov
f737ee2615 uart(debug): also disable rx when uart0 was configured w/o it 2025-11-09 18:52:44 +03:00
Maxim Prokhorov
bc9f879c9c libs(views): fix lingering pointer to old object when copying / moving
also noticed by -fsanitize=address

> auto split = StatefulSplitView{input, " "};
> ...
> split = StatefulSplitViewinput, ","};

ctor & assignment should properly re-construct iterator to avoid referencing
temporaries (especially when ctor & move actually happens and not elided)
2025-11-09 18:52:44 +03:00
Maxim Prokhorov
bb7bd06d67 terminal(test): known memory leakage
allow -fsanitize=address without warnings

avoid extra attributes and just fix the usage in tests,
deprecate for everything else
2025-11-09 18:52:44 +03:00
Maxim Prokhorov
bbfe32940c debug(uart): also mask rx isr when disabled
reserved pins are still techincally in use
also reverts commit removing static putc1
2025-10-03 16:33:45 +03:00
Maxim Prokhorov
63871a6ff2 debug(uart): another spurious unused function warning
same flow when disabling internal uart
2025-10-03 16:32:27 +03:00
Maxim Prokhorov
96efa49fce ntp(cfg): unchecked comparison with nullptr 2025-09-10 11:19:55 +03:00
Maxim Prokhorov
eab8653eb5 debug(uart): spurious unused function warning
amends e76b67b355
2025-09-08 23:41:25 +03:00
Maxim Prokhorov
a63c6c342a types(build): sv constants in read-only memory 2025-09-08 22:58:46 +03:00
Maxim Prokhorov
d576fad945 sns(build): remove FlashStringHelper 2025-09-08 22:57:26 +03:00
Maxim Prokhorov
4cd98f8622 rfm69(build): remove FlashStringHelper 2025-09-08 22:57:13 +03:00
Maxim Prokhorov
9cf52ddbca pzem(modbus): reduntant templated code
there is no need to specialization when doing common operations
inject only the necessary params instead of the the whole body
2025-09-08 22:54:23 +03:00