Skip to content

Commit

Permalink
Fix: Reboot loop occoured when no rf module was configured
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Jun 21, 2023
1 parent 915b084 commit 30fbd98
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/InverterSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ void InverterSettingsClass::init()

// Initialize inverter communication
MessageOutput.print("Initialize Hoymiles interface... ");
if (PinMapping.isValidNrf24Config() || PinMapping.isValidCmt2300Config()) {
Hoymiles.setMessageOutput(&MessageOutput);
Hoymiles.init();

Hoymiles.setMessageOutput(&MessageOutput);
Hoymiles.init();

if (PinMapping.isValidNrf24Config() || PinMapping.isValidCmt2300Config()) {
if (PinMapping.isValidNrf24Config()) {
SPIClass* spiClass = new SPIClass(SPI_NRF);
spiClass->begin(pin.nrf24_clk, pin.nrf24_miso, pin.nrf24_mosi, pin.nrf24_cs);
Expand Down

0 comments on commit 30fbd98

Please sign in to comment.