Skip to content

Conversation

@jimklimov
Copy link
Member

Closes: #3000

jimklimov added 4 commits July 8, 2025 11:04
…RAPTOR RPT-1500AP LCD practice) - fix messages [networkupstools#3000]

Signed-off-by: Jim Klimov <[email protected]>
…, NEWS.adoc: introduce powercom_sdcmd_discrete_delay flag for Powercom Raptor and Smart KING Pro series [networkupstools#3000]

Signed-off-by: Jim Klimov <[email protected]>
@jimklimov jimklimov added this to the 2.8.4 milestone Jul 8, 2025
@jimklimov jimklimov added USB Powercom Incorrect or missing readings On some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.) impacts-release-2.8.3 Issues reported against NUT release 2.8.3 (maybe vanilla or with minor packaging tweaks) labels Jul 8, 2025
@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

@jimklimov jimklimov added the need testing Code looks reasonable, but the feature would better be tested against hardware or OSes label Jul 10, 2025
@jimklimov
Copy link
Member Author

@aleka204 : can you please check if a custom NUT build from this branch works for your devices (with probably confusing behaviors, as per spec they seem to conflate delays before power-off and start-up) and does solve your issue #3000?

See e.g. https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests about getting prerequisites, building NUT, and testing a driver from the build workspace.

@jimklimov jimklimov marked this pull request as draft July 10, 2025 07:08
@jimklimov
Copy link
Member Author

jimklimov commented Jul 10, 2025

Parking the PR as "draft" for now, until it is tested that there's some practical value to it, or more work needs to be done :)

@jimklimov jimklimov modified the milestones: 2.8.4, 2.8.5 Aug 7, 2025
@jimklimov jimklimov marked this pull request as ready for review October 26, 2025 12:33
Comment on lines +85 to +88
/* For powercom_sdcmd_discrete_delay we also read minutes
* from DelayBeforeStartup (same as for older dialects).
* FIXME: ...but theoretically they can be 32-bit (1..99999)
*/

Check notice

Code scanning / CodeQL

FIXME comment Note

FIXME comment: ...but theoretically they can be 32-bit (1..99999)
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE
# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
#endif
if (iv < 0 || (intmax_t)iv > (intmax_t)UINT32_MAX) {

Check warning

Code scanning / CodeQL

Comparison result is always the same

Comparison is always false because iv <= 2147483647.
Comment on lines +144 to +148
/* NOTE: for powercom_sdcmd_discrete_delay mode it seems we
* do not read DelayBeforeShutdown at all (not for time),
* the value is stored and retrieved as DelayBeforeStartup.
* FIXME: Should anything be changed here?
*/

Check notice

Code scanning / CodeQL

FIXME comment Note

FIXME comment: Should anything be changed here?
uint16_t val, command;
int iv;

/* FIXME: Anything for powercom_sdcmd_discrete_delay? */

Check notice

Code scanning / CodeQL

FIXME comment Note

FIXME comment: Anything for powercom_sdcmd_discrete_delay?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impacts-release-2.8.3 Issues reported against NUT release 2.8.3 (maybe vanilla or with minor packaging tweaks) Incorrect or missing readings On some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.) need testing Code looks reasonable, but the feature would better be tested against hardware or OSes Powercom USB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong protocol for Powercom RAPTOR series

2 participants