mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-07-12 19:01:50 +02:00
update mode added. need to fix why udpatemode get and set not in allowed functions
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
The port number is passed as an argument */
|
||||
|
||||
#include "clogger.h"
|
||||
#include "common.h"
|
||||
#include "communication_funcs.h"
|
||||
#include "sharedMemory.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
@ -48,6 +49,18 @@ int main(int argc, char *argv[]) {
|
||||
checkModuleFlag = 1;
|
||||
int version = 0;
|
||||
|
||||
// update flag if update file exists (command line arg overwrites)
|
||||
const int fileNameSize = 128;
|
||||
char fname[fileNameSize];
|
||||
if (getAbsPath(fname, fileNameSize, UPDATE_FILE) == FAIL) {
|
||||
LOG(logERROR, ("Could not get abs path to check if update file exists. "
|
||||
"Will try current folder instead.\n"));
|
||||
strcpy(fname, UPDATE_FILE);
|
||||
}
|
||||
if (access(fname, F_OK) == 0) {
|
||||
updateFlag = 1;
|
||||
}
|
||||
|
||||
// help message
|
||||
char helpMessage[MAX_STR_LENGTH];
|
||||
memset(helpMessage, 0, MAX_STR_LENGTH);
|
||||
|
Reference in New Issue
Block a user