search for: powpan_command

Displaying 2 results from an estimated 2 matches for "powpan_command".

2008 Dec 05
4
NUT 2.0.5 and 2.2.2 hacking -- there is something to improve!
...the load after xx minute(s) and return when power is back" CMDDESC shutdown.paused.return.xxyyyy "Turn off the load after xx minute(s) and return when power is back no sooner than after yyyy minutes" */ if (!strcasecmp(cmdname, "test.battery.start")) ret = powpan_command("T\r"); if (!strcasecmp(cmdname, "test.battery.stop")) ret = powpan_command("CT\r"); if (!strcasecmp(cmdname, "beeper.on")) ret = powpan_command("C7:1\r"); if (!strcasecmp(cmdname, "beeper.off")) ret = powpan_command("C7:0...
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
..._buf[sizeof(_buf)-1] = 0; if ( 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...