-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add SBUS2 Telemetry support #130
Conversation
The code in sbus2_sensors.c looks iffy in a few places. Is that your code, or copied from somewhere else? |
Is this code always sending all sensors once enebled? |
That is a copy from https://github.com/BrushlessPower/SBUS2-Telemetry Not all sensors are used. That is just the code to pack the info in different sensor types. |
Only the sensors used in taskSendSbus2Telemetry in sbus2.c are sent. The sensors used are currently hard coded. The futaba side is a bit limited as some sensors sensors use more than one slot and can only be used in some positions. (Esc, for example, takes a full 8 slot window and can only be on slot 8, 16 or 24). Different radios also may support a smaller subset of sensors. |
I am not comfortable about the SBUS task running at 8kHz. It's almost certainly interfering with the gyro task. I think there are two optons here:
|
I am out of town currently. I will run more tests once I am back with hardware access. |
These mcus don't need external inverter circuitry
Unfortunatelly, it still needs to run at 8k as lower rates cause the later telemetry slots to be too late and not work reliably.
I believe I addreessed all items. Let me know if you need any more changes. |
Tasks output on flydragonf722_v2 with latest changes and lowest priority. Realtime load reported at ~26-28% and cpu load ~21-22% on configurator status bar, with all features enabled as well as working sbus2 telemetry, If I switch to crsf, instead of sbus2, realtime load, maybe 1% lower ~25-27%, but really hard to call, as it is a bit all over the place in both scenarios.
|
Thank you! Merged manually. |
This is a port of my INAV code to RotorFlight.
SBUS2 port can be connected to FPORT on rotorflight flight controllers, or on the tx pin of any uart on F7/H7 mcus.
These are the available sensors: