Closed LDannijs closed 2 months ago
@johanstokking can you take a look to @LDannijs work here
Decided to make it even easier by just compacting it all down to 1 script with a selection menu. Preview:
- Add line breaks before 80 characters (that is the max line length)
Would I need to do this for only the echo commands or the entire code?
Ideally both but certainly anything printed.
I hope the NO_COLOR
variable is properly implemented. It doesnt seem to be that standardized so I hope this is good.
@Jaime-Trinidad did you test this locally?
Yes, there are some fixes to do:
Codec:
Just fill uplinkDecoder
with the decoder file name, few device makers fill downlinkEncoder
and downlinkDecoder
and they won't notice and cause errors.
Profile:
Same can we leave macVersion
empty it fills with 1.0.3
some of them may think it is ok and won't change it, so they probably don't autofill the info.
Index: @LDannijs check because I added from an existing vendor and it deletes the already info:
(apologies for messing up the commit history. There were commits from a different branch that i had accidentally been using on here, so i tried to fix it 😓. Need to learn to double check these things)
So few changes made:
macVersion
empty and removed downlinkEncoder
and downlinkDecoder
vendorProfileID
so it increments properly.Please ping @Jaime-Trinidad to review and test.
Did a few things:
Turned the command to run the script into a make command to match the other commands.
And with #736 now being merged i can reopen this PR.
Summary
At the moment, users are required to create a bunch of files containing boilerplate code that they then need to edit whenever they want to add a vendor or new devices. This PR add 2 scripts that create all of the files by just entering a few questions. I'd like to receive feedback on what other changes could be made to improve it.
This is an in between feature, idea is that eventually a type of form will be used for the repo, but for now this should at least be helpful.
(recreated this PR cause i had some organizing of my fork)
Changes
Preview of what the scripts look like.![image](https://github.com/TheThingsNetwork/lorawan-devices/assets/117638911/a0caea5d-e4a5-4b7f-8183-9de3f07a4255)