added sync and not executing set detector position in update mode

This commit is contained in:
maliakal_d 2021-10-19 07:58:54 +02:00
parent 51c2e78a31
commit 27c4d8652e

View File

@ -4319,21 +4319,20 @@ int copy_detector_server(int file_des) {
} }
#endif #endif
// sync // sync
if (ret == OK) { if (ret == OK) {
strcpy(cmd, "sync"); strcpy(cmd, "sync");
if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) {
ret = FAIL; ret = FAIL;
snprintf( snprintf(mess, MAX_STR_LENGTH,
mess, MAX_STR_LENGTH, "Could not copy detector server (sync). %s\n",
"Could not copy detector server (sync). %s\n", retvals);
retvals); // LOG(logERROR, (mess)); already printed in executecommand
// LOG(logERROR, (mess)); already printed in executecommand } else {
} else { LOG(logINFO, ("\tsync\n"));
LOG(logINFO, ("\tsync\n")); }
} }
} }
}
#endif #endif
return Server_SendResult(file_des, OTHER, retvals, sizeof(retvals)); return Server_SendResult(file_des, OTHER, retvals, sizeof(retvals));
} }
@ -4960,7 +4959,7 @@ int set_detector_position(int file_des) {
// only set // only set
if (Server_VerifyLock() == OK) { if (Server_VerifyLock() == OK) {
if (check_detector_idle("configure mac") == OK) { if (!updateFlag && check_detector_idle("configure mac") == OK) {
maxydet = args[0]; maxydet = args[0];
detectorId = args[1]; detectorId = args[1];
calculate_and_set_position(); calculate_and_set_position();