mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-08 02:50:42 +02:00
eiger: validate trimval range
This commit is contained in:
parent
504fc2d095
commit
af9b25fd67
Binary file not shown.
@ -2910,11 +2910,17 @@ int set_all_trimbits(int file_des) {
|
|||||||
|
|
||||||
// set
|
// set
|
||||||
if (arg >= 0 && Server_VerifyLock() == OK) {
|
if (arg >= 0 && Server_VerifyLock() == OK) {
|
||||||
|
if (arg > 63) {
|
||||||
|
ret = FAIL;
|
||||||
|
strcpy(mess, "Cannot set all trimbits. Range: 0 - 63\n");
|
||||||
|
FILE_LOG(logERROR, (mess));
|
||||||
|
} else {
|
||||||
ret = setAllTrimbits(arg);
|
ret = setAllTrimbits(arg);
|
||||||
//changes settings to undefined
|
//changes settings to undefined
|
||||||
setSettings(UNDEFINED);
|
setSettings(UNDEFINED);
|
||||||
FILE_LOG(logERROR, ("Settings has been changed to undefined (change all trimbits)\n"));
|
FILE_LOG(logERROR, ("Settings has been changed to undefined (change all trimbits)\n"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// get
|
// get
|
||||||
retval = getAllTrimbits();
|
retval = getAllTrimbits();
|
||||||
FILE_LOG(logDEBUG1, ("All trimbits: %d\n", retval));
|
FILE_LOG(logDEBUG1, ("All trimbits: %d\n", retval));
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
#define APIMYTHEN3 0x191127
|
#define APIMYTHEN3 0x191127
|
||||||
#define APIGOTTHARD 0x191127
|
#define APIGOTTHARD 0x191127
|
||||||
#define APIJUNGFRAU 0x191127
|
#define APIJUNGFRAU 0x191127
|
||||||
#define APIEIGER 0x191129
|
|
||||||
#define APICTB 0x191210
|
#define APICTB 0x191210
|
||||||
|
#define APIEIGER 0x191210
|
||||||
|
Loading…
x
Reference in New Issue
Block a user