Commit Graph

4298 Commits

Author SHA1 Message Date
Maxim Prokhorov
7fffcbda4f pzem(build): flash strings clean-up, remove FlashStringHelper 2025-09-08 22:41:42 +03:00
Maxim Prokhorov
c8c1b7a4d2 ir(build): clean-up command string init and remove FlashStringHelper
note that constexpr is still not allowed in this case, only when
commands are declared beforehand (and thus symbols are known at 'compile time')
2025-09-08 22:34:03 +03:00
Maxim Prokhorov
69b5f119a6 dcz(build): remove FlashStringHelper 2025-09-08 22:33:12 +03:00
Maxim Prokhorov
fee3e57884 ntp(debug): do not log server value twice 2025-09-08 22:32:11 +03:00
Maxim Prokhorov
9d21b561c3 ntp(build): use TZ.h as raw strings, not macros
constexpr'ifies string values for build, remove FlashStringHelper
2025-09-08 22:28:37 +03:00
Maxim Prokhorov
d49b33def3 webui(settings): default to step="any" for generic number inputs
per. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/step implicit default is step="1"
> If not explicitly included, step defaults to 1 for number and range, and 1 unit type (minute, week, month, day) for the date/time input types.
> The value must be a positive number - integer or float — or the special value any, which means no stepping is implied and any value is allowed
> (barring other constraints, such as min and max)
>
> Only values which are a whole number of steps from the step base are valid.

.checkValidity()/.reportValidity() enforce the rule, making these values
impossible to set (besides manually setting the kv through console)

also clean-up any defaults & suspicious use in specific modules

