Repository navigation
adelsystem_cbi: derive the onboard temperature alarm count from its array - #3646
Open
user01010111 wants to merge 8 commits into
Open
user01010111 wants to merge 8 commits into
user01010111 wants to merge 8 commits into
Conversation
Read Modbus bits and registers into byte- and word-sized buffers, then convert the result explicitly into the caller's integer value. This removes uninitialised-value use while retaining the existing masks and error handling. Fixes networkupstools#3642 AI assistance: OpenAI Codex with gpt-6-astra and gpt-daybreak-blue-latest. Signed-off-by: user01010111 <12504630+user01010111@users.noreply.github.com>
…rray Use SIZEOF_ARRAY(obta_ar) for the alarm count instead of four. The array contains one entry, so the old count let the polling loop read beyond it. Fixes networkupstools#3643 AI assistance: OpenAI Codex with gpt-6-astra and gpt-daybreak-blue-latest. Signed-off-by: user01010111 <12504630+user01010111@users.noreply.github.com>
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit d58b0ad is temporarily available: NUT-tarballs-PR-3646.zip. |
user01010111
marked this pull request as ready for review
September 14, 2026 18:26
Member
|
CI faults: Spellchecker concerns addressed in #3647 |
…orkupstools#3647] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Use uint16_t for register_read() output and its get_dev_state() caller. Keep the typed libmodbus buffers, masks and failure behaviour, and cast formatting arguments explicitly for portable integer promotion. Validated both read modes with GCC and Clang, boundary and consumer checks, sanitizers, and real-libmodbus polling with the dependent fixes. Both modes also pass custom/default-port disconnect and recovery tests, surviving three refused reconnects and restoring changed readings. GCC project tests and distribution/install/uninstall checks pass. AI assistance: OpenAI Codex (gpt-6-astra). Adversarial review by Claude Code (claude-opus-5-5, high effort) covered the complete PR, amendment, callers and validation evidence, with a follow-up on compiler diagnostics and polling state dumps. No blocking read-path finding remained. Signed-off-by: user01010111 <12504630+user01010111@users.noreply.github.com>
…us series branch Carry the reviewed Adelsystem uint16_t read-value amendment forward without rewriting the existing contribution or maintainer history. The amendment was developed with OpenAI Codex (gpt-6-astra) and reviewed with Claude Code (claude-opus-5-5, high effort); the review scope was networkupstools#3645 and its type amendment. Signed-off-by: user01010111 <12504630+user01010111@users.noreply.github.com>
user01010111
added a commit
to user01010111/nut
that referenced
this pull request
Oct 13, 2026
…us series branch Carry the reviewed Adelsystem uint16_t read-value amendment forward without rewriting the existing contribution or maintainer history. The amendment was developed with OpenAI Codex (gpt-6-astra) and reviewed with Claude Code (claude-opus-5-5, high effort); the review scope was networkupstools#3645 and its type amendment. Signed-off-by: user01010111 <12504630+user01010111@users.noreply.github.com>
|
✅ Build nut 2.8.5.5904-master completed (commit 0e16acbb11 by @jimklimov)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge order: #3645, then #3646, then #3647. This PR includes #3645 until the prerequisites merge; its alarm-count change is commit aaa733b.
Use
SIZEOF_ARRAY(obta_ar)for the alarm count instead of four. The array contains one entry, so the old count let the polling loop read beyond it.The unmodified full driver reproduces the overflow under AddressSanitizer. With the read-storage and recovery fixes applied, the full driver passes the corresponding ASan/UBSan polling and recovery checks, with alarm processing exercised. These integration results cover the combined series; hardware was not tested.
Fixes #3643.
Developed with OpenAI Codex using
gpt-6-astraandgpt-daybreak-blue-latest.Reproduction files and instructions: #3644 (comment)