There are apparently different SmartUPS models that accept different
possible values for the wakeup-batteries-capacity register. Add a few more values i've obtained from my SmartUPS 1400. Also, make apc.c print out the name of the register in case some `tune' operation for an APC_TOGGLE type register failed, so the operator gets a clue about what went wrong. Maybe i'll someday even find the time to write up a short man page for all this...
This commit is contained in:
parent
2e27eb7403
commit
ff83786f29
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=15197
1 changed files with 32 additions and 0 deletions
32
sysutils/upsd/files/patch-ad
Normal file
32
sysutils/upsd/files/patch-ad
Normal file
|
@ -0,0 +1,32 @@
|
|||
--- apc.c.orig Fri Aug 2 23:44:22 1996
|
||||
+++ apc.c Tue Dec 8 16:59:03 1998
|
||||
@@ -164,12 +164,12 @@
|
||||
}
|
||||
if((r->type & T_TYPE) == T_BINARY) {
|
||||
if(!bcmp(v1.val.binary, v0.val.binary, r->size)) {
|
||||
- syslog(LOG_WARNING, "apc_tune: toggle wraparound");
|
||||
+ syslog(LOG_WARNING, "apc_tune: toggle wraparound register %s", r->name);
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
if(v1.val.number == v0.val.number) {
|
||||
- syslog(LOG_WARNING, "apc_tune: toggle wraparound");
|
||||
+ syslog(LOG_WARNING, "apc_tune: toggle wraparound register %s", r->name);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
--- apc_static.c.orig Fri Aug 2 23:44:23 1996
|
||||
+++ apc_static.c Tue Dec 8 16:56:57 1998
|
||||
@@ -91,9 +91,12 @@
|
||||
{SMART_LOWBATDUR, {number: 7}},
|
||||
{SMART_LOWBATDUR, {number: 10}},
|
||||
|
||||
+ /* several models accept different values here */
|
||||
{SMART_WAKEUPBCAP, {number: 0}},
|
||||
{SMART_WAKEUPBCAP, {number: 10}},
|
||||
+ {SMART_WAKEUPBCAP, {number: 15}},
|
||||
{SMART_WAKEUPBCAP, {number: 25}},
|
||||
+ {SMART_WAKEUPBCAP, {number: 50}},
|
||||
{SMART_WAKEUPBCAP, {number: 90}},
|
||||
{SMART_WAKEUPBCAP, {number: 100}},
|
||||
|
Loading…
Reference in a new issue