configuing master from command lineg

This commit is contained in:
2022-02-25 16:03:11 +01:00
parent 5869c25658
commit 5566cfd24f
12 changed files with 463 additions and 272 deletions

View File

@ -393,19 +393,25 @@ void initControlServer() {
}
void initStopServer() {
usleep(CTRL_SRVR_INIT_TIME_US);
if (mapCSP0() == FAIL) {
LOG(logERROR,
("Stop Server: Map Fail. Dangerous to continue. Goodbye!\n"));
exit(EXIT_FAILURE);
}
if (!updateFlag && initError == OK) {
usleep(CTRL_SRVR_INIT_TIME_US);
LOG(logINFOBLUE, ("Configuring Stop server\n"));
if (mapCSP0() == FAIL) {
initError = FAIL;
strcpy(initErrorMessage,
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
LOG(logERROR, (initErrorMessage));
initCheckDone = 1;
return;
}
#ifdef VIRTUAL
sharedMemory_setStop(0);
// temp threshold and reset event (read by stop server)
setThresholdTemperature(DEFAULT_TMP_THRSHLD);
setTemperatureEvent(0);
sharedMemory_setStop(0);
// temp threshold and reset event (read by stop server)
setThresholdTemperature(DEFAULT_TMP_THRSHLD);
setTemperatureEvent(0);
#endif
}
initCheckDone = 1;
}
/* set up detector */