4753 Commits

Author SHA1 Message Date
Maxim Prokhorov
46719eecb7 settings(embedis): missing condition for commit()
previous write() impl relied on comparing values before and after
assume that operations resulting in commit() are always written
2025-12-05 04:54:28 +03:00
Maxim Prokhorov
86f7507461 rfb(settings): updated readresult methods 2025-12-05 04:54:01 +03:00
Maxim Prokhorov
6861313a54 settings(embedis): index size_t -> u16
staying closer to whats expected within the embedis
2025-12-05 04:11:36 +03:00
Maxim Prokhorov
697b8565c2 test(embedis): missing index asserts 2025-12-05 03:42:58 +03:00
Maxim Prokhorov
f24dd99ca4 settings(embedis): c++11-style static_assert for invalid implementations
disallow using toSpan() and toView() when storage does not implement data()

since overloading is used, stop building by simply not writing any function
otherwise, it is finicky w/ compiler support and / or selected -std=...
2025-12-05 03:42:58 +03:00
Maxim Prokhorov
52d10d05f3 settings(embedis): fix cursor loop & correct type cast 2025-12-05 03:42:58 +03:00
Maxim Prokhorov
021e1cc1a2 settings(embedis): formatting 2025-12-05 03:42:58 +03:00
Maxim Prokhorov
5e14cdb44f settings(embedis): internal value comparisons using views
limiting toString() usage to external api return values
2025-12-05 03:42:58 +03:00
Maxim Prokhorov
f636aece8c web(build): unique ptr for config buffer
also small refactoring to put storage outside of global namespace { ... }
2025-12-05 03:42:58 +03:00
Maxim Prokhorov
f29869068b eeprom(terminal): flag boot reset event 2025-12-05 03:42:58 +03:00
Maxim Prokhorov
2240c4b393 btn(relay): assign only necessary buttons & fix ns usage
also fixes duplicated emplace_back that *sometimes* breaks single-source
build w/ older toolchains since it would reference the same section twice

> xtensa-lx106-elf/include/c++/4.8.2/bits/vector.tcc:405:31: error: __c causes a section type conflict with __c
>   _M_check_len(size_type(1), __EXCSTR("vector::_M_emplace_back_aux"));

(EXCSTR is specific to esp-quick-toolchain, forcing exc text into flash strings instead of using raw literals)
2025-12-05 03:42:58 +03:00
Maxim Prokhorov
75e48427a5 settings(embedis): sized reads & writes, function local state
reduce the number of times one byte read()s are used
since espXX implementation deals with memory blob most of the time,
just return the data pointer to the buffer position and work w/ that

internal rules for obj construction relaxed, fix implicit operator= deletion
by using pointers instead of references. allow more default output objs

prefer that reader / writer live only for the duration of the function
and are shared explicitly only when it is necessary
2025-12-05 03:31:48 +03:00
Maxim Prokhorov
5383bc5e66 tspk(build): unused var 2025-12-02 19:13:38 +03:00
Maxim Prokhorov
edf414e4f2 rpn(relay): re-fix #2268 2025-12-02 04:50:55 +03:00
Maxim Prokhorov
affd1552ef relay(boot): do not set instance flags too early
same as PR, only apply flags & target status via relayStatus() call
2025-12-02 04:39:02 +03:00
Maxim Prokhorov
5ee8856848 relay(callback): revert to non-static instances
wait until this is actually useful
2025-12-02 04:27:22 +03:00
Maxim Prokhorov
46d3ede29b relay(status): rename active -> ready & make target status also return enum 2025-12-01 09:09:08 +03:00
Maxim Prokhorov
25ce4e80b5 relay(status): returns ON / OFF only when relay is available and active 2025-12-01 09:08:29 +03:00
Maxim Prokhorov
ef25252389 dcz(build): fixup anonymous namespace
amends b366d77a5e
only have a top-level one, allow more inlining
2025-12-01 01:46:34 +03:00
Maxim Prokhorov
5a364e4d7f dcz(relay): publish status only when processed at least once
ref. #1536 and #2653, wait for callback to make relays send'able
nb. std::bitset<X>::operator[] returns reference, don't store it w/o cast to bool
2025-12-01 01:46:34 +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