Displaying 8 results from an estimated 8 matches for "ser_wait_usec".
Did you mean:
ser_wait_sec
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...PS");
@@ -333,7 +333,7 @@ void upsdrv_updateinfo(void)
}
/* these things need a long time to respond completely */
- usleep(200000);
+ struct timespec delay = {0, 200e6}; nanosleep(&delay, NULL);
ret = ser_get_line(upsfd, buf, sizeof(buf), ENDCHAR, "",
SER_WAIT_SEC, SER_WAIT_USEC);
Index: b/drivers/microdowell.c
===================================================================
--- a/drivers/microdowell.c 2011-08-17 00:40:17.000000000 +0300
+++ b/drivers/microdowell.c 2011-08-17 00:40:17.000000000 +0300
@@ -223,8 +223,9 @@ unsigned char * CmdSerial(unsigned char
/* The d...
2008 Jul 10
2
[PATCH] tripplite driver updates
...,6 @@
#include <math.h>
#include <ctype.h>
-#define ENDCHAR '\n' /* replies end with CR LF -- use LF to end */
-#define IGNCHAR '\r' /* ignore CR */
-#define MAXTRIES 3
-#define SER_WAIT_SEC 3 /* allow 3.0 sec for ser_get calls */
-#define SER_WAIT_USEC 0
-#define DEFAULT_OFFDELAY 64 /* seconds (max 0xFF) */
-#define DEFAULT_STARTDELAY 60 /* seconds (max 0xFFFFFF) */
-#define DEFAULT_BOOTDELAY 64 /* seconds (max 0xFF) */
-#define MAX_VOLT 13.4 /* Max battery voltage (100%) */
-#define MIN_VOLT 11.0 /* Min battery voltage (1...
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
2007 Jul 31
1
Proposed apcsmart driver patch
...ps.model: Smart-UPS
ups.serial: 09000717
ups.status: OL
ups.temperature: 051.3
ups.test.interval: 0
ups.test.result: NO
[Patches follow]
--- drivers/apcsmart.c~ 2006-11-07 18:08:45.000000000 -0800
+++ drivers/apcsmart.c 2007-07-27 12:52:10.000000000 -0700
@@ -532,15 +532,14 @@
SER_WAIT_SEC, SER_WAIT_USEC);
/* found one, force the model information */
- if (!strcmp(buf, "6QD")) {
+ if(!strcmp(buf, "8QD") || /* (SmartUPS 1250, vintage 07/94.) */
+ !strcmp(buf, "6QD") || /* (APC600.) */
+ !strcmp(buf, "6TI")) { /* (APC600.) */
upsdebugx(1, &q...
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.
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
-
2006 Jan 27
0
[PATCH] fentonups patch to make it work with some powercom ups's
...], model[32], *raw;
+ if (testvar("powercom")) {
+ set_powercom_lines();
+// straced from powercom's upsmon (reset?)
+ 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 str...
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
..., Boston, MA 02111-1307 USA
*/
/*
anything commented is optional
anything else is mandatory
*/
#include "main.h"
#include "serial.h"
#define UPSDELAY 50000 /* 50 ms delay required for reliable operation */
#define SER_WAIT_SEC 2 /* allow 2.0 sec for ser_get calls */
#define SER_WAIT_USEC 0
#define ENDCHAR '\r'
#define IGNCHARS " \n"
#if defined(__sgi) && ! defined(__GNUC__)
#define inline __inline
#endif
static int instcmd (const char *cmdname, const char *extra);
static int upsdrv_setvar (const char *varname, const char *val);
/* rated VA load...