search for: addvar

Displaying 20 results from an estimated 28 matches for "addvar".

2006 Jun 03
1
RFC: allow HID subdriver's to register ups.conf settings
...char *(*format_serial)(HIDDevice *hd); void (*extendvartable)(void); }; - In the subdriver source, add an extra function, subdriver_extendvartable(). I'm currently working on belkin-hid.c, so it would have; void belkin_extendvartable(void) { addvar(VAR_FLAG, "wait", "Wait for AC power "); addvar(VAR_VALUE,"wait", "Wait for AC power and battery level "); /* ... */ } The other HID drivers, I guess, could simply have empty functions at...
2006 Nov 26
1
Patch for optiups to support Zinto D from ONLINE USV-Systeme AG
..."Cu0000060" ); + /* Shutdown in 30 seconds */ + optiquery( "Cs0000030" ); + return; + } + /* Just cycling power, schedule output stage to come back on in 60 seconds */ if ( !(s&OPTISBIT_ON_BATTERY_POWER) ) optiquery( "Cu00000600" ); @@ -349,6 +485,7 @@ addvar(VAR_FLAG, OPTI_MINPOLL, "Only poll for critical status variables"); addvar(VAR_FLAG, OPTI_FAKELOW, "Fake a low battery status" ); addvar(VAR_FLAG, OPTI_NOWARN_NOIMP, "Supress warnings of unsupported commands"); + addvar(VAR_FLAG, OPTI_ZINTO, "UPS is a Zinto D...
2020 Apr 03
0
Powercool PCRACK-1200VA patch update
...   "USB communication driver"  #define USB_DRIVER_VERSION    "0.33" +  /* driver description structure */  upsdrv_info_t comm_upsdrv_info = {      USB_DRIVER_NAME, @@ -52,6 +53,10 @@ static void libusb_close(usb_dev_handle *udev);  /*! Add USB-related driver variables with addvar().   * This removes some code duplication across the USB drivers.   */ +#define USB_BUFLEN_MAX 256 +static int                langid_fix = -1; +static int                buflen_fix = -1; +  void nut_usb_addvars(void)  {      /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */...
2012 Jan 09
1
bestups bug fix
hi all, really simple fix for the bestups driver: In function: upsdrv_makevartable() you need to add the line addvar(VAR_VALUE, "battvoltmult", "Battery voltage multiplier"); There are a number of simple improvements I could make to this driver, but I'm assuming that since the above bug has been around since nut v2.4, not many people are using this driver. Is this driver worth improving...
2023 Nov 05
1
Passing hid_rep_index to libusb_get_config_descriptor is wrong?
@jimklimov: Looking at the code that uses hid_rep_index, hid_desc_index, and hid_ep_in|out in usb_subdriver (all in nut_libusb.h) I don't see any use of the addvars mechanism. If I follow the examples that set and use those struct members, it looks like everything relies on them being initialized to 0 by default, then only set in subdrivers or situations that need something different. If I have this right, I'll just follow that example, test, and submit...
2023 Nov 05
1
Passing hid_rep_index to libusb_get_config_descriptor is wrong?
...ing 0 would be better than the current code, because 0 is what happens with not-composite devices (most UPS devices) and I bet even among the composite ones, there's only one config descriptor on the device I'll look at doing changes you mentioned. I've looked only briefly at the "addvars" code, so I don't know if it's possible to have a default without requiring subdriver authors to worry about this. Most won't care and we shouldn't make them. It should just be there as an option in case someone needs to support a really unusual device. Looking at the codebas...
2009 Feb 04
2
[nut-commits] svn commit r1765 - in trunk: . drivers man
...ot;, "%04X", > ups.ShortStatus) ; > 905 dstate_setinfo("ups.time", "%02d:%02d:%02d", > p[6], p[7], p[8]) ; The above is a waste of effort. By the time upsdrv_shutdown() runs, the server won't be listening anymore. > 958 addvar(VAR_VALUE, "ups.delay.shutdown", "Override > shutdown delay (120s)"); > 959 addvar(VAR_VALUE, "ups.delay.start", "Override restart > delay (10s)"); This doesn't work without using getval() somewhere in the driver. > 971...
2018 Feb 04
0
[PATCH 2/3] Add generic facility to override HID report descriptor in usbhid-ups
....c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/drivers/usbhid-ups.c b/drivers/usbhid-ups.c index 954fa54..5a4d6db 100644 --- a/drivers/usbhid-ups.c +++ b/drivers/usbhid-ups.c @@ -748,6 +748,8 @@ void upsdrv_makevartable(void) #else addvar(VAR_VALUE, "notification", "Set notification type, (ignored, only for backward compatibility)"); #endif + + addvar(VAR_VALUE, "hid_descriptor", "Replacement HID descriptor file"); } #define MAX_EVENT_NUM 32 @@ -1093,16 +1095,52 @@ static void process_boo...
2010 Jan 10
0
ordering of additional columns in forest plot in meta package
...m event nrs event[event<0]<-0 # to avoid a negative value error n <- round(rnorm(nr.studies,100,25),0) # random totals mydata <- data.frame(cbind(lbls,rnd.subgroup1,rnd.subgroup2,rnd.subgroup3,event,n)) mydata a <- metaprop(event,n,studlab=lbls) a$rnd.subgroup1 <- addvar(a,mydata,"rnd.subgroup1",by.y="lbls") a$rnd.subgroup2 <- addvar(a,mydata,"rnd.subgroup2",by.y="lbls") grid.newpage() forest(a, studlab=lbls, comb.fixed=T,comb.random=F,overall=T, text.fixed="my title here", byvar=rnd.subgroup1, print.byvar=T...
2006 Jan 27
0
[PATCH] fentonups patch to make it work with some powercom ups's
...et?) + ret = ser_send(upsfd, "%c%c%c%c%c\r", 1, 2, 2, 3, 5); + ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, "", + SER_WAIT_SEC, SER_WAIT_USEC); + } raw = get_id(); if (!raw) @@ -426,6 +445,7 @@ void upsdrv_help(void) void upsdrv_makevartable(void) { addvar(VAR_VALUE, "lowbattvolt", "Set low battery level, in volts"); + addvar(VAR_FLAG, "powercom", "Set signal lines for PowerCOM UPS (method straced from PowerCOM's upsmon)"); } void upsdrv_banner(void) --- nut-2.0.2/drivers/fentonups.h.orig 2005-05-04 12:...
2006 May 29
0
newhidups subdrivers and ups.conf
Hi Is there any way to have a newhidups subdriver register that is can handle settings from ups.conf, as per a "normal" nut driver? In, for example, belkinunv.c, there are various addvar() calls in the upsdrv_makevartable() function, but I can't work out where addvar() calls should be put in an HID subdriver. Thanks Jo Turner -)O(-
2011 Jan 25
1
[RFC] Updates to ACP smart driver
This patch introduces a handful of new options, I mentioned earlier in: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02088.html See the large commit message in the follow-up for the details and rationale. I realize it's a bit larger diff - so if it's required I can split it into few smaller ones. Michal Soltys (1): APC smart driver update and new features.
2023 Apr 19
2
Enhanced driver troubleshooting
...upstools/nut/pull/1912 (and probably some more later), I've been enhancing NUT driver framework with support for live reload of configuration, primarily to acknowledge changes to debug_min setting in ups.conf - but made in a generic fashion that specific drivers may take advantage of for their `addvar`'ed options handling (as a separate effort from users/maintainers of those drivers). Live testing and other forms of review would be welcome :) Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachm...
2023 Apr 19
2
Enhanced driver troubleshooting
...upstools/nut/pull/1912 (and probably some more later), I've been enhancing NUT driver framework with support for live reload of configuration, primarily to acknowledge changes to debug_min setting in ups.conf - but made in a generic fashion that specific drivers may take advantage of for their `addvar`'ed options handling (as a separate effort from users/maintainers of those drivers). Live testing and other forms of review would be welcome :) Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachm...
2011 Mar 05
19
[RFC apcsmart V3 00/18] apcsmart driver updates
Sorry for a bit longer delay than I anticipated, I was stuffed with the work. This is the next iteration of the patch adding some functionality to apcsmart driver, and relying on 'ignorelb' recently added. Follow up from previous thread: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02331.html Main differences is that V3 is split into many small patches, so the
2020 Apr 03
0
Patch to support Powercool PCRACK-1200VA
...uler UP-M500VA */ +    { USB_DEVICE(0x0001, 0x0000),    NULL,        "MEC0003",     &krauler_subdriver },    /* Powercool PCRACK-1200VA */      /* End of list */      { -1,    -1,    NULL,    NULL,    NULL }  }; @@ -1651,6 +1660,9 @@ void    upsdrv_makevartable(void)      nut_usb_addvars();      addvar(VAR_VALUE, "langid_fix", "Apply the language ID workaround to the krauler subdriver (0x409 or 0x4095)"); + +    addvar(VAR_VALUE, "buflen_fix", "Apply the buflen workaround to the krauler subdriver"); +  #endif    /* QX_USB */  #ifdef Q...
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
..., p); return STAT_INSTCMD_HANDLED; } upslogx(LOG_INFO, "instcmd: unknown command %s", cmdname); return STAT_INSTCMD_UNKNOWN; } void upsdrv_help(void) { } /* list flags and values that you want to receive via -x */ void upsdrv_makevartable(void) { /* allow '-x xyzzy' */ /* addvar(VAR_FLAG, "xyzzy", "Enable xyzzy mode"); */ /* allow '-x foo=<some value>' */ /* addvar(VAR_VALUE, "foo", "Override foo setting"); */ addvar (VAR_VALUE, "baudrate", "serial line speed"); addvar (VAR_VALUE, "max_loa...
2023 Nov 05
1
Passing hid_rep_index to libusb_get_config_descriptor is wrong?
...busb code is not mine except the recent layers of cleanup). I guess I did not even realize that there is more than the regularly mentioned "interface number" to juggle here. So if you manage to reliably pinpoint which interface concept applies where, and add configurability to that with `addvar()` in `drivers/libusb1.c` (and `drivers/libusb0.c` if applicable/possible there) and `docs/man/nut_usb_addvars.txt` -- so this change applies consistently to all USB-aware drivers, and if it all works - that would be a welcome improvement :D Jim On Sun, Nov 5, 2023 at 11:29?PM Kelly Byrd <kby...
2010 Dec 06
3
Appearance of Forest Plot
Hi All, I have conducted a meta analysis using the metabin function. I want to plot 5 subgroups on the same forest plot. I have managed to do this using the byvar argument but when i plot the forest plot in R graphics I am unable to view the very top and very bottom of the image. It is as though the plot is too long. Is there a way in which I can ask R to show the entire plot within the
2011 Feb 07
4
[PATCH/RFC v2 0/3] Updates to ACP smart driver
This is 2nd version of the earlier patch featuring a few new features and fixes to the apcsmart driver, following the remarks in: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02294.html Major changes from v1: - handle battery.charge and battery.runtime checks at main.c level - handle "immutable but writable" conflict gracefully at driver level -