Displaying 9 results from an estimated 9 matches for "upsdebug_hex".
2011 Oct 03
0
patch: Fix [-Wunused-but-set-variable]
..._packet_recv (u_char *Buf, int d
{
if(serial_read (DEFAULT_TIMEOUT, &Start[0]) >= 0)
{
- sdata.shut_pkt.bType = Start[0];
if(Start[0]==SHUT_SYNC)
{
upsdebugx (4, "received SYNC token");
@@ -819,7 +817,6 @@ int shut_packet_recv (u_char *Buf, int d
{
upsdebug_hex(3, "Receive", Start, 2);
Size=Start[1]&0x0F;
- sdata.shut_pkt.bLength = Size;
for(recv=0;recv<Size;recv++)
if(serial_read (DEFAULT_TIMEOUT, &Frame[recv]) < 0)
break;
Index: b/drivers/microdowell.c
===============================================...
2009 Jan 27
0
[PATCH] al175: updated driver, please restore it
...ers in the tree that are impossible to
understand after the original author has lost interest in maintaining
it.
Also, use library calls as much as possible. Don't add new functions
with almost the same functionality. Pretty printing ASCII control
characters in addition to the existing upsdebug_hex may be useful for
someone very familiar with the protocol used, but usually it is much
more informative if you decode the meaning of a message. So instead of
pretty printing the header, break up the elements and list them. The
upsdebug_hex function should be used only to display raw data fo...
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...r > 0 )
Index: b/drivers/powerp-bin.c
===================================================================
--- a/drivers/powerp-bin.c 2011-05-31 13:36:49.000000000 +0300
+++ b/drivers/powerp-bin.c 2011-08-17 00:40:17.000000000 +0300
@@ -232,7 +232,7 @@ static int powpan_command(const char *bu
upsdebug_hex(3, "send", buf, bufsize);
- usleep(100000);
+ struct timespec delay = {0, 100e6}; nanosleep(&delay, NULL);
ret = ser_get_buf_len(upsfd, powpan_answer, bufsize-1, SER_WAIT_SEC, SER_WAIT_USEC);
@@ -427,7 +427,7 @@ static int powpan_status(status_t *statu
upsdebug_hex(3, &quo...
2018 Feb 04
0
[PATCH 2/3] Add generic facility to override HID report descriptor in usbhid-ups
..._t udev, HIDDevice_t *hd, unsigned char *rdbuf, int rdlen)
{
int i;
- const char *mfr = NULL, *model = NULL, *serial = NULL;
+ const char *mfr = NULL, *model = NULL, *serial = NULL, *descfile;
#ifndef SHUT_MODE
int ret;
#endif
upsdebugx(2, "Report Descriptor size = %d", rdlen);
upsdebug_hex(3, "Report Descriptor", rdbuf, rdlen);
+ /* Check whether we have an override descriptor */
+ descfile = getval("hid_descriptor");
+ if (descfile) {
+ unsigned char *buf;
+ size_t size;
+ FILE *f;
+
+ f = fopen(descfile, "r");
+ if (!f) {
+ upslog_with_errno(L...
2008 Feb 08
0
[nut-commits] svn commit r1285 - in trunk: . common include
> Author: adkorte-guest
> Date: Fri Feb 8 07:09:51 2008
> New Revision: 1285
>
> Log:
> Cleanup and change the arguments to the upsdebug_hex() function so that it
> no longer requires casting to an unsigned char.
>
> Modified:
> trunk/ChangeLog
> trunk/common/common.c
> trunk/include/common.h
>
> Modified: trunk/ChangeLog
I would like to do something similar to the following ser_* functions:
ser_send_...
2008 Nov 30
4
Sweex 1000VA UPS (Lakeview Research)
Hi all,
i've read a thread about this UPS from Peter van Valderen. He tried to
develop a
driver for this specific type of UPS. I've downloaded nut-2.2.2 and tried to
apply
the patches (lakeview.patch & lakeview.v2.patch) but both resulted in
rejected
chunks. I've tried to ./configure with type lakeview and then a make, but
the make
command fails.
Does anybody has any
2013 Nov 18
2
[PATCH] al175: updated driver, please restore it
...;t have the hardware now, but I hope this is
> > > ok.
> > >
> > > (one place still uses fprintf(stderr, ...) but that's because it is
> > > difficult to construct one line through several calls to upsdebug,
> > > although sure this is doable, like upsdebug_hex does. Mine has pretty
> > > printing for control ascii characters, and I'd better leave it there,
> > > because as I recall this was usefull for debugging. I hope this is not
> > > a show-stopper.)
> > >
> > >
> > > > It also helps und...
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...if (*udevp != NULL) {
> @@ -623,7 +674,7 @@
> if (ReportSize < 0)
> return NULL;
>
> - if (mode == MODE_REOPEN) {
> + if (*mode == MODE_REOPEN) {
> upsdebugx(4, "Device reopened successfully");
> return hd;
> }
> @@ -632,6 +683,7 @@
> upsdebug_hex(3, "Report Descriptor", ReportDesc, ReportSize);
>
> /* Parse Report Descriptor */
> + Free_ReportDesc(pDesc);
> pDesc = Parse_ReportDesc(ReportDesc, ReportSize);
> if (!pDesc) {
> HIDCloseDevice(*udevp);
> @@ -639,6 +691,7 @@
> }
>
> /* prep...
2018 Feb 04
5
[PATCH 0/3] OpenUPS updates
Hi,
I've been checking out NUT with an OpenUPS board over the last couple
of weekends, and have noticed that it doesn't seem to report sensible
values. This lead me to investigate usbhid-ups and delve into various
issues.
As mentioned in a github issue, one of the problems is with the report
descriptor - dumping this from the usbhid-ups debug output and picking
through it reveals that