Imported Upstream version 2.7.4
This commit is contained in:
parent
fd413a3168
commit
c9cb2187ee
290 changed files with 7473 additions and 2607 deletions
|
|
@ -125,7 +125,7 @@
|
|||
#include "serial.h"
|
||||
|
||||
#define DRIVER_NAME "Tripp Lite SmartOnline driver"
|
||||
#define DRIVER_VERSION "0.03"
|
||||
#define DRIVER_VERSION "0.05"
|
||||
|
||||
/* driver description structure */
|
||||
upsdrv_info_t upsdrv_info = {
|
||||
|
|
@ -296,7 +296,7 @@ static int do_command(char type, const char *command, const char *parameters, ch
|
|||
I don't like that, so I remove them. This is safe to
|
||||
do with all responses for this protocol, so I just
|
||||
do that here. */
|
||||
rtrim(response, ' ');
|
||||
str_rtrim(response, ' ');
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -552,6 +552,11 @@ static int init_comm(void)
|
|||
char response[MAX_RESPONSE_LENGTH];
|
||||
|
||||
ups.commands_available = 0;
|
||||
/* Repeat enumerate command 2x, firmware bug on some units garbles 1st response */
|
||||
if (do_command(POLL, AVAILABLE, "", response) <= 0){
|
||||
upslogx(LOG_NOTICE, "init_comm: Initial response malformed, retrying in 300ms");
|
||||
usleep(3E5);
|
||||
}
|
||||
if (do_command(POLL, AVAILABLE, "", response) <= 0)
|
||||
return 0;
|
||||
i = strlen(response);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue