[Feature Request] : Support AP flavour of CRSF telemetry
Closed this issue · 17 comments
Discussed in #132
Originally posted by timtuxworth January 29, 2023
I just installed mwptools on a fresh install of Ubuntu 22.04 and connected my TX16 S running Open TX 2.3.15. I enabled Telemetry forwarding on the transmitter and wmptools can see the telemetry and displays vehicle attitude in the HUD and the GPS location in the applets, but the map doesn't move/reposition, even though the "follow" option is checked. I tried checking/unchecking the box.
From #132, the user is using AP which is not supported firmware, however it might be interesting to support it. We'll see.
Mapping FBWA to Angle (and FBWB to Horizon) means we get a location on the map.
(via ap-crsf branch).
More mappings to follow.
@timtuxworth , if you connect a battery it would be useful to know if the voltage is reported correctly. And if you move the model, does the AHI move?
The faint line to (0,0) is because we have (alas) 8.56s: GPS: 0.000000 0.000000 0m 0.0m/s 0.0° 5 sats
all AP modes should now be handled (perhaps not correctly ....)
I'll rebuild and test in a bit. Not sure if you got the "Q" options for QuadPlane/VTOL planes - in full they are here:
https://ardupilot.org/plane/docs/quadplane-flight-modes.html
Specifically:
QSTABILIZE (Mode 17)
QHOVER (Mode 18)
QLOITER (Mode 19)
QLAND (Mode 20)
QRTL (Mode 21)
QAUTOTUNE (Mode 22)
QACRO (Mode 23)
LOITER to QLAND (mode 25)
If its a multi-rotor (drone) - then there are a bunch of modes, but I don't have one of these to test:
https://ardupilot.org/copter/docs/flight-modes.html
That's not a huge amount of help, as abbreviations will be used for the CRSF FM
parameter. So I probably have most of them, but not all the MR items. Unless someone want's to volunteer a list of all AP flight modes mapped to the INAV modes exposed over CRSF, that's as good as it's likely to get for now; AP is not a priority.
Cool. I'll do the MR stuff sometime.
I just connected a different plane with a battery monitor to get the battery. This works great, but the location doesn't display. Here is a raw-log.
https://www.dropbox.com/s/g16bbpezedsria9/mwp._dev_ttyACM0.2023-02-01T200833.raw?dl=0
Here, the log shows the location (and a "Home" icon with > 6 satellites).
- Location is shown
- At c.30s, The mode icon briefly flashs green (POSHOLD) due to
FM: CIRC
- A bit later, the AHI moves, presumably the model was moved
- Accumulated current consumption is shown
- Elapsed time is shown (0:47s)
- The only modes in the supplied log are
FBWA
,FBWB
andCIRC
. Your image showsManual
(akaFM: MAN
)
Do you still have the mwp console log ~/mwp_stderr_2023-02-01.txt
? If so, can I see it please?
OTOH, if I play your log into a build off master
branch (vice ap-crsf
branch); then guess what, I see the same as you, including "Manual".
Yes I picked up the plane and moved it around just to see if it would do anything. I guess the screenshot wasn't from the same connection as when I took the log. Here's that file. I think I did build from ap-crsf, but I might have been running the original version, not the new build. I have my current branch set to ap-crsf and then I run ./deb-install.sh -y
mwp_stderr_2023-02-01.txt
Ok I see my problem. I can't use deb-install.sh to build from ap-crsf. So I used ninja install and it works immediately. Now I get home, vehicle icon and following. There seems too be some problem with he direction of the arrow not matching the vehicle compass heading, but I'll confirm that on a different plane with a better compass.
Just a suggestion - the flight mode is very tiny. On the field, I'd like to see it nice and big, maybe a dock item (or a field in one of the existing dock items).
Thanks Jonathan, this is looking great, I'm just about ready to try to fly it - if all goes well that might be on Saturday. Yes I usually connect a Bluetooth headset to my groundstation so I can listen to audio even if I get too far from it.
Good luck. Please record a raw log, I'd love to see what happens in the air with AP (in particular the direction).
If you haven't seen it the myriad of configuration settings is described in the manual . Bit of a legacy mis-mash of command line options (which can be persisted in a file) and the gsettings
registry.
And I'll merge the ap-crsf
branch into master this evening.