Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Nov 6, 2020
1 parent 847cc01 commit 0e7a59e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/eez/modules/bp3c/comm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ bool masterSynchro(int slotIndex) {
uint32_t startIrq = millis();
while (true) {
if (HAL_GPIO_ReadPin(spi::IRQ_GPIO_Port[slotIndex], spi::IRQ_Pin[slotIndex]) == GPIO_PIN_SET) {
slot.firmwareVersionAcquired = true;
slot.firmwareMajorVersion = rxBuffer[1];
slot.firmwareMinorVersion = rxBuffer[2];
slot.idw0 = (rxBuffer[3] << 24) | (rxBuffer[4] << 16) | (rxBuffer[5] << 8) | rxBuffer[6];
Expand All @@ -81,6 +82,7 @@ bool masterSynchro(int slotIndex) {

int32_t diff = millis() - start;
if (diff > CONF_MASTER_SYNC_TIMEOUT_MS) {
slot.firmwareVersionAcquired = true;
slot.firmwareMajorVersion = 0;
slot.firmwareMinorVersion = 0;
slot.idw0 = 0;
Expand All @@ -94,6 +96,7 @@ bool masterSynchro(int slotIndex) {
#endif

#if defined(EEZ_PLATFORM_SIMULATOR)
slot.firmwareVersionAcquired = true;
slot.firmwareMajorVersion = 1;
slot.firmwareMinorVersion = 0;
slot.idw0 = 0;
Expand Down Expand Up @@ -124,6 +127,7 @@ bool masterSynchroV2(int slotIndex) {
break;
}

slot.firmwareVersionAcquired = true;
slot.firmwareMajorVersion = rxBuffer[1];
slot.firmwareMinorVersion = rxBuffer[2];
slot.idw0 = (rxBuffer[3] << 24) | (rxBuffer[4] << 16) | (rxBuffer[5] << 8) | rxBuffer[6];
Expand All @@ -140,6 +144,7 @@ bool masterSynchroV2(int slotIndex) {
osDelay(1);
}

slot.firmwareVersionAcquired = true;
slot.firmwareMajorVersion = 0;
slot.firmwareMinorVersion = 0;
slot.idw0 = 0;
Expand All @@ -149,6 +154,7 @@ bool masterSynchroV2(int slotIndex) {
#endif

#if defined(EEZ_PLATFORM_SIMULATOR)
slot.firmwareVersionAcquired = true;
slot.firmwareMajorVersion = 1;
slot.firmwareMinorVersion = 0;
slot.idw0 = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/eez/modules/dib-dcp405/dib-dcp405.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,8 @@ struct DcpModule : public PsuModule {
spiCrcCalculationEnable = false;
numPowerChannels = 1;
numOtherChannels = 0;

firmareBasedModule = false;
}

void boot() override {
Expand Down
2 changes: 1 addition & 1 deletion src/eez/modules/psu/gui/psu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ Image g_customLogo;

void loadCustomLogo() {
static const uint32_t CONF_MAX_LOGO_WIDTH = 480;
static const uint32_t CONF_MAX_LOGO_HEIGHT = 120;
static const uint32_t CONF_MAX_LOGO_HEIGHT = 136;

#ifdef EEZ_PLATFORM_STM32
static bool loaded;
Expand Down

0 comments on commit 0e7a59e

Please sign in to comment.