Skip to content

Commit

Permalink
standby fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Nov 6, 2019
1 parent 47f0aaa commit b53a650
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/eez/apps/psu/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ void Channel::onPowerDown() {

clearProtection(false);

channelInterface->onPowerDown(subchannelIndex);

profile::enableSave(last_save_enabled);
}

Expand Down
2 changes: 1 addition & 1 deletion src/eez/apps/psu/scpi/syst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ scpi_result_t scpi_cmd_systemPower(scpi_t *context) {

osDelay(1000);

if (!isPowerUp()) {
if (up != isPowerUp()) {
SCPI_ErrorPush(context, SCPI_ERROR_EXECUTION_ERROR);
return SCPI_RES_ERR;
}
Expand Down
1 change: 1 addition & 0 deletions src/eez/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ struct ChannelInterface {
virtual void getParams(int subchannelIndex, ChannelParams &params) = 0;

virtual void init(int subchannelIndex) = 0;
virtual void onPowerDown(int subchannelIndex) = 0;
virtual void reset(int subchannelIndex) = 0;
virtual void test(int subchannelIndex) = 0;
virtual void tick(int subchannelIndex, uint32_t tickCount) = 0;
Expand Down
6 changes: 6 additions & 0 deletions src/eez/modules/dcm220/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ struct Channel : ChannelInterface {
#endif
}

void onPowerDown(int subchannelIndex) {
#if defined(EEZ_PLATFORM_STM32)
synchronized = false;
#endif
}

void reset(int subchannelIndex) {
}

Expand Down
3 changes: 3 additions & 0 deletions src/eez/modules/dcpX05/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ struct Channel : ChannelInterface {
dprogState = DPROG_STATE_AUTO;
}

void onPowerDown(int subchannelIndex) {
}

void reset(int subchannelIndex) {
uSet = 0;
dprogState = DPROG_STATE_AUTO;
Expand Down

0 comments on commit b53a650

Please sign in to comment.