setting power to 0
Some checks failed
Build on RHEL9 / build (push) Successful in 3m55s
Build on RHEL8 / build (push) Successful in 4m36s
Run Simulator Tests on local RHEL9 / build (push) Failing after 11m15s
Run Simulator Tests on local RHEL8 / build (push) Failing after 13m20s

This commit is contained in:
2026-02-09 17:51:40 +01:00
parent ac32cc47a6
commit 5cddff04d8
2 changed files with 16 additions and 21 deletions

View File

@@ -1733,17 +1733,15 @@ int setPower(enum DACINDEX ind, int val, char *mess) {
// convert to dac units
int dacval = val;
if (val != LTC2620_GetPowerDownValue()) {
if (val != 0) {
if (convertPowerRegVoltagetoDAC(pwrIndex, val, &dacval, mess) == FAIL)
return FAIL;
}
LOG(logINFO, ("Setting %s (DAC %d): %d dac (%d mV)\n", powerNames[pwrIndex],
dacval, val));
if (setDAC(ind, dacval, 0, mess) == FAIL)
return FAIL;
LOG(logINFO, ("Setting %s (DAC %d): %d dac (%d mV)\n",
powerNames[pwrIndex], dacval, val));
if (setDAC(ind, dacval, 0, mess) == FAIL)
return FAIL;
if (val != 0) {
if (EnablePowerRail(pwrIndex, mess) == FAIL)
return FAIL;
}
@@ -1762,10 +1760,10 @@ int initPower(enum DACINDEX ind, char *mess) {
char *powerNames[] = {PWR_NAMES};
int dacval = 0;
int min = (ind == D_PWR_IO) ? VIO_MIN_MV : POWER_RGLTR_MIN;
LOG(logINFO, ("Initializing %s to %d mV (power disabled)\n", powerNames[pwrIndex], min));
LOG(logINFO, ("Initializing %s to %d mV (power disabled)\n",
powerNames[pwrIndex], min));
if (convertPowerRegVoltagetoDAC(pwrIndex, min, &dacval, mess) ==
FAIL)
if (convertPowerRegVoltagetoDAC(pwrIndex, min, &dacval, mess) == FAIL)
return FAIL;
if (setDAC(ind, dacval, 0, mess) == FAIL)

View File

@@ -1486,14 +1486,13 @@ int initPower(enum DACINDEX ind, char *mess) {
if (getPowerIndex(ind, &pwrIndex, mess) == FAIL)
return FAIL;
char *powerNames[] = {PWR_NAMES};
int dacval = 0;
int min = (ind == D_PWR_IO) ? VIO_MIN_MV : POWER_RGLTR_MIN;
LOG(logINFO, ("Initializing %s to %d mV (power disabled)\n", powerNames[pwrIndex], min));
LOG(logINFO, ("Initializing %s to %d mV (power disabled)\n",
powerNames[pwrIndex], min));
if (convertPowerRegVoltagetoDAC(pwrIndex, min, &dacval, mess) ==
FAIL)
if (convertPowerRegVoltagetoDAC(pwrIndex, min, &dacval, mess) == FAIL)
return FAIL;
if (setDAC(ind, dacval, 0, mess) == FAIL)
@@ -1546,17 +1545,15 @@ int setPower(enum DACINDEX ind, int val, char *mess) {
// convert to dac units
int dacval = val;
if (val != LTC2620_D_GetPowerDownValue()) {
if (val != 0) {
if (convertPowerRegVoltagetoDAC(pwrIndex, val, &dacval, mess) == FAIL)
return FAIL;
}
LOG(logINFO, ("Setting %s (DAC %d): %d dac (%d mV)\n", powerNames[pwrIndex],
dacval, val));
if (setDAC(ind, dacval, 0, mess) == FAIL)
return FAIL;
LOG(logINFO, ("Setting %s (DAC %d): %d dac (%d mV)\n",
powerNames[pwrIndex], dacval, val));
if (setDAC(ind, dacval, 0, mess) == FAIL)
return FAIL;
if (val != 0) {
if (EnablePowerRail(pwrIndex, mess) == FAIL)
return FAIL;
}