diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 97293d541..d7357ae17 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -324,7 +324,6 @@ u_int32_t getDetectorIP() { /* initialization */ void initControlServer() { - CreateNotificationForCriticalTasks(); if (initError == OK) { setupDetector(); } diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index 80675cf22..7c86e19f8 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -315,7 +315,6 @@ u_int32_t getDetectorIP() { /* initialization */ void initControlServer() { - CreateNotificationForCriticalTasks(); if (initError == OK) { setupDetector(); } diff --git a/slsDetectorServers/slsDetectorServer/include/programFpgaNios.h b/slsDetectorServers/slsDetectorServer/include/programFpgaNios.h index 27770b478..87633f0c7 100644 --- a/slsDetectorServers/slsDetectorServer/include/programFpgaNios.h +++ b/slsDetectorServers/slsDetectorServer/include/programFpgaNios.h @@ -8,16 +8,6 @@ /** Notify microcontroller of successful server start up */ void NotifyServerStartSuccess(); -/** create notification file to notify watchdog of critical tasks (to not - * shutdown) */ -void CreateNotificationForCriticalTasks(); - -/** write 1 to notification file to postpone shut down process if requested*/ -void NotifyCriticalTask(); - -/** write 0 to notification file to allow shut down process if requested */ -void NotifyCriticalTaskDone(); - /** reset fpga and controller(only implemented for >= v1.1 boards) */ void rebootControllerAndFPGA(); diff --git a/slsDetectorServers/slsDetectorServer/src/programFpgaNios.c b/slsDetectorServers/slsDetectorServer/src/programFpgaNios.c index d4310529b..92ceada2f 100644 --- a/slsDetectorServers/slsDetectorServer/src/programFpgaNios.c +++ b/slsDetectorServers/slsDetectorServer/src/programFpgaNios.c @@ -9,7 +9,6 @@ /* global variables */ #define MTDSIZE 10 char mtdvalue[MTDSIZE] = {0}; -#define NOTIFICATION_FILE "/tmp/block_shutdown" #define MICROCONTROLLER_FILE "/dev/ttyAL0" void NotifyServerStartSuccess() { @@ -20,38 +19,6 @@ void NotifyServerStartSuccess() { system(command); } -void CreateNotificationForCriticalTasks() { - FILE *fd = fopen(NOTIFICATION_FILE, "r"); - if (fd == NULL) { - fd = fopen(NOTIFICATION_FILE, "w"); - if (fd == NULL) { - LOG(logERROR, - ("Could not create notication file: %s\n", NOTIFICATION_FILE)); - return; - } - LOG(logINFOBLUE, - ("Created notification file: %s\n", NOTIFICATION_FILE)); - } - fclose(fd); - NotifyCriticalTaskDone(); -} - -void NotifyCriticalTask() { - LOG(logINFO, ("\tNotifying Critical Task Ongoing\n")); - char command[255]; - memset(command, 0, 255); - sprintf(command, "echo 1 > %s", NOTIFICATION_FILE); - system(command); -} - -void NotifyCriticalTaskDone() { - LOG(logINFO, ("\tNotifying Critical Task Done\n")); - char command[255]; - memset(command, 0, 255); - sprintf(command, "echo 0 > %s", NOTIFICATION_FILE); - system(command); -} - void rebootControllerAndFPGA() { LOG(logDEBUG1, ("Reseting FPGA...\n")); char command[255]; @@ -111,13 +78,11 @@ int eraseAndWriteToFlash(char *mess, char *fpgasrc, uint64_t fsize) { if (findFlash(mess) == FAIL) { return FAIL; } - NotifyCriticalTask(); eraseFlash(); // open file pointer to flash FILE *filefp = fopen(mtdvalue, "w"); if (filefp == NULL) { - NotifyCriticalTaskDone(); sprintf(mess, "Unable to open %s in write mode\n", mtdvalue); LOG(logERROR, (mess)); return FAIL; @@ -126,13 +91,11 @@ int eraseAndWriteToFlash(char *mess, char *fpgasrc, uint64_t fsize) { // write to flash if (writeFPGAProgram(mess, fpgasrc, fsize, filefp) == FAIL) { - NotifyCriticalTaskDone(); fclose(filefp); return FAIL; } fclose(filefp); - NotifyCriticalTaskDone(); return OK; }