gotthard2:hv

This commit is contained in:
2019-09-02 12:57:24 +02:00
parent 4a112104ad
commit bd95126da2
9 changed files with 54 additions and 9 deletions

View File

@ -3,6 +3,8 @@
#include "common.h"
#include "sls_detector_defs.h"
#include "string.h"
/* DAC6571 HV DEFINES */
#define DAC6571_MIN_DAC_VAL (0x0)
#define DAC6571_MAX_DAC_VAL (0x3FF)
@ -42,7 +44,7 @@ int DAC6571_Set (int val) {
//open file
FILE* fd=fopen(DAC6571_DriverFileName,"w");
if (fd==NULL) {
FILE_LOG(logERROR, ("Could not open file for writing to set high voltage\n"));
FILE_LOG(logERROR, ("Could not open file %s for writing to set high voltage\n", DAC6571_DriverFileName));
return FAIL;
}
//convert to string, add 0 and write to file