fix in ltc, added moench, separated servers, left to do max1932, client side for moench and more detailed in ctb server side

This commit is contained in:
2018-12-19 16:38:18 +01:00
parent 89d9204e1c
commit f161d68efc
12 changed files with 36 additions and 51 deletions

View File

@ -123,7 +123,7 @@ int LTC2620_VoltageToDac(int voltage, int* dacval) {
* @returns FAIL when voltage outside limits, OK if conversion successful
*/
int LTC2620_DacToVoltage(int dacval, int* voltage) {
return Common_VoltageToDac(dacval, voltage, LTC2620_MIN_MV, LTC2620_MaxMV, LTC2620_MAX_STEPS);
return Common_DacToVoltage(dacval, voltage, LTC2620_MIN_MV, LTC2620_MaxMV, LTC2620_MAX_STEPS);
}
/**
@ -147,11 +147,11 @@ void LTC2620_Configure(){
/**
* Set Dac value (obtains dacaddr, command and ichip and calls LTC2620_Set)
* Set Dac (obtains dacaddr, command and ichip and calls LTC2620_Set)
* @param dacnum dac number
* @param data dac value to set
*/
void LTC2620_SetDACValue (int dacnum, int data) {
void LTC2620_SetDAC (int dacnum, int data) {
FILE_LOG(logDEBUG1, ("\tSetting dac %d to %d\n", dacnum, data));
// LTC2620 index
int ichip = dacnum / LTC2620_NUMCHANNELS;

View File

@ -16,6 +16,8 @@ const enum detectorType myDetectorType = EIGER;
const enum detectorType myDetectorType = JUNGFRAU;
#elif CHIPTESTBOARDD
const enum detectorType myDetectorType = CHIPTESTBOARD;
#elif MOENCHD
const enum detectorType myDetectorType = MOENCH;
#else
const enum detectorType myDetectorType = GENERIC;
#endif
@ -33,7 +35,7 @@ extern char mess[MAX_STR_LENGTH];
// Variables that will be exported
int sockfd = 0;
int debugflag = 0;
#ifdef CHIPTESTBOARDD
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
int dataBytes = 0;
uint16_t *ramValues = 0;
int nframes = 0;
@ -131,7 +133,7 @@ const char* getTimerName(enum timerIndex ind) {
case MEASUREMENTS_NUMBER: return "measurements_number";
case FRAMES_FROM_START: return "frames_from_start";
case FRAMES_FROM_START_PG: return "frames_from_start_pg";
case SAMPLES_JCTB: return "samples_jctb";
case SAMPLES: return "samples";
case SUBFRAME_ACQUISITION_TIME: return "subframe_acquisition_time";
case SUBFRAME_DEADTIME: return "subframe_deadtime";
case STORAGE_CELL_NUMBER: return "storage_cell_number";
@ -1509,7 +1511,7 @@ int set_timer(int file_des) {
#endif
case FRAME_PERIOD:
case CYCLES_NUMBER:
case SAMPLES_JCTB:
case SAMPLES:
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD)
case DELAY_AFTER_TRIGGER:
#endif
@ -1568,7 +1570,7 @@ int set_timer(int file_des) {
case STORAGE_CELL_NUMBER:
validate64(tns, retval, vtimerName, DEC); // no conversion, so all good
break;
case SAMPLES_JCTB:
case SAMPLES:
if (retval == -1) {
ret = FAIL;
retval = setTimer(ind, -1);