You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, i really like the idea but something i don't understand: Why not use arduino-esp32 and take the board definitions from it? This way you could use something like this:
#if defined(WIFI_LoRa_32)
#defineRADIOLIB_EXCLUDE_SX126X (1)
#includeLoRa32_HelTec_LoRa.h#elif defined(WIFI_LoRa_32_V2)
#defineRADIOLIB_EXCLUDE_SX126X (1)
#includeLoRa32_HelTec_LoRaV2.h#elif defined(WIFI_LoRa_32_V3)
#defineRADIOLIB_EXCLUDE_SX127X (1)
#includeLoRa32_HelTec_LoRaV3.h#elif defined(Wireless_Stick)
#defineRADIOLIB_EXCLUDE_SX126X (1)
#defineDISPLAY_GEOMETRY GEOMETRY_64_32
#includeLoRa32_HelTec_Stick.h#elif defined(Wireless_Stick_V3)
#defineRADIOLIB_EXCLUDE_SX127X (1)
#defineDISPLAY_GEOMETRY GEOMETRY_64_32
#includeLoRa32_HelTec_StickV3.h#elif defined(Wireless_Stick_Lite)
#defineRADIOLIB_EXCLUDE_SX126X (1)
#defineHELTEC_NO_DISPLAY#includeLoRa32_HelTec_StickLite.h#elif defined(Wireless_Stick_Lite_V3)
#defineRADIOLIB_EXCLUDE_SX127X (1)
#defineHELTEC_NO_DISPLAY#includeLoRa32_HelTec_StickLiteV3.h#elif defined(Wireless_Tracker)
#defineRADIOLIB_EXCLUDE_SX126X (1)
#defineHELTEC_NO_DISPLAY#includeLoRa32_HelTec_Tracker.h#else#error "NO BOARD DEFINED!"
#endif
...
#ifndefHELTEC_NO_RADIO_INSTANCE/* * @brief RadioLib build configuration options. * * RadioLib User Build Configuration Options. Used to define any user build options. */#ifndefHELTEC_NO_RADIOLIB
...
/* * @brief Exclude RadioLib drivers to prevent collisions and to speed up build process. */#defineRADIOLIB_EXCLUDE_CC1101 (1)
#defineRADIOLIB_EXCLUDE_NRF24 (1)
#defineRADIOLIB_EXCLUDE_RF69 (1)
#defineRADIOLIB_EXCLUDE_RFM2X (1) // dependent on RADIOLIB_EXCLUDE_SI443X
#defineRADIOLIB_EXCLUDE_SI443X (1)
#defineRADIOLIB_EXCLUDE_STM32WLX (1) // dependent on RADIOLIB_EXCLUDE_SX126X
#defineRADIOLIB_EXCLUDE_SX1231 (1) // dependent on RADIOLIB_EXCLUDE_RF69
#defineRADIOLIB_EXCLUDE_SX128X (1)
/* * @brief Exclude RadioLib protocols to speed up build process. */#defineRADIOLIB_EXCLUDE_AFSK (1)
#defineRADIOLIB_EXCLUDE_APRS (1)
#defineRADIOLIB_EXCLUDE_AX25 (1)
#defineRADIOLIB_EXCLUDE_BELL (1)
#defineRADIOLIB_EXCLUDE_FSK4 (1)
#defineRADIOLIB_EXCLUDE_HELLSCHREIBER (1)
#defineRADIOLIB_EXCLUDE_LORAWAN (1)
#defineRADIOLIB_EXCLUDE_MORSE (1)
#defineRADIOLIB_EXCLUDE_PAGER (1)
#defineRADIOLIB_EXCLUDE_RTTY (1)
#defineRADIOLIB_EXCLUDE_SSTV (1)
...
#if defined(RADIOLIB_EXCLUDE_SX126X)
SX1276radio=newModule(SS, DIO0, RST_LoRa, DIO1);
#elif defined(RADIOLIB_EXCLUDE_SX127X)
#if !defined(DIO0)
#defineDIO0 DIO1 // SX126x has no DIO0
#endif#if !defined(DIO1)
#defineDIO1 DIO0 // SX126x has no DIO0
#endifSX1262radio=newModule(SS, DIO1, RST_LoRa, BUSY_LoRa);
#endif#endif#endif
I combined the HelTec and arduino-esp32 board definitions into own files which is not really needed (could also happen in one file) but i did it anyway.
Why are you not using the RadioLib build options to exclude all non used drivers? I would also disable all protocols and only enabled them if needed.
Why are you not using LED_BUILTIN but instead refer to the GPIO number? You should use the Arduino defined labels if possible.
This lib could easily be upgraded to include all LoRa32 devices (HelTec/lilygo)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, i really like the idea but something i don't understand: Why not use arduino-esp32 and take the board definitions from it? This way you could use something like this:
I combined the HelTec and arduino-esp32 board definitions into own files which is not really needed (could also happen in one file) but i did it anyway.
Why are you not using the RadioLib build options to exclude all non used drivers? I would also disable all protocols and only enabled them if needed.
Why are you not using LED_BUILTIN but instead refer to the GPIO number? You should use the Arduino defined labels if possible.
This lib could easily be upgraded to include all LoRa32 devices (HelTec/lilygo)
Beta Was this translation helpful? Give feedback.
All reactions