Browse Source

rfm69: cleanup and bump version

mcspr-patch-1
Maxim Prokhorov 3 years ago
parent
commit
125ca6f9b3
2 changed files with 6 additions and 6 deletions
  1. +5
    -5
      code/espurna/rfm69.cpp
  2. +1
    -1
      code/platformio.ini

+ 5
- 5
code/espurna/rfm69.cpp View File

@ -60,8 +60,8 @@ class RFM69Wrap: public RFM69_ATC {
public:
RFM69Wrap(uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, uint8_t interruptNum=0):
RFM69_ATC(slaveSelectPin, interruptPin, isRFM69HW, interruptNum) {};
RFM69Wrap(uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false):
RFM69_ATC(slaveSelectPin, interruptPin, isRFM69HW) {};
protected:
@ -313,14 +313,14 @@ void rfm69Setup() {
_rfm69Configure();
_rfm69_radio = new RFM69Wrap(RFM69_CS_PIN, RFM69_IRQ_PIN, RFM69_IS_RFM69HW, digitalPinToInterrupt(RFM69_IRQ_PIN));
_rfm69_radio = new RFM69Wrap(RFM69_CS_PIN, RFM69_IRQ_PIN, RFM69_IS_RFM69HW);
_rfm69_radio->initialize(RFM69_FREQUENCY, RFM69_NODE_ID, RFM69_NETWORK_ID);
_rfm69_radio->encrypt(RFM69_ENCRYPTKEY);
_rfm69_radio->promiscuous(RFM69_PROMISCUOUS);
_rfm69_radio->spyMode(1 == RFM69_PROMISCUOUS);
_rfm69_radio->enableAutoPower(0);
if (RFM69_IS_RFM69HW) _rfm69_radio->setHighPower();
DEBUG_MSG_P(PSTR("[RFM69] Worning at %u MHz\n"), RFM69_FREQUENCY == RF69_433MHZ ? 433 : RFM69_FREQUENCY == RF69_868MHZ ? 868 : 915);
DEBUG_MSG_P(PSTR("[RFM69] Working at %u MHz\n"), RFM69_FREQUENCY == RF69_433MHZ ? 433 : RFM69_FREQUENCY == RF69_868MHZ ? 868 : 915);
DEBUG_MSG_P(PSTR("[RFM69] Node %u\n"), RFM69_NODE_ID);
DEBUG_MSG_P(PSTR("[RFM69] Network %u\n"), RFM69_NETWORK_ID);
DEBUG_MSG_P(PSTR("[RFM69] Promiscuous mode %s\n"), RFM69_PROMISCUOUS ? "ON" : "OFF");


+ 1
- 1
code/platformio.ini View File

@ -148,7 +148,7 @@ lib_deps =
PZEM004T
PubSubClient
https://github.com/1technophile/rc-switch#11402652
https://github.com/LowPowerLab/RFM69#7008d57a
https://github.com/LowPowerLab/RFM69#7db941d3
https://github.com/mcspr/rpnlib.git#0.24.1
NewPing
https://github.com/sparkfun/SparkFun_VEML6075_Arduino_Library#V_1.0.3


Loading…
Cancel
Save