mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
eiger: validate trimval range
This commit is contained in:
@ -2910,10 +2910,16 @@ int set_all_trimbits(int file_des) {
|
||||
|
||||
// set
|
||||
if (arg >= 0 && Server_VerifyLock() == OK) {
|
||||
ret = setAllTrimbits(arg);
|
||||
//changes settings to undefined
|
||||
setSettings(UNDEFINED);
|
||||
FILE_LOG(logERROR, ("Settings has been changed to undefined (change all trimbits)\n"));
|
||||
if (arg > 63) {
|
||||
ret = FAIL;
|
||||
strcpy(mess, "Cannot set all trimbits. Range: 0 - 63\n");
|
||||
FILE_LOG(logERROR, (mess));
|
||||
} else {
|
||||
ret = setAllTrimbits(arg);
|
||||
//changes settings to undefined
|
||||
setSettings(UNDEFINED);
|
||||
FILE_LOG(logERROR, ("Settings has been changed to undefined (change all trimbits)\n"));
|
||||
}
|
||||
}
|
||||
// get
|
||||
retval = getAllTrimbits();
|
||||
|
Reference in New Issue
Block a user