bug fix, clock divider hangs due to incorrect number of arguments

This commit is contained in:
2019-01-10 16:27:23 +01:00
parent 37c22dfeb2
commit b38a41493b

View File

@ -2349,11 +2349,12 @@ int64_t slsDetector::getTimeLeft(timerIndex index) {
int slsDetector::setSpeed(speedVariable sp, int value) { int slsDetector::setSpeed(speedVariable sp, int value) {
int fnum = F_SET_SPEED; int fnum = F_SET_SPEED;
int ret = FAIL; int ret = FAIL;
int args[2] = {(int)sp, value};
int retval = -1; int retval = -1;
FILE_LOG(logDEBUG1) << "Setting speed index " << sp << " to " << value; FILE_LOG(logDEBUG1) << "Setting speed index " << sp << " to " << value;
if (thisDetector->onlineFlag == ONLINE_FLAG && connectControl() == OK) { if (thisDetector->onlineFlag == ONLINE_FLAG && connectControl() == OK) {
ret = thisDetectorControl->Client_Send(fnum, &value, sizeof(value), &retval, sizeof(retval)); ret = thisDetectorControl->Client_Send(fnum, args, sizeof(args), &retval, sizeof(retval));
disconnectControl(); disconnectControl();
// handle ret // handle ret