I noticed a periodic bouncing between mode 1 and 2 even without my patches but as soon as I put some distance between tx and rx the bouncing stops (my patches simply added the mode switch detection code to ardupilot)
The widget expects custom telemetry data i.e. passthrough telemetry data pushed from opentx to lua, so if you do not enable rc_options bit 8 the widget has no way to tell custom telemetry is enabled.
GPS is pushed as a regular sensor so having GPS data is not enough to tell telemetry is working because sensor data is cached and I can read it from lua even when telemetry is off.
Open to ideas here, the problem is I can send a passthrough packet every couple seconds only while in mode 1.
As for the last point, I need to double check, my widget uses opentx and I might be tied to a built in 2 seconds timeout for telemetry data, telemetry and RC have different timeouts in OpenTX
I really don’t understand what’s going on with UART performance.
With GPS @230k baud + crsf @400k baud + mavlink on USB I can see a slowdown of the telemetry rate, I can’t stall it myself, but if I disconnect USB it gets better and improves by disconnecting GPS and this on master as well, my code adds some delay when I enable custom telemetry but the expected performance should be like what you get on UART1, what I mean is that the issue was there before my patches no idea why we didn’t spot it before
Unexplained RFMD switches from mode 2 to mode 2 I’m inclined to think they were detected but you didn’t get the message via CRSF telemetry for some reason (we only have a 5 message buffer), if you have a tlog of the flight I bet they are there.
Occasional No RC Receiver reported via my widget is a text conversion of the MAV_SYS_STATUS_SENSOR bitmask that the telemetry library checks before sending each telemetry frame (so around 20Hz), if one of the status bits is triggered is it rendered as a specific status text message but only by the telemetry library, no mavlink message is ever created and that’s the reason why you only see this messages while using my widget, the code is here so again you’ve always had this events, my guess is they went undetected because your ground station did not render the SYS_STATUS error bitmask mavlink message.
@yaapu thanks a lot for that comprehensive explanation. can‘t fully wrap my head around that sensor flag yet to be honest, some more reading might help.
Short update:
Got the latest version V07 working on omnibusF4Pro with Frsky xLite (on the bench).
More tests to do.
@vierfuffzig Can remember the appearance of the odd “no RC receiver” messages as wel when I switched from Plane3.9.9stable to Plane4.0.5stable using the Frsky Passthrough. Maybe it’s related to the scheduler change mentioned by Alex above. From my (limited) understanding the newer PT scheduler was merged in between 3.9.9 and 4.0.5.
Hi Sasha,
I wrote the new passthrough scheduler to better handle frsky telemetry, it has nothing to do with RC code, all it does is a better allocation of the telemetry bandwidth, in fact you can get a No RC Receiver even if you disconnect sport.
I saw “No RC receiver” on arduplane without triggering failsafe which is odd since from what I can tell there’s no grace period in plane for no rc signal, but I might be wrong
@vierfuffzig can you check if you can still stall telemetry with this version, it should have a faster telemetry response arduplane_matekf405wing.zip (631.1 KB)
@yaapu tested latest code, basically the same behaviour as before. can’t wrap my head around the performance discrepancy on USART1 vs other UARTS
USART1: constant rate of 150 no matter what
other UARTs: basic rate of ~10 - 15, increasing to ~ 50 when USB connected (just plugged into PC, no active MAVLink connection). stalling to ~ 2 over time
intermittend No RC Receiver flags and unmotivated RMFD switching
my individual guess is that this is a melange of ardupilot UART handling and CRSF bandwidth saturation issues. without any profound insight, i don’t think we should lose valid RC Input for more than 200 ms unless intentionally choosing a low update rate.
two more points i noticed while testing:
the (dis-)armed panel consumes a noticeable amount of your insanely awesome map widget.
passthrough sensor_status_flags information is pretty verbose and cautious regarding severity level rating where the base-code is a bit more tolerant. i’ve noticed constant "CRT: Bad AHRS" flags, likely due to using_gps being flagged on my no-compass setup until EKF yaw gets aligned to GPS velocity vector. quite some effort has gone into avoiding the “Bad” label on an expected process. might be an option to use the “healthy” flag here instead.
Hi @vierfuffzig , one more version to test, this one should be much better, I relaxed a constraint that should not be necessary on full duplex link (discussed this with @andyp1per) arduplane_matekf405wing_v2.zip (631.1 KB)
did you actually arm the vehicle? that huge disarm dialog goes away ad only comes back on next disarm, it never bothered me but since it’s pretty big I can understand that could disturb
Those “verbose” errors are there from the original authors of the library, it might be time to refresh them with updated messages