resolve #2651
2025-08-29 18:06:20 +03:00
Maxim Prokhorov
61c5cd7651 webui(build): remove mistakenly set src/*.html binary attribute 2025-08-29 18:05:56 +03:00
Maxim Prokhorov
3dcbc660b2 webui(build): missing embedded files check for index header values 2025-08-29 18:01:11 +03:00
Maxim Prokhorov
e76b67b355 debug(uart): no-op output for sdk when uart support is disabled 2025-08-29 18:00:16 +03:00
Maxim Prokhorov
02631120cb build(codegen): bump re2c to 4.3 2025-08-29 17:42:49 +03:00
Maxim Prokhorov
c3cf5e23c2 sch(api): missing id initializer
dont end up with an invalid schedule obj
2025-07-02 02:34:51 +03:00
Maxim Prokhorov
4d2da2b49d sns(build): explicitly init strings, even when unused
-Wmissing-field-initializers partial positive
ref. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96868
2025-07-02 02:34:51 +03:00
Maxim Prokhorov
771a4b1dd7 all(build): fix unused variable warnings 2025-07-02 02:34:51 +03:00
Maxim Prokhorov
899e83f25a mqtt(build): unused warning & fix enabled ref 2025-07-02 02:34:51 +03:00
Maxim Prokhorov
f30fffdfab tspk(build): fallthrough warning 2025-07-02 02:29:31 +03:00
Maxim Prokhorov
1cfef1f5b5 build(scripts): not a bash script 2025-06-26 03:17:36 +03:00
Maxim Prokhorov
ed32ab20ba build(scripts): sync & generate config/arduino.h 2025-06-26 03:11:41 +03:00
Maxim Prokhorov
c5a0b5f23f build(scripts): allow to generate compile_commands.json with everything enabled 2025-06-24 23:55:41 +03:00
Maxim Prokhorov
3ed1050f8c debug(scripts): decoder typing & refactoring
- typing info to clean-up path <-> string and arguments mixups
- argparse.FileType deprecated, use another built-in 'fileinput' that allows similar behaviour
- tool selection always uses shutil.which result for a full cmd path
- tool exec errors treated as script errors
2025-06-24 23:55:21 +03:00
Maxim Prokhorov
1a7f519bcc settings(internal): remove inline funcs & fixup crash handler
implement relevant funcs within the handler, as it is the main consumer
2025-06-21 00:50:28 +03:00
Maxim Prokhorov
da12585c83 settings(internal): naming & combine common move code 2025-06-21 00:49:40 +03:00
Maxim Prokhorov
1cade55159 settings(storage): consistent initialization order
size & storage set up when constructed, avoid splitting auto-size & explicit one
more expensive in code size than just a global, but can be remedied elsewhere

same as gpio init, settings & eeprom initialized statically within a func context
revise internals to access specific instance
2025-06-21 00:46:08 +03:00
Maxim Prokhorov
f22f7366e1 settings(internal): commit to storage on first boot
- implement wrapper class for the rotate to slightly change the behaviour
  correctly reference size info and move 'fill' aka 'clean' into the class itself
- increase storage rotation limits for 2M+ boards, 16 & 32 respectively
  for 8M and 16M board configurations
  bump to 8 original 4M one and extra check for 2M
- minor clean-up to terminal output. shorter strings, more static ones
2025-06-20 20:59:01 +03:00
Maxim Prokhorov
6ac0a93554 terminal(internal): allow empty error message 2025-06-20 20:58:09 +03:00
Maxim Prokhorov
e2924dd4ed settings(internal): allow foreach loop to stop 2025-06-20 20:55:42 +03:00
Maxim Prokhorov
4f7a7ab3e3 system(internal): advertise forced sdk erase as noreturn 2025-06-20 20:53:43 +03:00
Maxim Prokhorov
b406ec306c api(internal): dont ignore partial body
same as in mqtt case, async callback expects us to notice incomplete payload
2025-06-20 11:50:51 +03:00
Maxim Prokhorov
79ff1521d6 mqtt(internal): common functions for processing & logging
fixes log size comparison, ref. https://github.com/hamed-ta/espurna/pull/2

try to use common funcs instead of code dup for sync and async variants
async buffer align & size calc moved into a separate struct
2025-06-20 11:48:19 +03:00
Maxim Prokhorov
7c7d57070e i2c(internal): generic bit packing and casting
common code when dealing with fixed size ints
c++23 bit_cast when dealing with 'cpymem'-like ops

compat header continues to use std number comparison since
libstdcxx feature detection seem to rely on 'import' / 'include'
(and 'bits/version.h' is not available in gcc4)
2025-06-19 11:56:22 +03:00
Maxim Prokhorov
d128bff88d sns(internal): explicit loop type
as previous commits, avoid ambiguous numeric index type
2025-06-19 11:25:40 +03:00
Maxim Prokhorov
e2e4dadcde sns(i2c): re-add sized reader & writer to api
also fixes ade7953 writer, previously lost in wip code
next todo would be to attempt to clean up error handling
2025-06-09 04:46:15 +03:00
Maxim Prokhorov
1b94b60335 sns(i2c): reduce number of calls to Wire.write
read the whole value immediately and write in bulk
2025-06-09 04:37:51 +03:00
Maxim Prokhorov
4017062a8d i2c: find* returns address on success 2025-06-08 23:02:02 +03:00
Hamed Ta
d940abc0ab garland: safeguards from unsigned overflows
resolve #2649
> Updated the reverse loop in AnimFly::Run to cast numLeds to a signed type, preventing an endless loop when shifting LEDs backward

resolve #2650
> Revised the pixel cache update in ColorWave::move to iterate with size_t and decrement safely

copilot is either afraid that numLeds is zero or it is <2
which is theoretically possible, but very unlikely w/ neopixel setups
2025-06-08 22:14:34 +03:00
Maxim Prokhorov
e39b326437 garland: eq instead of assignment 2025-06-08 22:11:56 +03:00
Maxim Prokhorov
fd7b36bebb test(scripts): typing 2025-06-08 22:07:56 +03:00
Maxim Prokhorov
41c2103df0 sns(am2320): directly use i2c buffer write
removed in 6cd31f133a611153139cc633035b949359f3ccc3
2025-06-08 22:07:56 +03:00
Maxim Prokhorov
43c246b30a sns(ade7953): display channel name in description 2025-06-08 22:07:56 +03:00
Maxim Prokhorov
8a877cea4f sns(ade7953): experiment with split channel reads
continue refactoring of sensors using multiple read entities
allow to have separate readings in either form
- global voltage & frequency only
- global & channel a only
- global & channel b only
- global & channel a & channel b (default)

still, prone to ordering errors. driver code might need a separate loop
to allow more flexible processing, outside of 'sensor' method constraints

(also note that I have no idea if it actually works on a real device)
2025-06-08 22:07:56 +03:00
Maxim Prokhorov
fe421ff41d test(build): prettify memanalyser script 2025-06-08 22:07:56 +03:00
Maxim Prokhorov
3dfea4e449 sns(i2c): deprecate brzo, optional transmission stop
remove inconsistent i2c_{read,write}_uint, improve buffer variant instead
ade7953sensor explicitly counting variable length ints

brzo currently is in a persistent todo-list
- there is no runtime configuration of i2c pins
- api does not support cached writes, only repeated start
- api is quite different from the 'Wire' implementation
  (albeit, whole implementation is much smaller)
- code would really benefit from cxx rewrite, as any
  upside from asm use is generally offset by readability
  plus, re-using memory locations already introduces
  'unobvious' asm code, which is not visible w/o disasm
- code focuses on gcc4.x compatibility and breaks w/ gcc9.x+
  register allocation *could* be fixed by using u16 temporaries
  this seems to work ok'ish, but it is unclear whether there
  is any need for the full u32 value space
2025-06-08 22:07:56 +03:00
Maxim Prokhorov
82feb95daa test(build): configurable paths & .gitignore test caches
add one more level of directories for build config & its cache
replace test/pio_cache w/ test/build/cache
2025-06-08 22:07:56 +03:00
Hamed Ta
1fcc5e717d button(settings): fix global setting override for delays (#2648)
don't try to parse empty indexed.ref() when global setting is available
webui currently sets btnRepDel, causing it to always be 0
2025-06-07 11:20:26 +03:00
Hamed Ta
9d846bc853 i2c: fix infinite loop in 16bit address u8...u32 reader (#2647) 2025-06-07 11:07:52 +03:00
Maxim Prokhorov
1ecdf3b6fa pio(env): fix sensor init for sonoff-basic-{dht,dallas}
disable 2nd button and set up sensor pin same way as -r2 variant
https://matrix.to/#/!tfWecjWFXBjDLgUhvx:gitter.im/$hMmbgBxOgAI9Tzb6ApmDoq3fs_5IXVpX29toVdvZFqs
2025-06-03 23:04:45 +03:00
Maxim Prokhorov
7260ec833a all: fix typos, spelling, phrasing
resolve #2645 w/ some extra corrections
2025-06-03 21:25:44 +03:00
Maxim Prokhorov
4be618f28e core: version bump 2025-06-01 16:05:22 +03:00
Maxim Prokhorov
95d1f99261 webui(build): fix import 2025-06-01 06:08:18 +03:00
Maxim Prokhorov
2681b38c4f webui: rebuild blobs
slightly smaller b/c of https://github.com/madler/pigz
note that windows node still ships with zlib
2025-06-01 06:06:37 +03:00
Maxim Prokhorov
b2fa614c39 webui(build): un-vendor clone-stats & bump deps
amends 9ccef13050
fixed in vinyl-fs 4.0.1
2025-06-01 05:57:55 +03:00