*** empty log message ***
This commit is contained in:
27
tecs/tecs.c
27
tecs/tecs.c
@@ -5,9 +5,6 @@
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "myc_mem.h"
|
||||
#include "myc_err.h"
|
||||
#include "coc_util.h"
|
||||
@@ -17,7 +14,6 @@
|
||||
#include "myc_time.h"
|
||||
#include "tecs_lsc.h"
|
||||
#include "tecs_data.h"
|
||||
#include "logger.h"
|
||||
|
||||
/* --- non ANSI signal --- */
|
||||
#ifndef SIGPIPE
|
||||
@@ -174,7 +170,7 @@ static int
|
||||
lockAlarm,
|
||||
cntError;
|
||||
|
||||
static int tim, rdTim; /* actual time, read Time */
|
||||
int tim, rdTim; /* actual time, read Time */
|
||||
|
||||
static int decod[8]={21,20,17,16,5,4,1,0}; /* for code conversion */
|
||||
|
||||
@@ -682,6 +678,8 @@ again:
|
||||
} else if (tLimit>tMaxLimit) {
|
||||
tLimit=tMaxLimit;
|
||||
}
|
||||
maxPowerFlt=25;
|
||||
sscanf(maxPower, "%f", &maxPowerFlt);
|
||||
for (i=j; i<j+2; i++) {
|
||||
s=sensors[i];
|
||||
typ=s->type[0];
|
||||
@@ -1410,6 +1408,8 @@ void CalcMaxPower(void) {
|
||||
str_append(maxPower, ")");
|
||||
}
|
||||
maxCurrent=sqrt(best->p/resist);
|
||||
iRange = best->iRange;
|
||||
iAmp = best->iAmp;
|
||||
assert(maxCurrent>0);
|
||||
}
|
||||
}
|
||||
@@ -1509,7 +1509,7 @@ int SetMaxPower(void) {
|
||||
fbuf=FakeScale(ctlSens, tLimit);
|
||||
if (loop==1) {
|
||||
PidSumHdl(COC_RD, NULL, 0);
|
||||
if (!initMaxPower && lastCurrent != maxCurrent) {
|
||||
if (!initMaxPower && lastCurrent != maxCurrent && lastCurrent != 0) {
|
||||
logfileOut(LOG_MAIN, "pid: %s\nlast %f max %f\n", pid, lastCurrent, maxCurrent);
|
||||
prop=prop*lastCurrent/maxCurrent;
|
||||
}
|
||||
@@ -2844,7 +2844,6 @@ int main(int argc, char *argv[]) {
|
||||
int i, iret;
|
||||
char *inistr;
|
||||
char buf[256], opt;
|
||||
char loggerDir[256];
|
||||
|
||||
signal(SIGPIPE, ignore_forever);
|
||||
|
||||
@@ -3065,18 +3064,8 @@ int main(int argc, char *argv[]) {
|
||||
str_copy(statusBuf, "starting up");
|
||||
logfileStatusBuf(statusBuf);
|
||||
|
||||
if (logDir[0] == '/') {
|
||||
str_copy(buf, logDir);
|
||||
} else {
|
||||
getcwd(buf, sizeof buf);
|
||||
str_append(buf, "/");
|
||||
ERR_I(str_append(buf, logDir));
|
||||
}
|
||||
ERR_I(str_append(buf, serverId));
|
||||
ERR_I(str_copy(loggerDir, buf));
|
||||
mkdir(loggerDir, S_IRWXU+S_IRGRP+S_IXGRP+S_IROTH+S_IXOTH);
|
||||
/* do not check return value */
|
||||
LoggerSetDir(loggerDir);
|
||||
str_copy(buf, logDir);
|
||||
str_append(buf, serverId);
|
||||
logfile=logfileInit(buf, logIt, use_stdout, logIt && use_stdout);
|
||||
CocDefStr(logfile, RD);
|
||||
logfileOut(LOG_MAIN ,"\n");
|
||||
|
||||
Reference in New Issue
Block a user