stm32duino / STM32LoRaWAN

Arduino library to support LoRaWAN communication using the STM32WL series.
https://stm32duino.github.io/STM32LoRaWAN/
Other
40 stars 9 forks source link

Overwrite default values to match other antenna configuration #10

Closed ELV-Elektronik-AG closed 1 year ago

ELV-Elektronik-AG commented 1 year ago

Hi,

to use the lib with the ELV-BM-TRX1 module, some default values have to be changed to match the hardware/antenna configuration. Please add a preprocessor directive to overwrite the defines with own values or is there a other solution to use custom values?

in radio_conf.h #define XTAL_DEFAULT_CAP_VALUE ( 0x20UL )

replace with #ifndef XTAL_DEFAULT_CAP_VALUE #define XTAL_DEFAULT_CAP_VALUE ( 0x20UL ) #endif /* XTAL_DEFAULT_CAP_VALUE */

if RegionEU868.h #define EU868_TX_MAX_DATARATE DR_7 #define EU868_RX_MAX_DATARATE DR_7 #define EU868_DEFAULT_ANTENNA_GAIN 2.15f

replace with #ifndef EU868_TX_MAX_DATARATE #define EU868_TX_MAX_DATARATE DR_7 #endif /* EU868_TX_MAX_DATARATE */

#ifndef EU868_RX_MAX_DATARATE #define EU868_RX_MAX_DATARATE DR_7 #endif /* EU868_RX_MAX_DATARATE*/

#ifndef EU868_DEFAULT_ANTENNA_GAIN #define EU868_DEFAULT_ANTENNA_GAIN 2.15f #endif /* EU868_DEFAULT_ANTENNA_GAIN */

Maybe for other hardware more values have to be changeable, but for the ELV-BM-TRX1 module only these values are important.