Merge pull request #317 from slsdetectorgroup/selecthotfix

Selecthotfix
This commit is contained in:
Dhanya Thattil 2021-10-18 15:28:17 +02:00 committed by GitHub
commit ed81ce2877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 13 deletions

View File

@ -1 +0,0 @@
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv6.0.0-rc1

View File

@ -0,0 +1 @@
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv6.0.0-rc2

View File

@ -1756,7 +1756,7 @@ void configureChip() {
// write same values to configure selection
// if (chip was powered off earlier)
LOG(logINFO, ("\tSetting default values for selection\n"))
LOG(logINFO, ("\tRewriting values for selection\n"))
bus_w(CRRNT_SRC_COL_LSB_REG, bus_r(CRRNT_SRC_COL_LSB_REG));
bus_w(CRRNT_SRC_COL_MSB_REG, bus_r(CRRNT_SRC_COL_MSB_REG));
@ -2228,15 +2228,16 @@ void disableCurrentSource() {
}
void enableCurrentSource(int fix, uint64_t select, int normal) {
disableCurrentSource();
if (getChipVersion() == 11) {
LOG(logINFO, ("Enabling current source [fix:%d, select:%lld]\n", fix,
(long long int)select));
LOG(logINFO, ("Enabling current source [fix:%d, select:0x%lx]\n", fix,
(long unsigned int)select));
} else {
LOG(logINFO,
("Enabling current source [fix:%d, select:0x%llx, normal:%d]\n",
fix, (long long int)select, normal));
("Enabling current source [fix:%d, select:%ld, normal:%d]\n",
fix, (long int)select, normal));
}
disableCurrentSource();
// fix
if (fix) {
LOG(logINFO, ("\tEnabling fix\n"));
@ -2247,7 +2248,7 @@ void enableCurrentSource(int fix, uint64_t select, int normal) {
}
if (getChipVersion() == 10) {
// select
LOG(logINFO, ("\tSetting selection\n"))
LOG(logINFO, ("\tSetting selection to %ld\n", (long int)select));
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_CRRNT_SRC_CLMN_SLCT_MSK);
bus_w(DAQ_REG,
bus_r(DAQ_REG) | ((select << DAQ_CRRNT_SRC_CLMN_SLCT_OFST) &
@ -2255,7 +2256,7 @@ void enableCurrentSource(int fix, uint64_t select, int normal) {
} else {
// select
LOG(logINFO, ("\tSetting selection\n"))
LOG(logINFO, ("\tSetting selection to 0x%lx\n", (long unsigned int)select));
set64BitReg(select, CRRNT_SRC_COL_LSB_REG, CRRNT_SRC_COL_MSB_REG);
// normal
if (normal) {

View File

@ -6695,7 +6695,7 @@ int set_current_source(int file_des) {
int fix = args[1];
int normal = args[2];
LOG(logINFOBLUE, ("Setting current source [enable:%d, fix:%d, select:%lld, "
LOG(logDEBUG1, ("Setting current source [enable:%d, fix:%d, select:%lld, "
"normal:%d]\n",
enable, fix, (long long int)select, normal));

View File

@ -977,7 +977,7 @@ std::string CmdProxy::CurrentSource(int action) {
}
if (args.size() == 3) {
det->setCurrentSource(defs::currentSrcParameters(
fix, StringTo<int64_t>(args[2])));
fix, StringTo<uint64_t>(args[2])));
} else if (args.size() == 4) {
bool normalCurrent = false;
if (args[3] == "normal") {
@ -989,7 +989,7 @@ std::string CmdProxy::CurrentSource(int action) {
". Did you mean normal or low?");
}
det->setCurrentSource(defs::currentSrcParameters(
fix, StringTo<int64_t>(args[2]), normalCurrent));
fix, StringTo<uint64_t>(args[2]), normalCurrent));
} else {
throw sls::RuntimeError(
"Invalid number of parareters for this command.");

View File

@ -9,7 +9,7 @@
#define APICTB 0x211008
#define APIGOTTHARD 0x211008
#define APIGOTTHARD2 0x211008
#define APIJUNGFRAU 0x211008
#define APIMYTHEN3 0x211008
#define APIMOENCH 0x211008
#define APIEIGER 0x211013
#define APIJUNGFRAU 0x211018