-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
CRSF rewrite to be 'more' spec compliant #3198
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
base: master
Are you sure you want to change the base?
Conversation
@wimalopaan Can you check if this satisfies your needs for #2901, #2941, #2975 and #3160 |
Oh, cool, that you did spend a lot of work on it!!! This PR is against master, would it be applicable to 3.x.x-maintenance also (for #2975) ? Yes, I will test that, but that will take some days ... |
Very cool. Will check against my osd code. Thank you. |
No this will not be applicable to 3.x.x |
When testing this please remember that you will need to flash both the TX and the RX as the master branch is NOT compatible with 3.x.x |
Just did quick test, and my ELRS detection is no more :) uint8_t tmp[6] = { 0xc8, 0x04, 0x28, 0xEC, 0xC8, 0 }; //request device info NO TX powered. Works fine with latest release. Getting no response back. Something changed in this area? |
Yes, I've broken it. I'll get back to you when it's fixed... again |
No, but yes. No data is output on the serial port of there is a model mismatch or team-race is on and not on the selected model. The issue is that model matched is false by default, so until there is a valid connection from a TX then nothing wull be output. |
Should work without ANY radio. I will wait for your fix for next test. You should be able to configure just RX. |
Ok, I've done some more work on this and it should be all good now. |
Just did some test. Device info indeed works now. Devices enumeration from osd - still doesnt. |
Enumeration works using sending to broadcast address:
|
What command are you sending that doesn't work? i.e. the full command. If I send a broadcast message in the the serial port from 0x80 then the 0x80 is added as a known device on the serial connector. |
as u see, i send from 80 to serial receiver BROADCAST message. All devices must respond back VIA receiver. That doesnt happen. Keep in mind, FC has 2 addresses (and potentially 10 if 8 esc are registered). All of it behind fc endpoint. So, if 80 sends a broadcast, 80 should be registered on receiver endpoint towards FC. then reveiver should respond back. |
Where are u located? I can send you ultra if u like. |
Can we connect on discord. Might make things easier |
Yes of course. FedorCommander |
Tracing also the packets that come out of the TX-module shows, that not all device-info packages that the receiver gets come thru to the TX module. On the attached LA trace you see on the RX:RX line the four device-info packages going to the receiver. But on the TX:TX line you see only two of them coming out of the TX-module. This may look like some type of congestion on the over-the-air protocol. |
Changing to 50Hz and 1:2 telemetry ratio does not help. |
This should be revisited as a connector, and simplified!
This way we can have many endpoints and connectors
I made the above tests also with a TBS Trace tx-module and receiver. With this setup, there are no problems with 4 external devices: all 6 devices (including tx-module and rx) are showing up in the TBS Agent list. So, I think, in the above tested ELRS case, there is some congestion sending all the device-info packages from the rx-side to the tx. Looks like there are substantial changes in 3.x to 4.x regarding this part. |
The slot-based telemetry sending code needs to be re-evaluated to make it work better with the new CRSF system. |
# Conflicts: # src/lib/CrsfProtocol/crsf_protocol.h # src/lib/Handset/CRSFHandset.cpp # src/lib/LUA/lua.cpp # src/lib/Telemetry/telemetry.cpp # src/lib/Telemetry/telemetry.h # src/src/rx-serial/SerialCRSF.cpp # src/src/rx-serial/SerialMavlink.h # src/src/rx_main.cpp # src/targets/unified.ini
# Conflicts: # src/lib/rx-crsf/devRXLUA.cpp # src/lib/tx-crsf/devTXLUA.cpp
# Conflicts: # src/lib/LUA/lua.cpp # src/lib/tx-crsf/devTXLUA.cpp
# Conflicts: # src/lib/CrsfProtocol/CRSFEndpoint.h
with a bit of cleanup
Handle and do NOT forward heartbeat messages Slight adjustments and fix locking/unlocking Use a mutex to only allow a single thread to be in the OTA telemetry functions
This is a rather large set of code changes to extend our CRSF implementation to be more compliant with the CRSF specification. https://github.com/tbs-fpv/tbs-crsf-spec/blob/main/crsf.md
Notes
Future Changes
Testing