Closed christophers090 closed 6 months ago
Taking a deeper look the const char *CompatibilityTable::getDevboardName() function in the compatibility table was returning an empty string. When I changed line 717 from return deviceNames[device.type.devboard]; to return deviceNames[device.type.devboard - 1]; I'm now getting "teensy4.1" returned as I should and everything works.
Taking a deeper look the const char *CompatibilityTable::getDevboardName() function in the compatibility table was returning an empty string. When I changed line 717 from return deviceNames[device.type.devboard]; to return deviceNames[device.type.devboard - 1]; I'm now getting "teensy4.1" returned as I should and everything works.
That tells me I am missing an entry in the Compatibility Table, specifically with the deviceNames[DEVBOARD_COUNT]
array.
Fortunately, that's an easy fix; and it can be pushed out in the next patch release to v1.0.x. Thank you very much for your work with this. You have saved me the time in figuring this one out, and now I can release a fix for this almost straight away.
I say "almost", because I am currently on hiatus until the end of the first week of April of 2024.
I found the root cause of the problem!
I was right. I am missing an entry in the deviceNames[DEVBOARD_COUNT]
array.
In the screencap below, at line 184
, there is an index entry for the STM32F405RG in the ct_devboards_e
enumerator.
Then, in the deviceNames[DEVBOARD_COUNT]
array, the entry for the STM32F405RG is missing at line 368
.
Therefore, everything from the STM32F407VE entry all the way up to the Teensy 4.1 is "shifted down" one index value.
But, the index value of the STM32F401RE and below, the index value provided by the call to device.type.devboard
is correct.
Nice! I'm happy it was an easy fix, and glad I could help! Thanks for this awesome lib, it saved me so much time!
You're very welcome. =^/.^=
If you're able, can you fork CRSFforArduino (if you have not done so already), and submit a Pull Request back to the upstream Version-1.0.x-Maintenance-Branch with the fix that's outlined here?
If you're doing the Pull Request thing, you MUST
enable Commit Signing with either a GPG Key or an SSH Key before the first commit in your Pull Request.
If you already have this enabled, your commits will show up as a green Verified
tag next to each individual commit. Otherwise, it your commits will show up as a yellow Unverified
tag next to the individual commit.
Due to my branch protection rules, I simply cannot accept Pull Requests with Unverified
commits.
Will this just give me credit for the change? I don't need credit but if there's some other reason that you want me to do this let me know. I'm new to github and don't know how any of the commit signing or GPG key thing works. Thanks!
Will this just give me credit for the change? I don't need credit but if there's some other reason that you want me to do this let me know. I'm new to github and don't know how any of the commit signing or GPG key thing works. Thanks!
It's all good. =^/.^=
The only reason why I asked is 'cause I'm currently taking a break from this all, and if you wanted the fix done straight away, I can merge Pull Requests remotely.
I am able to fix this on my end, but it will need to wait until my break is over.
So, it's simply a question of "how quickly would you like this done"?
Option A: Add this yourself, and submit a Pull Request back to me. Then, I can cut-and-release v1.0.3 immediately after I merge the Pull Request, provided all of the checks (barring the Arduino IDE build check, 'cause I am currently having ongoing problems with that one) in the Pull Request pass.
Or...
Option B: Wait for me to start back on this on 2024-4-7 NZDT, and I will cut-and-release this fix as v1.0.3 within that week.
PS: Yes, people that submit Pull Requests are credited as the contributors to CRSF for Arduino; and the project itself relies on its user-base to test and debug the code-base, because I simply don't have the luxury of having access to all the 150+ hardware targets that CRSF for Arduino is compatible with.
...and so far, this process works. =^/,..,^=
Anyone is welcome to contribute where and when they are able. Even doing this counts.
But, it's the Pull Requests what get your name listed as an official contributor to the project.
Ok I'll go with option B, it's working on my end, hopefully no one will run into this issue in the meantime. Have a fun break!
Thanks
I will. =^/,..,^=
Is there an existing issue for this bug?
What development environment are you using?
Arduino IDE
What board are you using?
Teensy 4.1
What part of CRSF for Arduino is this bug related to?
Build/Compile/Upload
Current behaviour
The rc_channels code on a teensy 4.1 uploads but only boot loops. It gets stuck on the crsf->begin(); line.
Expected behaviour
Expect it to show the channels
Steps to reproduce
Upload the code to a teensy 4.1
Additional information
No response