m3 fix vthresh
Some checks failed
Build on RHEL9 / build (push) Successful in 3m27s
Build on RHEL8 / build (push) Successful in 4m50s
Run Simulator Tests on local RHEL9 / build (push) Failing after 11m13s
Run Simulator Tests on local RHEL8 / build (push) Failing after 13m15s

This commit is contained in:
2026-02-13 12:33:30 +01:00
parent da2963a274
commit 37a7ed3318

View File

@@ -1772,19 +1772,19 @@ int getThresholdDACs(bool mV, int *retval, char *mess) {
if (counterMask & (1 << i)) {
if (getDAC(indices[i], mV, &retvals[i], mess) == FAIL)
return FAIL;
}
// set retval to first value
if (*retval == -1) {
*retval = retvals[i];
}
// other values should match the first value
else if (retvals[i] != retvals[0]) {
char *dacNames[] = {DAC_NAMES};
LOG(logWARNING,
("Vthreshold mismatch.%s:%d %s:%d\n", dacNames[indices[i]],
retvals[i], dacNames[indices[0]], retvals[0]));
*retval = -1;
return OK;
// set retval to first value
if (*retval == -1) {
*retval = retvals[i];
}
// other values should match the first value
else if (retvals[i] != retvals[0]) {
char *dacNames[] = {DAC_NAMES};
LOG(logWARNING,
("Vthreshold mismatch.%s:%d %s:%d\n", dacNames[indices[i]],
retvals[i], dacNames[indices[0]], retvals[0]));
*retval = -1;
return OK;
}
}
}
if (*retval == -1) {