search for: hex2d

Displaying 9 results from an estimated 9 matches for "hex2d".

2008 Jul 10
2
[PATCH] tripplite driver updates
...Patch is against 2.2.2. Detailed changes: - Update comment for tripplite documentation URL; appears to be dead now. - Move #defines to tripplite.h - Remove a useless static float definition and replace with an inline constant; saves .text space, easier to read, and optimizes better. - Open code hex2d() buffer handling. strncpy's edge case is ugly. The old code could never overflow, but was harder to read. - send_cmd() now flushes both input and output buffers on exit or failure. This change guards against corrupted serial port i/o between send_cmd() calls. - Squash a harmless unsign...
2014 May 19
2
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
...if(tl_model == TRIPP_LITE_SMARTPRO) { - battery_charge = (unsigned)(s_value[5]); - dstate_setinfo("battery.charge", "%u", battery_charge); - } } @@ -1167,9 +1167,22 @@ hex2d(d_value+1, 2) * input_voltage_scaled / 120); bv = hex2d(d_value+3, 2) * battery_voltage_nominal / 120.0 ; - + // bv is 48V nominal rather than 12V + dstate_setinfo("battery.voltage", "%.2f", bv); + if(tl_model == TR...
2014 May 20
0
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
...LITE_SMARTPRO) { > - battery_charge = (unsigned)(s_value[5]); > - dstate_setinfo("battery.charge", "%u", battery_charge); > - } > } > > @@ -1167,9 +1167,22 @@ > hex2d(d_value+1, 2) * input_voltage_scaled / 120); > > bv = hex2d(d_value+3, 2) * battery_voltage_nominal / 120.0 ; Does battery_voltage_nominal get set correctly? Theoretically, it should be 48, since the 2nd and 3rd digits of ups.debug.V are 08, and that gets multiplied by 6. Mi...
2014 May 16
0
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
On May 15, 2014, at 9:39 PM, Stefan Bruda wrote: > What bugs be though is that I cannot seem to be able to read the > remaining run time on battery. The battery charge is also widely > inaccurate (it drops to zero really fast and stays there). I read > somewhere that the usb.debug numbers may hold the key to this (at > least to the running time that is), but I don't know what
2014 May 16
2
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
Hello, I own an older Tripp Lite SMART3000RM2U (protocol 3003). It does not work with usbhid-ups but it mostly works with the tripplite_usb driver (nut 2.7.1, the latest in the Gentoo tree), in the sense that the status (on line, on battery, etc.) is detected correctly, the machine is shut down on critical battery, and I can even get some information from the UPS. This is how it all looks:
2006 Oct 11
2
Adding TrippLite SMART550 / Protocol 2001 Support
...TRIPP_LITE_OMNIVS2 ) { ret = send_cmd(b_msg, sizeof(b_msg), b_value, sizeof(b_value)); if(ret <= 0) { dstate_datastale(); @@ -1037,6 +1079,7 @@ switch(tl_model) { case TRIPP_LITE_OMNIVS: + case TRIPP_LITE_OMNIVS2: dstate_setinfo("output.voltage", "%.1f", hex2d(l_value+1, 4)/2.0); break; case TRIPP_LITE_SMARTPRO: @@ -1047,7 +1090,7 @@ break; } - if(tl_model != TRIPP_LITE_OMNIVS) { + if(tl_model != TRIPP_LITE_OMNIVS && tl_model != TRIPP_LITE_OMNIVS2) { debug_message("D", 2); debug_message("V", 2);
2014 May 22
2
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
...battery_charge = (unsigned)(s_value[5]); > > - dstate_setinfo("battery.charge", "%u", battery_charge); > > - } > > } > > > > @@ -1167,9 +1167,22 @@ > > hex2d(d_value+1, 2) * input_voltage_scaled / 120); > > > > bv = hex2d(d_value+3, 2) * battery_voltage_nominal / 120.0 ; > > Does battery_voltage_nominal get set correctly? Theoretically, it > should be 48, since the 2nd and 3rd digits of ups.debug.V are 08, &gt...
2014 Sep 25
2
TRIPPLITE OMNIVSINT80 Compatibility
...e and 1.95 for input voltage as reported by my main UPS). Whether there is anything being returned that helps differentiate its a 240v model I dont know. This is, at least, consistent with decode_v() in the driver src: void decode_v(const unsigned char *value) { unsigned char ivn, lb; int bv = hex2d(value+2, 2); ivn = value[1]; lb = value[4]; switch(ivn) { case '0': input_voltage_nominal = input_voltage_scaled = 100; break; case '1': input_voltage_nominal = input_voltage_scaled = 120; break; case '2': input_voltage_nominal = i...
2005 Nov 08
0
gcc4 noise
...edness gcc -I../include -O -Wall -Wsign-compare -c bcmxcp_usb.c bcmxcp_usb.c: In function get_answer: bcmxcp_usb.c:47: warning: pointer targets in passing argument 3 of usb_interrupt_read differ in signedness gcc -I../include -O -Wall -Wsign-compare -c tripplite_usb.c tripplite_usb.c: In function hex2d: tripplite_usb.c:350: warning: pointer targets in passing argument 1 of __builtin_strncpy differ in signedness tripplite_usb.c:350: warning: pointer targets in passing argument 2 of __builtin_strncpy differ in signedness tripplite_usb.c:352: warning: pointer targets in passing argument 1 of strtol...