minor change in tecs driver M.Z.
This commit is contained in:
19
tecsdriv.c
19
tecsdriv.c
@@ -81,7 +81,7 @@
|
||||
int argc, char *argv[])
|
||||
{
|
||||
pEVControl self = NULL;
|
||||
char pBueffel[256], result[256];
|
||||
char pBueffel[256], result[1024];
|
||||
int iRet;
|
||||
pEVDriver pD;
|
||||
pTecsDriv pMe;
|
||||
@@ -147,7 +147,6 @@
|
||||
pTecsDriv pMe = NULL;
|
||||
int iRet;
|
||||
time_t now;
|
||||
static int configuring;
|
||||
|
||||
assert(self);
|
||||
pMe = (pTecsDriv)self->pPrivate;
|
||||
@@ -162,18 +161,6 @@
|
||||
|
||||
/* get temperature */
|
||||
iRet = TeccGet(pMe->pData, fPos);
|
||||
if (iRet > 0) {
|
||||
if (configuring) {
|
||||
iRet = TeccWait(pMe->pData);
|
||||
iRet = TeccGet(pMe->pData, fPos);
|
||||
} else {
|
||||
pMe->lastError = ": controller busy (configuring)";
|
||||
pMe->iLastError=2; /* fixable */
|
||||
configuring=1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
configuring=0;
|
||||
if(iRet < 0) {
|
||||
pMe->lastError = ErrMessage;
|
||||
pMe->iLastError=1; /* severe */
|
||||
@@ -243,8 +230,8 @@
|
||||
pMe = (pTecsDriv )self->pPrivate;
|
||||
assert(pMe);
|
||||
|
||||
iRet = TeccSend(pMe->pData, pCommand, pReply,iLen);
|
||||
if(iRet != 1)
|
||||
iRet = CocSetGetN(pMe->pData, "send", pCommand, pReply,iLen);
|
||||
if(iRet < 0)
|
||||
{
|
||||
pMe->lastError = ErrMessage;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user