Commandline (#66)

* WIP

* WIP

* removed status to string from defs

* WIP

* WIP

* WIP removed unused functions in multi

* WIP

* print hex in a terrible way

* WIP, loadconfig error

* WIP, type to string

* WIP

* fix to conversion

* WIP, hostname doesnt work

* WIP

* WIP

* WIP

* WIP, threshold

* WIP, threshold

* WIP

* WIP, triggers

* WIP, cycles to triggers

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* rx_udsocksize fx, WIP

* WIP

* WIP

* WIP

* file index (64 bit), WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* merge

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* New python mod
This commit is contained in:
Dhanya Thattil
2019-10-21 10:29:06 +02:00
committed by GitHub
parent eebc1109b0
commit 995f0924e5
95 changed files with 5320 additions and 8114 deletions

View File

@ -75,7 +75,7 @@
/* BASE_ACQUISITION FPGA registers TODO --------------------------------------------------*/
/* Cycles left 64bit Register */
/* Triggers left 64bit Register */
#define GET_CYCLES_LSB_REG (0x10 + BASE_ACQUISITION)
#define GET_CYCLES_MSB_REG (0x14 + BASE_ACQUISITION)

View File

@ -374,7 +374,7 @@ void setupDetector() {
setHighVoltage(DEFAULT_HIGH_VOLTAGE);
setDefaultDacs();
setTimer(FRAME_NUMBER, DEFAULT_NUM_FRAMES);
setTimer(CYCLES_NUMBER, DEFAULT_NUM_CYCLES);
setTimer(TRIGGER_NUMBER, DEFAULT_NUM_CYCLES);
setTimer(ACQUISITION_TIME, DEFAULT_EXPTIME);
setTimer(ACQUISITION_TIME, DEFAULT_PERIOD);
}
@ -436,12 +436,12 @@ int64_t setTimer(enum timerIndex ind, int64_t val) {
retval = set64BitReg(val, SET_PERIOD_LSB_REG, SET_PERIOD_MSB_REG )/ (1E-9 * SYSTEM_C0); //TODO
FILE_LOG(logDEBUG1, ("Getting period: %lldns\n", (long long int)retval));
break;
case CYCLES_NUMBER:
case TRIGGER_NUMBER:
if(val >= 0) {
FILE_LOG(logINFO, ("Setting #cycles: %lld\n", (long long int)val));
FILE_LOG(logINFO, ("Setting #triggers: %lld\n", (long long int)val));
}
retval = set64BitReg(val, SET_CYCLES_LSB_REG, SET_CYCLES_MSB_REG);
FILE_LOG(logDEBUG1, ("Getting #cycles: %lld\n", (long long int)retval));
FILE_LOG(logDEBUG1, ("Getting #triggers: %lld\n", (long long int)retval));
break;
default:
@ -488,9 +488,9 @@ int64_t getTimeLeft(enum timerIndex ind){
FILE_LOG(logINFO, ("Getting number of frames left: %lld\n",(long long int)retval));
break;
case CYCLES_NUMBER:
case TRIGGER_NUMBER:
retval = get64BitReg(GET_CYCLES_LSB_REG, GET_CYCLES_MSB_REG);
FILE_LOG(logINFO, ("Getting number of cycles left: %lld\n", (long long int)retval));
FILE_LOG(logINFO, ("Getting number of triggers left: %lld\n", (long long int)retval));
break;
default:
@ -870,7 +870,7 @@ int startStateMachine(){
void* start_timer(void* arg) {
int64_t periodns = setTimer(FRAME_PERIOD, -1);
int numFrames = (setTimer(FRAME_NUMBER, -1) *
setTimer(CYCLES_NUMBER, -1) );
setTimer(TRIGGER_NUMBER, -1) );
int64_t exp_ns = setTimer(ACQUISITION_TIME, -1);