Displaying 3 results from an estimated 3 matches for "battperc".
Did you mean:
battery
2013 Feb 27
1
some help in using the package NUT in a perl script
Hello,
I want use the package NUT in a script perl, i wonder how
use the result of method such as BattPercent() for example.
here is my
code :
_#!/usr/bin/perl -w_
_# server_
_use strict;_
_#use
/etc/nut/dev/modules;_
_#use IO::Socket::Multicast;_
_use
UPS::Nut;_
_my $message = localtime;_
_$message .=" `who` . n";_
_print
"-- test : $message n";_
_my $ups = new UPS::Nut(_
_ N...
2013 May 11
1
Best Ferrups (bestfcom patch)
...driver source...
I propose the following patch to fix the battery.charge (% battery full) reading.
--- bestfcom.c.orig 2012-07-31 12:38:59.000000000 -0500
+++ bestfcom.c 2013-05-11 09:39:52.155279710 -0500
@@ -332,7 +332,7 @@
/* Compute battery percent left based on battery voltages. */
battpercent = ((vbatt - fc.emptyvolts)
- / (fc.fullvolts - fc.emptyvolts) * 100.0);
+ / (fc.idealbvolts - fc.emptyvolts) * 100.0);
if (battpercent < 0.0)
battpercent = 0.0;
else if (battpercent > 100.0)
The patch is based on version 2.6.5
Thanks for your consideration. I k...
2011 Oct 03
0
patch: Fix [-Wunused-but-set-variable]
...ex: b/drivers/bestfcom.c
===================================================================
--- a/drivers/bestfcom.c 2011-05-31 13:36:49.000000000 +0300
+++ b/drivers/bestfcom.c 2011-08-17 00:23:22.000000000 +0300
@@ -260,13 +260,10 @@ void upsdrv_updateinfo(void)
double ampsout=0.0, vbatt=0.0, battpercent=0.0, loadpercent=0.0,
upstemp=0.0, acfreq=0.0;
- char date[9], time[9], tmp[32];
+ char tmp[32];
upsdebugx(3, "f response: %d %s", (int)strlen(fstring), fstring);
- date[0]='\0';
- time[0]='\0';
-
/* Inverter status. 0=off 1=on */
inverter = bcd2...