Skip to content

Commit

Permalink
fix spi host num calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBoehm committed Aug 2, 2024
1 parent d1d4421 commit 71310a3
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion include/SPIPortManager.h
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ class SPIPortManagerClass {
std::optional<uint8_t> allocatePort(std::string const& owner);
void freePort(std::string const& owner);

spi_host_device_t SPIhostNum(uint8_t spi_num) { return (spi_host_device_t)(spi_num + _offset_spi_num); }
spi_host_device_t SPIhostNum(uint8_t spi_num) { return (spi_host_device_t)(spi_num + _offset_spi_host); }

private:
// the amount of SPIs available on supported ESP32 chips
2 changes: 0 additions & 2 deletions src/InverterSettings.cpp
Original file line number Diff line number Diff line change
@@ -52,8 +52,6 @@ void InverterSettingsClass::init(Scheduler& scheduler)
}
}

// TODO(AndreasBoehm): do something when we could not allocate the port for any of the valid configured pin mappings

MessageOutput.println(" Setting radio PA level... ");
Hoymiles.getRadioNrf()->setPALevel((rf24_pa_dbm_e)config.Dtu.Nrf.PaLevel);
Hoymiles.getRadioCmt()->setPALevel(config.Dtu.Cmt.PaLevel);

0 comments on commit 71310a3

Please sign in to comment.