Closed frankiearzu closed 1 week ago
Would love to see this work
Working on it. It will be ready in the next nightlies. The interface will be completely different than opentx / edgetx, I don't understand why it has been done differently than sport and crsf.
Thank you, just let me know what is the LUA api, and I can give it a try.
Perhaps it will need to be improved, but I think that it is possible to keep the implementation consistent between S.Port, CRSF and Multimodule / DSM
You will have to get a sensor (which is a listener to the Fifo) with this function:
sensor = multimodule.getSensor()
Then you will be able to write with this function:
sensor:pushFrame(<bytes>)
And read with this function:
sensor.popFrame()
, or with filters sensor.popFrame({i2cAddress=0x00})
or even sensor.popFrame({type=0x04})
Also this implementation allows multiple listeners, which AFAIK is not possible with opentx / edgetx
Thank you!, will wait for the nightly build. will try TexGen first that is receiving only, and then will try Forward Prog that sends/receives.
Verified to be working as expected with latest 1.6.0 nightly. Thank you @bsongis-frsky! Now more work in the GUI!
@frankiearzu
https://github.com/rotorflight/rotorflight-firmware/issues/173
Arw you able to provide any assistance with this?
Im porting the DSM Forward Programming tool to Ethos, but i think is missing the basics to comunicate with the Multi-Module using DSM Forward Prog..
What i need to start:
shared "multi_buffer" inside the firmware that is used to comunicate with LUA and multi-module.
LUA function to access to the "multiBuffer()" to read/write the firmware buffer. https://github.com/opentx/opentx/blob/2.3/radio/src/lua/api_general.cpp#L1758
On the sending side, once the multiBuffer is populated with data, need to send it to the MultiModule so that the data can be added to the DSM data frame sent to the RX. https://github.com/opentx/opentx/blob/2.3/radio/src/pulses/multi.cpp#L472
On the receiving side, The Forward programming data comes as telemetry sensor data..there needs to be a way to copy that data to the multibuffer. https://github.com/opentx/opentx/blob/2.3/radio/src/telemetry/spektrum.cpp#L353 or from EdgeTX that i updated to support many of the DSM sensors, as well as TextGen (Avian Programming) https://github.com/EdgeTX/edgetx/blob/main/radio/src/telemetry/spektrum.cpp
To support TextGen, also will need this piece of code. It allows LUA to capture any of the telemetry frames into the multi-buffer. https://github.com/EdgeTX/edgetx/blob/main/radio/src/telemetry/spektrum.cpp#L586 (ends in L613)
Currently continue my development using a fake multibuffer simulator.