EdgeTX / edgetx

EdgeTX is the cutting edge open source firmware for your R/C radio
https://edgetx.org
GNU General Public License v2.0
1.57k stars 333 forks source link

Frsky D16 Protocol s.port Telemetry Missing #1491

Closed richardclli closed 1 year ago

richardclli commented 2 years ago

I have a friend used the RM receiver R161, and used the S.Port to send back telemetry, the included figures are from OpenTX 2.3.9 and compared to EdgeTX 2.6.0 released version, EdgeTX has a lot of sensors missing. And he tried EdgeTX 2.5.0 as well. Similar result, a lot of sensors missing.

OpenTX 2.3.9 150479170-657feebf-b954-41b6-b819-a42f38874ab4

EdgeTX 2.6.0 IMG 002

I am thinking if the Frsky Hub telemetry is broken from day 1 in the OpenTX 2.4 branch?

And this is not related to https://github.com/EdgeTX/edgetx/issues/1139

General information

pfeerick commented 2 years ago

But possible correlation / link to https://github.com/EdgeTX/edgetx/issues/1260 probably not, since it's internal MPM

CNzhangsir commented 2 years ago

This problem is the problem I encountered, because I used the Yaapu lua script on the OpenTX 2.3.9 version before. When using the frsky D16 protocol in the all-in-one tuner built in the TX16s, I can use the s of the Radiomaster R161 receiver. The port's telemetry returns a lot of sensor data from the Pixhawk's Ardupilot firmware and provides it to Yaapu's HUI. Now, I tested various versions from EdgeTX 2.4, 2.5, 2.6RC1-3 and found that none of them solved the problem.

The backhaul telemetry of TBS crsf on each version of edgeTX is normal.

pfeerick commented 2 years ago

So to be clear:

And only those five sensors show up on EdgeTX (which look to be the top rows on OpenTX view).

On interesting thing which I'm not sure of the relevance / importance of is that they don't have an ID number... all the missing ones are '0' ... just thinking that there had better not be something in the code around the telemetry that ignores 0 😆 😮

richardclli commented 2 years ago

I think this is the case:

In telememetry_sensors.cpp:

bool TelemetrySensor::isAvailable() const
{
  return ZLEN(label) > 0;
}

And in model_telemetry.cpp:

  for (uint8_t idx = 0, count = 0; idx < MAX_TELEMETRY_SENSORS; idx++) {
    if (g_model.telemetrySensors[idx].isAvailable()) {
      auto txt = new StaticText(window, grid.getLabelSlot(), std::to_string(idx), BUTTON_BACKGROUND, CENTERED | COLOR_THEME_PRIMARY1);
      Button * button = new SensorButton(window, grid.getFieldSlot(), idx, ++count);

Well, for ID = 0, label = NULL and ...... Opts out...... Check again, seems not true.

richardclli commented 2 years ago

When ID is not found in the known list, the ID is a custom ID and the ID will be decoded to become a 4 chars label. In this case, the isAvailable() should return true. The problem is not in the display?

pfeerick commented 2 years ago

Matek F765-WSE which can run Ardupilot arrived today and I have R161 receivers so hopefully I can reproduce this in the next couple of days.

pfeerick commented 2 years ago

I think I finally have ardupilot and sport telemetry going with the R161 and F765-WSE ... in addition to the four telemetry elements from the R161 receiver itself, I only get GPS from Ardupilot (i.e. as shown in the OP screenshot) - so hopefully there are more telemetry elements coming down the feed and I'm just not see them. Just need to double check on either a B&W radio or possibly OTX and then might have some chance of finding out what is going on.

Curiously, I just tried OTX 2.3.15 nightly from a week or so ago that I still had knocking around on a T-Pro, and that also only showed five sensors. So either I need to somehow enable more telemetry, or OTX may have this problem also...

pfeerick commented 2 years ago

@richardclli @CNzhangsir Can you confirm this isn't an issue/misunderstanding of ardupilot setup? I have just been looking into this a bit further, and there are two frsky sport options in ardupilot = 10, and 4. If you use 10, you are using a passthrough mode that will NOT show up sensors in the discovery tab by design as the data is sent without being wrapped in frsky sensor messages - it is meant to be directly with the paid FlightDeck lua scripts. If you set it to 4, you will then get all the sensors in telemetry screen...

i.e. I now have 14 sensor values appearing instead of 5.

image

Described further here

I've not tried with Yappu yet, but it is claimed that it works with the passthrough mode (10) as well as, I suppose you could call it legacy (4) mode?

pfeerick commented 2 years ago

Right, so with Yappu, and frsky sport (4), you get telemetry sensors, but yappu doesn't seem happy with that by default.

If I set it to frsky sport (10), you only get five sensors, but yappu is now happy, and if you run the yapuu frsky debug tool you see the data it is looking for is coming in...

image image image

With frsky sport (4) the yappu frsky debug tool shows no data.

richardclli commented 1 year ago

@CNzhangsir So this can be closed?

gagarinlg commented 1 year ago

closed, no response