FrSkyRC / ETHOS-Feedback-Community

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

LUA interpreter with external radio module (EG: TWIN Lite Pro) #4280

Open m-rik-prog opened 2 months ago

m-rik-prog commented 2 months ago

More than a fault report, it is a question: The ETHOS operating system knows that in the model configuration the user has deactivated the internal radio module and activated the external radio module and therefore telemetry automatically recognises the different configuration and on the telemetry page reads the data stream, recognises it, uploads it and automatically displays the sensor values received from the external module, AUTOMATICALLY. The LUA app, on the other hand, does not automatically recognise the model configuration set by the user and therefore two different versions of the LUA app must be created and then kept up-to-date, one communicating with the internal module and one communicating with the external radio module. Is there a reason for this choice? Why does the operating system telemetry behave in one way and the LUA interpreter in a different way? Wouldn't it make life easier for users to be able to use a single LUA app and update it instead of always having to use two different ones and having to update two of them? (Of course, it would also make life easier for LUA app developers). Wouldn't it be more logical for the LUA interpreter to automatically recognise the configuration of the model unless a LUA command is deliberately introduced that dictates to the interpreter that the data is only and exclusively taken from the internal module or the external module? Or is there a workaround for automatic data stream recognition (but which does not add code to be interpreted by increasing the memory occupation by all LUA apps).

bsongis-frsky commented 2 months ago

The telemetry works like a stream, and your app will filter the telemetry values which are received. Perhaps you could avoid the filter on the module by using moduleIdx(0xFFFF) ? If it works, I will add a constant

m-rik-prog commented 2 months ago

Thank you for your suggestion. We had already tried in the past with "module=0xffff," but without success. Now we tried with moduleIdx thinking that something had been changed in the meantime in the Ethos updates but without success (Tx=X20S with TWIN Lite pro external module, Rx=TW-MX).

m-rik-prog commented 2 months ago

Although it has nothing to do with LUA but relates to your TWIN Lite Pro and TW-MX, I would like to point out that when you go into 'Info' to check that the external module and receiver both have the latest firmware, you experience numerous 'Sensor Lost' that disappear as soon as you exit 'Info'.

bsongis-frsky commented 2 months ago

It should be another issue, it is not related to Ethos!