search for: mode_open

Displaying 6 results from an estimated 6 matches for "mode_open".

Did you mean: mace_open
2007 Aug 24
1
[nut-commits] svn commit r1074 - in trunk: . drivers
...ransparently. I suggest reversing this change. > * drivers/usbhid-ups.c: > - The behaviour of reconnect is now depending on the 'reloadmatcher' > variable. By default, it uses 'exact' matches, but this can be > changed to 'regex', which me ans that it will use MODE_OPEN instead > of MODE_REOPEN. Essentially, it will beha ve exactly like starting > again. Shouldn't the default be to use exact matching whenever possible, and fall back to MODE_OPEN matching on failure (i.e., the currently intended behavior)? The other choice, which a user might request, is...
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...I envision that the code in usbhid-ups:reconnect_ups() could be changed to something like: hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, MODE_REOPEN); if (hd == NULL) { /* reopening failed, try opening new device */ hd = HIDOpenDevice(&udev, &curDevice, regex_matcher, MODE_OPEN); } if (hd == NULL) { return 0; } Note "regex_matcher", not "reopen_matcher", in the second call, and also the changed MODE flag. Then all the complicated stuff could be removed from libhid/libusb (different non-zero return codes for matchers etc). I am not sure the code...
2007 Feb 08
3
Re: [nut-commits] svn commit r801 - in branches/megatec-usb: . drivers
...==================== > --- branches/megatec-usb/drivers/megatec_usb.c (original) > +++ branches/megatec-usb/drivers/megatec_usb.c Thu Feb 8 16:43:43 2007 > @@ -152,7 +152,7 @@ > } > } > > - ret = usb->open(&udev,&hiddevice,&match,u.report_desc,MODE_OPEN); > + ret = usb->open(&udev,&hiddevice,&match,u.report_desc,MODE_REOPEN); > if (ret<0) > usb_open_error(port); > > > _______________________________________________ > nut-commits mailing list > nut-commits@lists.alioth.debian.org > ht...
2007 Jan 23
2
Voltage override in megatec and megatec-over-usb [was: Re: nut-2.0.5 megatec + Online Xanto]
On 1/23/07, Henning Brauer <hb-nut@bsws.de> wrote: > good new first: the megatec driverin 2.0.5 now works with the Online > Xanto S3000R here - well, for the very basics. > > the UPS has NO way ofidentifying itself. It also does not respond to > the power ratings query ("F"). I previously used a hacked up fentonups > driver. This means the driver cannot figure out
2007 Feb 01
2
Re: [Nut-upsuser] Ablerex 625L USB version
...ogx(LOG_ERR, > + "comm_usb_open: invalid usb device specified, must > be \"auto\" or \"vid:pid\""); > + return -1; > + } > + } > + > + ret = usb->open(&udev,&hiddevice,&match,u.report_desc,MODE_OPEN); > + if (ret<0) > + return ret; > + > + // flush input buffers > + for (i=0;i<10;i++) > + { > + upsdebugx(4, "comm_usb_open: Flush buffers"); > + if (comm_usb_recv(u.flush_buf,sizeof(u.flush_buf),0,NULL)<1) break; &g...
2006 Dec 05
3
megatec over USB - new driver patch
...arg; + } else { + upslogx(LOG_ERR, + "comm_usb_open: invalid usb device specified, must be \"auto\" or \"vid:pid\""); + return -1; + } + } + + ret = usb->open(&udev,&hiddevice,&match,u.report_desc,MODE_OPEN); + if (ret<0) + return ret; + + // flush input buffers + for (i=0;i<10;i++) + { + if (comm_usb_recv(u.flush_buf,sizeof(u.flush_buf),0,NULL)<1) break; + } + + return 0; +} + +static void comm_usb_close(const char *param) +{ + usb->close(udev); +} + +s...