Skip to content

Commit

Permalink
profiles handling redesign #3
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Feb 9, 2020
1 parent 0183651 commit 2c81ab5
Show file tree
Hide file tree
Showing 6 changed files with 1,049 additions and 954 deletions.
14 changes: 7 additions & 7 deletions src/eez/firmware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ void shutdown() {

g_shutdownInProgress = true;

// shutdown SCPI thread
using namespace eez::scpi;
osMessagePut(g_scpiMessageQueueId, SCPI_QUEUE_MESSAGE(SCPI_QUEUE_MESSAGE_TARGET_NONE, SCPI_QUEUE_MESSAGE_TYPE_SHUTDOWN, 0), osWaitForever);
do {
osDelay(10);
} while (isThreadAlive());

profile::shutdownSave();

if (psu::isPowerUp()) {
Expand All @@ -332,13 +339,6 @@ void shutdown() {

osDelay(50);

// shutdown SCPI thread
using namespace eez::scpi;
osMessagePut(g_scpiMessageQueueId, SCPI_QUEUE_MESSAGE(SCPI_QUEUE_MESSAGE_TARGET_NONE, SCPI_QUEUE_MESSAGE_TYPE_SHUTDOWN, 0), osWaitForever);
do {
osDelay(10);
} while (isThreadAlive());

// save on-time counters
persist_conf::writeTotalOnTime(ontime::g_mcuCounter.getType(), ontime::g_mcuCounter.getTotalTime());
for (int slotIndex = 0; slotIndex < NUM_SLOTS; slotIndex++) {
Expand Down
Loading

0 comments on commit 2c81ab5

Please sign in to comment.