Imported Upstream version 2.6.4

This commit is contained in:
Arnaud Quette 2012-06-01 15:55:19 +02:00
parent fad6ced6f6
commit fefe62b2bd
257 changed files with 6020 additions and 1394 deletions

View file

@ -26,7 +26,7 @@
#include "blazer.h"
#define DRIVER_NAME "Megatec/Q1 protocol serial driver"
#define DRIVER_VERSION "1.51"
#define DRIVER_VERSION "1.55"
/* driver description structure */
upsdrv_info_t upsdrv_info = {
@ -37,7 +37,7 @@ upsdrv_info_t upsdrv_info = {
{ NULL }
};
#define SER_WAIT_SEC 1
#define SER_WAIT_SEC 1 /* 3 seconds for Best UPS */
/*
* Generic command processing function. Send a command and read a reply.
@ -58,7 +58,7 @@ int blazer_command(const char *cmd, char *buf, size_t buflen)
return ret;
}
upsdebugx(3, "send: %.*s", (int)strcspn(cmd, "\r"), cmd);
upsdebugx(3, "send: '%.*s'", (int)strcspn(cmd, "\r"), cmd);
ret = ser_get_buf(upsfd, buf, buflen, SER_WAIT_SEC, 0);
@ -67,7 +67,7 @@ int blazer_command(const char *cmd, char *buf, size_t buflen)
return ret;
}
upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf);
upsdebugx(3, "read: '%.*s'", (int)strcspn(buf, "\r"), buf);
return ret;
#else
const struct {