fix module frequency overriding

The `RadioInterface::freq` member was encapsulated with the `RadioInterface::getFreq()` function,
which could be overridden in child classes for some LoRa-modules.
This commit is contained in:
Vladislav Osmanov
2021-09-13 22:13:51 +03:00
parent da61090dc5
commit cb42440963
5 changed files with 9 additions and 11 deletions

View File

@@ -8,8 +8,8 @@
class SX1268Interface : public SX126xInterface<SX1268>
{
public:
/// Initializing the frequency of the SX1268 module regardless of the region
float freq = 433.0;
/// override frequency of the SX1268 module regardless of the region
virtual float getFreq() { return 433.0; }
SX1268Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi);
};