Displaying 2 results from an estimated 2 matches for "bcd2i".
Did you mean:
bcd
2008 Jun 13
2
Best Ferrups reporting uptime in minutes, not seconds
...Simple patch:
diff -urN nut-2.2.1-dist/drivers/bestfcom.c nut-2.2.1/drivers/bestfcom.c
--- nut-2.2.1-dist/drivers/bestfcom.c 2008-06-13 14:04:07.000000000 -0500
+++ nut-2.2.1/drivers/bestfcom.c 2008-06-13 14:05:00.000000000 -0500
@@ -277,8 +277,8 @@
/* AC line frequency */
acfreq = ((double)bcd2i(&fstring[54], 4) / 100.0);
- /* Runtime remaining */
- btimeleft = bcd2i(&fstring[58], 4);
+ /* Runtime remaining (UPS reports minutes) */
+ btimeleft = bcd2i(&fstring[58], 4) * 60;
if (fc.model != FDxxxx) {
/* Iout. int times 10 */
--
Chris Adams <cmadams at hiwaa...
2011 Oct 03
0
patch: Fix [-Wunused-but-set-variable]
...percent=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 = bcd2i(&fstring[16], 2);
Index: b/drivers/etapro.c
===================================================================
--- a/drivers/etapro.c 2011-05-31 13:36:49.000000000 +0300
+++ b/drivers/etapro.c 2011-08-17 00:23:22.000000000 +0300
@@ -213,7 +213,6 @@ upsdrv_initinfo(void)
void
upsdrv_updatei...