Open crwardlaw opened 3 weeks ago
COPIED from the previous conversation on an older issue: We could aproach it in three ways:
Options 1,2 will allow you to log the value into telemetry logs... Option 3 don't log, but probably looks nicer, and can be done without touching the firmware code.
I see in the Google Drive document that there is already an OpenTX telemetry page.. will research that.. could be a quick way to start.
Wirdget/Script like this could be the fastest:
found their LUA source code, will port it to EdgeTX. Will work on it this comming weekend.
Thank you so much!
@crwardlaw Here is the zip file for the Widget ported to EdgeTX.
Copy the VSpeak_ECU folder into your WIDGET folder:
Then on the telemety page, create a new page (full screen, only 1 big cell) and add the VSpeak widget.. and select the ECU (5=JetCat, 6=KingTech). There is a read_me.pdf with instructions for OpenTX, but is very similar on EdgeTX.
This is how it looks:
The data comes from telemetry values: Tmp2 is the Status, not a temperature (need new firmware.. will attach it soon).. should be a small value (0-11).
Here is the firmware for Radiomaster TX16S, where status comes as sensor Tmp2.
Is based on the 2.10.x branch (2.10.4 + some other fixes that will become 2.10.5).
Have no way to test it, so let me know if it works, and will check in the code changes to be added to a future EdgeTX release.
That's amazing - thank you for putting this test together so quick! I'll be back with the jet this weekend so will try it out and bring feedback on Monday at the latest.
Did you have to take in consideration the two status enums that kingtech uses where you refer to one when the other is a specific value? I believe that's how it's meant to work.
I only ported the LUA that they provided, and change the firmware to send the status on sensor Tmp2… so is the same logic that the did provide on their original lua.On Oct 8, 2024, at 3:36 PM, crwardlaw @.***> wrote: That's amazing - thank you for putting this test together so quick! I'll be back with the jet this weekend so will try it out and bring feedback on Monday at the latest. Did you have to take in consideration the two status enums that kingtech uses where you refer to one when the other is a specific value? I believe that's how it's meant to work.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Their LUA script is for use with their proprietry VSpeak telemetry unit which I think may pass the status data differently from the official kingtech and jetcat units, I'll give it a go this weekend and see how it goes but I think the following will also need taken into consideration:
In summary, depending on which variable in the struct in the spektrum .h below, is now coming in as Tmp2, I may get one of the status infos coming through https://github.com/SpektrumRC/SpektrumDocumentation/blob/2a8a5f9d6f85eff0d2458b9ac2b05e9dcf7ddcab/Telemetry/spektrumTelemetrySensors.h#L607
I think EGT will be coming in as Tmp1, therefore, if Tmp2 is coming in as the next variable in the struct, I reckon I will get the offCondition enum coming through to the WIDGET.
I see, i was thinking that you have the VSpeak Translator. Im not processing the offStatus code right now, i think what they are doing is passing the OFFstatus as negative. I can do something similar in the EdgeTX firmware. Another thing that im not sure is if the value is BCD encoding or not... every other field is documented as BCD, but the statuses don't have any documentation that say BCD encoding.
Lets see what telemetry sensor values you get from your ECU. What are you using to send the data from the ECU to the RX?? any translator (Like VSpeak)?? just want to make sure it can send the Spektrum JetCap ECU messages,
If the sesors are not OK, I have a small LUA script to capture the RAW data comming from Spektrum telemetry data. we can try that after the first attempt.
This is how the code in the firmware is now:
The status comes as Tmp2
The kingtech telemetry unit which I have can be found here https://kingtechturbine.lu/KingTech-T-Modul-5-in-1-Telemetry_1 The kingtech telemetry unit connects to the kingtech ecu and the spektrum Rx. I've been able to see it working as have had it hooked up to my Dad's spektrum which was able to receive the temps etc. and seemed to be receiving the status when set to jetcat, but might not have been using the offCondition as that might only be a kingtech thing - it's difficult to tell. I have been in touch with Kingtech and they were not able to provide documentation, so I have had to piece it all together myself.
I think the recording LUA script would be useful to see both the status and offCondition enums changing.
Did a bit more work on both the LUA and Firmware. Is combining the Status and offStatus in the way that the LUA widget needed.. (status positive, offStatus negative). Moved the status to Tmp4 to avoid conflicts.
Sensors: Tmp3 Turbine Temperature Tmp4 Status A3 ECU voltage A4 pump votage RPM RPM
So I have good news and some not so suprising news - firstly thanks for your efforts so far - I can't believe how well this has went!
Thanks again, Chris
Hi Chris, Good that the firmware seems OK, thats the most dificult part.. the LUA is easier to change later. The firmware was build using the 2.10 branch, that is a pre-release of 2.10.5. So once we are OK with the firmware, I can create a Merge Request to be added offcially to the next version of EdgeTX.. maybe 2.10.6. I can build a 2.10.5 + this change only later once 2.10.5 is released in the meantime.. but yes, use it only one the ground for now.
I modified to LUA to add ECU type 26, that will be Kingtech with the Kingtech telemetry module. The name shows as "Kingtech KT Tel". You can edit the messages on the "msg_table_Kingtech_2" that currently is a copy of the Kingtech ones. I want to leave the script backward compatible with the VSpeak instead of replacing the current Kingtech.
New Widget attached below, you can edit main.lua with your favorite editor. Negatives are the OffStatus, and Positives are the Status. OffStatus is only used if the main Status is Zero. If this logic changes fror different turbines, we can change the firmware to report both Status and OffStatus separate (Tmp4, Tmp5), and the script join them depensing of the value of Status. VSpeak_ECU.zip
But looks like we are on the right path.
Firmware 2.10.5 was released, no more changes compared to the branch i had, so seems like the Firmware that i gave you is safe.
I tried the widget and telemetry again over the weekend and I am unfortunately stumped at the order of the enum texts that are required. As there is no clear mapping between the Jetcat status enum : Kingtech status enum : what a spektrum Tx shows for the Jetcat enum : the Kingtech ECU screen status display : vspeak's enum, it is making it difficult to work out what the correct enum should be for the vspeak widget. However, I plan on running the turbine next weekend and that will let me match up more of the status enums between the Kingtech ECU screen and the vspeak widget which will hopefully guide me to get more of them right. I'm also going to get in touch with Kingtech again to see if they can assist by providing the enum that the Kingtech screen uses as that is really what I need.
Anything else you are looking for at the moment?
Not much that i can do on my side.. the only thing that i was looking is at the Jetti Script. Looking at the status messages on Digitech and vspeak converters for Kingtech. Digitech all positive, and vspeak has negative ones and positive ones. Not sure what the Kingtech converter sends as status on the Spektrum Telemetry Frame.
On the spektrum Radio, it it was made for Jetcat, it will be showing you probably the wrong status message.
Looked at a few of the configurations of the Jetti Widget: https://github.com/thomasekdahlN/jeti/tree/fbf69aa66e8651a4ddddf9da2f5e5ec90dd9ad4a/ecu/converter
The statuses for VSpeak are more richer than the digitech ones..
Is there an existing issue for this feature request?
Is your feature request related to a problem?
When using a Spektrum Rx, Kingtech turbine telemetry kiddy-backs on the Spektrum built-in Jetcat Telemetry structs. However, EdgeTx does not import the STATUS field which is based upon enums. Kingtech and Jetcat use different enums. My Radio master TX16s Max with Spectrum Rx detects the majority of the Jetcat/Kingtech Telemetry data but not status. I have linked useful documents in the additional context section. N.B.: the status enum for Kingtech seems to use two enums depending on whether the first enum is a specific value.
The status enums may also be applicable to other Rx protocols, this may not only benefit Spektrum users.
Describe the solution you'd like
Preferably option 2 below so that all telemetry and sensor information is held on the one page on the UI.
Describe alternatives you've considered
Additional context
Spektrum's X-Bus file showing Jetcat enum and Jetcat struct: https://github.com/SpektrumRC/SpektrumDocumentation/blob/2a8a5f9d6f85eff0d2458b9ac2b05e9dcf7ddcab/Telemetry/spektrumTelemetrySensors.h#L739
EdgeTx Spektrum telemetry file showing a TODO for adding status telemetry: https://github.com/EdgeTX/edgetx/blob/149e1a2df00f680404691dadbb59de62abecc3bf/radio/src/telemetry/spektrum.cpp#L193
Document showing the differences between enums for Jetcat and Kingtech - page 41 section 2.9.4: https://drive.google.com/file/d/1TfaMCA3zpDcdGQMnRq5MnjJexTBp-VZD/view