The MySensor 1.5 code is not compiling for my Arduino Mega 2560 board
-
The MySensor 1.5 code is not compiling for my Arduino Mega 2560 board.
It misses the RF69_IRQ_NUM define in several files.In file included from C:\Program Files (x86)\Arduino\libraries\MySensors\MyTransportRFM69.h:26:0,
from C:\Program Files (x86)\Arduino\libraries\MySensors\MyTransportRFM69.cpp:21:
C:\Program Files (x86)\Arduino\libraries\MySensors\utility/RFM69.h:78:62: error: 'RF69_IRQ_PIN' was not declared in this scope
RFM69(byte slaveSelectPin=RF69_SPI_CS, byte interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, byte interruptNum=RF69_IRQ_NUM) {I was able to track the issue down to the RFM69.h file. Line 39 untill 47
// INT0 on AVRs should be connected to RFM69's DIO0 (ex on Atmega328 it's D2, on Atmega644/1284 it's D2) #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega88) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__) || defined(__AVR_ATmega32U4__) #define RF69_IRQ_PIN 2 #define RF69_IRQ_NUM 0 #elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__) #define RF69_IRQ_PIN 2 #define RF69_IRQ_NUM 2 #endif
The Ardiuno Mega 2560 seams to not match both if's so no define is declared.
by replacing this line
#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
by this line
#else
Will make the code compile, but does not look like the best solution
Suggested Topics
-
Code for beta-testing?
Controllers • 24 Mar 2014, 20:48 • andriej 9 Aug 2014, 10:44 -
Making WiFiManager compatible with MySensors 2.3.2
Bug Reports • 12 Feb 2020, 21:43 • pihome 1 Jun 2022, 16:02 -
NRF51-52 PA not support ???
Bug Reports • 23 Feb 2019, 16:40 • berkseo 8 Jul 2021, 11:42 -
some differences between serial- and tcp-gateways.
Bug Reports • 15 Mar 2023, 09:26 • Branther 30 Mar 2023, 15:40 -
sleep(0) in V2.1 doesn't sleep indefinitely anymore. Used to powerdown and sleep in V1.5
Bug Reports • 22 Nov 2019, 00:35 • GaryStofer 15 Apr 2023, 05:50 -
ACK -aka ECHO beeing missed by Serial Gateway with RF24 radios. V2.3.2
Bug Reports • 15 Apr 2023, 06:27 • GaryStofer 21 Apr 2023, 17:34