Repository navigation
CRSF rewrite to be 'more' spec compliant - #3198
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 |
# 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
|
If I configure two serials, e.g. ER8: 1. serial CRSF and 2. serial CRSF on CH8/CH7-Pins, only the 1. serial outputs RC-Channel data. The 2. serial only outputs RC-LinkStats, Telemetry from RX and Telemetry produced on the 1. serial. I this, the 2. serial should also output RC-channel-data. |
|
Maybe this is related? Weird observation regarding ELRS V4: I use the following setup: RM ER8 with current master, a TX15 with current master and a TuneRC (rx-as-tx (internal, full-duplex) with current master. Powering on ER8 and TX15 -> all works well (PWM outputs of teh ER( and the CRSF serial data with 420KBaud). Powering on the ER8 with TuneRc, that gets only RC-Channel data at 100Hz, the ER8 outputs at its PWM-outputs the correct signal for all 8 channels (the PWM-duty is correct corresponding to the value that are sent to the TuneRC rx-as-tx). But the output at the Serial is weird: no 420kBaud, well, I can't figure out the baudrate that strange signal is (using a LA). Powercycling the ER8 and turning on the TX15: all is well again. This is reproducible. So, I would think, this is some strange initialistion error on the RX side, since the rx-as-tx transfers all data because the ER8 outputs correct PWM. Any hints??? |




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