FrSkyRC / ETHOS-Feedback-Community

Feedback & suggestions are welcomed here for ETHOS by FrSky
191 stars 85 forks source link

ELRS model match not working. #3682

Closed miggy1952 closed 7 months ago

miggy1952 commented 7 months ago

Using 1.5.2 EU

Whatever setting in ELRS is generic and not model specific as it should be.

bsongis-frsky commented 7 months ago

There is no ELRS setting stored at radio level, everything is at model level, I don't understand your issue!

miggy1952 commented 7 months ago

Thanks for getting back to me. I turn on and set and save the model ID via the ELRS interface. Then via Tx I set ELRS parameters via configure with ID and model match on then power up the Rx with the matching model ID the servos don't move. When I look at the rx configure it shows the model ID that I set. Now I toggle model match off/on the Tx and the servos work and the Rx configure shown model ID as 0. Subsequently turning model ID on, servos as working. When I now look at the ELRS web interface id shows Model match to be turned off.

miggy1952 commented 7 months ago

If I set ELRS parameters on the Tx and then change models that require different ELRS parameters, it shows the parameters of the last model and not the parameters for the current one e.g, changing from 8ch to 12 mixed or vice versa. The last parameters set on any models are a default for all models. Thanks in advance for your guidance.

robthomson commented 7 months ago

I have seen similar issues. Its kind of like the elrs module needs to have its 'settings' stored per aircraft.

What actually happens is that when you change settings on one model - the 'module' then takes on those settings.

Power up the next model - and the settings are the same as the previous model.

The ideal scenario (think this happens in edge) is for the model settings on the radio to 'save' key details relating to the model - and then to apply them to the module when the model is chosen.

happy to run over this with you when suits?

Target0815 commented 7 months ago

There is no ELRS setting stored at radio level, everything is at model level, I don't understand your issue!

ELRS saves the settings depending on the model ID. This works under OpenTX / EdgeTX, but not with Ethos 1.4.7 / 1.5.2.

If, for example, a model with Model ID 1 is configured to 100 Hz Full under Ethos, this 100 Hz Full is also displayed in all other models with a different Model ID.

Imho, the model ID is not passed on to ELRS because the model ID is always "Off" in the ELRS setup for the RX.

This is a bug in Ethos.

robthomson commented 7 months ago

I believe this may be resolved in the latest nightly.

Certainly my initial tests look good.

Will do more in death tomorrow.

miggy1952 commented 7 months ago

Just tried the latest nightly but it is exactly the same as before

bsongis-frsky commented 7 months ago

~~After reading the code again, I believe that the CRC of the modelId frame is not good. I will push the fix for the next nightlies, please tell me if it is OK when you can, thanks!~~

bsongis-frsky commented 7 months ago

@robthomson I will need your help on this one, the modelID is stored in ModelData. But is it sent correctly to the module 1) on model load 2) after each change of the modelID in Model / RF

robthomson commented 7 months ago

Is that a strike through as in not wrong?

robthomson commented 7 months ago

We can run over this one tomorrow - will br at pc with tx from about 10am uk time

bsongis-frsky commented 7 months ago

No bug found for now, thanks for the help, I will ping you tomorrow

rburrow87 commented 7 months ago

I see this issue too in 1.5.3 and have seen it since I started using ELRS with Ethos. Usually I can go to the Model ID field, change the number, and change it back and it will switch to the correct ID's settings which solves the model match mismatch when that happens.

And the ELRS config does not seem to load the current model ID's module settings until after it has made a connection to the RX, or if I do the above and change the model ID and change it back first.

In EdgeTX, the ELRS LUA will show the current model ID settings whether or not an RX is connected, and correctly changes to the current model ID when changing models. So it it something with the way Ethos is handling it.

Have not checked how nightly behaves yet.

(by the way, I am Bender | Rob on Discord)

robthomson commented 7 months ago

Hey Rob

I sat down this evening and tried to reproduce it and it worked every time for me.

Can we try debug with the same procedure?

In my case: baud rate 4k

One receciever : d250. 1/8 telemetry On receiver : d250 1/32 telemetry

I tested repeatedly by moving the values around.. Changing models.. And going again.

In all cases I unplugged the model. Changed the model memory. Powered up new model.

Now.. I did see this issue in the past on earlier versions. In all cases it was when running on a low baud rate.

I found on low baud rate, the module could be set to say d500, but would always revert back to d250 on reconnect.

As such.. I wonder if it's elrs module not liking some settings when applied with a low baud rate.

Can you try same test?

Rob

T

rburrow87 commented 7 months ago

Yeah ELRS requires 921K baud minimum to be able to use D500 or 500hz (and F1000 I believe). 400K baud is limited to 333hz packet rate. The EdgeTX LUA will actually pop up an error message if you try to set a packet rate that is not possible with the current baud rate. So kicking you back to D250 when trying to use D500 with 400K baud is correct behavior.

So, doing this:

  1. choose model 1
  2. power model 1
  3. look at ELRS config (it's correct)
  4. de-power model 1
  5. choose model 2
  6. power model 2
  7. look at ELRS Config (it's correct)

I don't seem to run into issues most of the time. But as I type this, it is stuck on model ID 0's settings even after the RX connected, so I had to change the model ID up and down to get it to connect.

Now if I follow those same steps but do not power the models up, it does not show that model ID's module settings until I either: 1. change the model ID and change it back, then look at ELRS Config, or 2. power up the model and wait for it to connect, then look at ELRS Config. This does not match EdgeTX behavior where it shows the correct settings immediately after switching models.

bsongis-frsky commented 7 months ago

Are you saying that sometimes the ModelID is not correctly transfered to the ELRS module when you select a new model?

Perhaps in some cases it is sent too early (and the module is still not listening)

bsongis-frsky commented 7 months ago

I think I have reproduced and fixed the issue. Please check and tell me if I am right with the next nightlies!

bsongis-frsky commented 7 months ago

The modelID is now sent AFTER the first telemetry frame is received after the model switch. It seems to work perfectly.

rburrow87 commented 7 months ago

Nice! I will keep an eye out for the next nightly to see.

rburrow87 commented 7 months ago

Tried the new nightly and it is a much better experience with ELRS and model match now! Much faster connection now that it is loading the correct ID both on boot and after switching models. It would be nice if it could do the same after changing the baud rate too. Right now it reverts back to ID 0 after adjusting it.

miggy1952 commented 7 months ago

Great! What baud rate should we be using? If it is just 400 why do we have a choice?

rburrow87 commented 7 months ago

If you only use up to 333Hz packet rate with ELRS, the default 400K baud is perfectly fine. But to use 500Hz, D500, or F1000 you need at least 921K baud. The ELRS config might work slightly faster if you go higher, but I can't really tell for sure.

bsongis-frsky commented 7 months ago

What? When you change the baudrate, the modelId needs to be sent again?

rburrow87 commented 7 months ago

Yes, it seems to revert back to model ID 0 after changing the baud rate. And I can change ID up and down and it will start working again.