M3: fixed gain bits with negative polarity

This commit is contained in:
Erik Frojdh
2021-04-12 16:44:47 +02:00
parent d9cd780386
commit be5fee8126
14 changed files with 97 additions and 9 deletions

View File

@ -371,6 +371,7 @@ void function_table() {
flist[F_GET_MASTER] = &get_master;
flist[F_GET_CSR] = &get_csr;
flist[F_SET_GAIN_CAPS] = &set_gain_caps;
flist[F_GET_GAIN_CAPS] = &get_gain_caps;
// check
if (NUM_DET_FUNCTIONS >= RECEIVER_ENUM_START) {
@ -8423,3 +8424,25 @@ int set_gain_caps(int file_des){
#endif
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
}
int get_gain_caps(int file_des){
ret = OK;
memset(mess, 0, sizeof(mess));
// int arg = 0;
// if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0)
// return printSocketReadError();
LOG(logINFO, ("Getting gain caps\n"));
int retval = -1;
#ifndef MYTHEN3D
functionNotImplemented();
#else
if (Server_VerifyLock() == OK) {
retval = getGainCaps();
LOG(logDEBUG1, ("Gain caps: %u\n", retval));
}
#endif
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
}