-
-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoRaWAN code in separate class (or repo?) #470
Comments
@TD-er Your PR as stated above would be highly welcome, many thanks! While refactoring |
I have been looking at the code a bit more today and I think we need also to think of how to handle incoming commands. |
Yes, we should have a queue for incoming commands. |
I was thinking about using the same type of queue you also used for sending out messages. |
Maybe add command priorities to the simple rcommand interpreter by enhancing it's command table. |
That's a good one to have a look. |
@TD-er any news here? |
Sorry, the last weeks were really really hectic here (on personal level). |
Nothing is due for lorawan.cpp, so no time to hurry. |
@TD-er would it be a solution to migrate the LMIC code in lorawan.cpp to MCCI Arduino Library ? |
I think so, yes. |
@TD-er any news / plans here? |
News is that I got moved last week to a new house, which did take way way way more time than I hoped it would. |
@TD-er Time goes by... - still any thoughts on this? |
I was looking to integrate parts of your Lorawan code into my own project (ESPEasy) and I came across a few small issues.
First to make it clear where I borrowed the code from (the credentials part), I would like to have the lorawan.h/.cpp files as much the same as you have.
It also would allow me to later merge fixes you have and it would make my own code a lot more clean.
Still it looks better to have it in one C++ object, so I started wrapping it into a class to have it even more contained.
This lead to some compiler issues which may also be indicative of latent problems you may encounter later on.
For example:
Some functions -like the callback functions- need to be static in order to have them set as callback function.
You don't have that compiler/linker issue right now, since your functions are declared in global scope.
Simply adding
static
to the function declarations in the header file does stop the compiler from complaining, but that's quite dangerous if the header file will be included more than once.Does it sound OK to you if I would propose a PR to have the lorawan code in a separate class?
This class would then be responsible for creating the queue, lmic task and handling all lora traffic.
I did notice you were also working on the Lora part, so multiple big changes on the same code at the same time is maybe not the most practical :)
Did you plan to work on the lorawan part for a longer period now?
The text was updated successfully, but these errors were encountered: