Replies: 4 comments 8 replies
-
When I was digging around yesterday for the pinmaps, it struck me that GxEPD2 has a similar 'problem'. Here, each and every example comes with a bunch of extra files, like can be seen here. I am happy with pinmaps in a separate repository, and would suggest two files: one for all the boards that have a radio soldered onto them, which would be approximately the list that I ended up with in #1104 (although there's also STM32WL). These are fixed, and should need only be tested once to be sure that they are OK. The other file would be 'user contributed' for boards that are frequently used but without an 'internal' radio, such as a Feather, ESP8266, Pico (the hat is debatable). |
Beta Was this translation helpful? Give feedback.
-
I pushed the first draft into https://github.com/radiolib-org/RadioBoards. It currently only has two supported boards, a simple one (Heltec WiFi LoRa32) and a complex one (Wio WM1110 with custom SPI and RF switching). I tried to stick to the following guidelines:
Example usage with automated selection (using RadioLib): #include <RadioLib.h>
#define RADIO_BOARD_AUTO // automate board selection ...
//#define RADIO_BOARD_WIFI_LORA32 // ... or define it manually
#include <RadioBoards.h>
SX1276 radio = new RadioModule(); Feedback will be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the continuing development!! Since I don't have the expertise to 'comment', I have attempted to follow your example and created a Pull Request for one of the hardware combinations that I have working: |
Beta Was this translation helpful? Give feedback.
-
Took some more time to get around to it, but I just gave it a shot by seeing if I could get my Heltec V3 boards to work. And yes, it works flawlessly! One question to ask ourselves is if we are going to apply any de-duplication for similar boards - specifically looking at the Heltec V3 boards here. All V3 boards have equal pinout for the radio - are we going to duplicate files for each board just for clarity and completeness, or rather keep it easier for the compiler and combine these into one file with a possibly rather long |
Beta Was this translation helpful? Give feedback.
-
Continued discussion from #1104
At the moment, we are defining pin maps for some modules in LoRaWAN config.h files. I like the idea of providing pin maps to the users, but I don't think this should be part of RadioLib, much like we moved persistent memory management elsewhere. My arguments are the following:
I think that points 1 and 2 can be resolved by moving pin maps into their own repository. We can point to it from all the relevant examples, but leave it up to the user if/how they want to use it. In that repository, it's up to us how to implement the pin maps, whether it will be just documentation, some headers that the user must configure themselves, or an automated board resolution algorithm. It also has the added advantage of other projects being able to benefit from this. I also don't seem to be able to find a significant downside, RadioLib will not lose any functionality after this change.
Point 3 will not be resolved by this, but at least it will limit the number of commits/PRs and changes to the examples here.
Thoughts @StevenCellist @HeadBoffin?
Beta Was this translation helpful? Give feedback.
All reactions