Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1

THEMA:

Using F1-F5 and 3D wheel with tele / switch tele windows with lua 15 Dez 2021 04:13 #1

  • davidmcq137
  • davidmcq137s Avatar Autor
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Beiträge: 75
  • Dank erhalten: 80
Hi all,

A lot of my recent apps have been done with full-screen telemetry windows. Some of these are complex apps that require some controls and limited interaction while flying, and it's hard to allow the app to "steal" some of the nice switch and knob controls that are needed for flight.

So I've been curious about using the F1-F5 "softkeys", the 3D wheel and button, and the menu and esc controls with a telemetry window displayed on the screen. As far as I know, with the standard software in its current form, this is not possible.

It is however possible to use all of these controls with the app's forms, and a the forms also have a graphics drawing capability. So if you only want to have one app running while flying, then it becomes possible to use these extra TX controls. I am assuming that changing from one app's form to another app's form is too complex to do while flying .. and that the arrows on the main window to change telemetry screens are ok to at least a limited degree while flying. So using the forms approach vs. the standard displayed telemetry approach means we need to make this work with one app for all tele windows.

So what I've been doing is experimenting with an app that intercepts calls to system.registerTelemetry, notes the callback addresses and some other info, and then passes the call onto the actual system routine. This gives me one app that can call ALL of the telemetry windows of all the other apps that are running. A quick test showed that it was feasible and it worked .. one app can show all the other app's telemetry windows, AND can have access to the F1-F5 keys, the 3D wheel and button, menu and esc.

So this means if this app (call it the "telemetry central app" or TCA) is left running while flying, you can interact with the telemetry windows using these extra transmitter controls and also cycle thru all the telemetry windows. It's actually quite easy to pass the KEY codes from the TCA app to the other apps as extra parameters on the telemetry window draw commands. And it's easy to pass the button labels for the F1-F5 buttons as extra parameters to the system.registerTelemetry() call. I've been playing with the 3D wheel as a zoom level control on one of my maps app screens and it works really well.

And since these extra args are not seen or used normally the apps still continue to work with the normal displayed telemetry function - no incompatibility is introduced. Apps only have to be modified if they want to read the TX keys and label the TX buttons while their telemetry windows are displayed by TCA. Unmodified apps can be displayed and also participate in the screen switching discussed below...

The next obvious step was to arrange for some "automatic" transitions from one tele screen to another. So I made one tele screen for TCA itself that serves as a kind of "home page" for pre-flight with antenna info, battery info etc. The standard lua api allows an app to start automatically when the TX is powered in .. so you can set it to "wake up" with TCA launched and the TCA preflight screen displayed.

Then you can assign as many switches/controls as you like with the usual form.addInputbox() call .. and these switches can initiate changes to which tele screens are displayed.

The app allows you to arrange a sequence like this: first the preflight screen is displayed on power up -> then throttle trim comes up -> ECU screen displayed -> brakes are released -> a flight-related screen (map, timer, etc) comes up --> turbine trim down/off -> ECU screen displayed again for cool down. All without pilot interaction. And I reserved one control (F5) to move thru the tele screens manually in a cycle.

I think this is pretty cool .. the app is in an early state .. but I'd love to share it with anyone who is willing to play around with something that's just getting going and maybe a little rough, or wants to collaborate on where it might go.

Also I would love to hear if others have been down this path before, and maybe have some insights I don't have.

Right now I am only handling full-screen tele windows, the same technique works fine for the single and double windows but you have to deal with screen packing and I am putting that off for now...

Dave
Folgende Benutzer bedankten sich: skyfreak, IG-Modellbau

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • Seite:
  • 1
Moderatoren: ThornIG-Modellbau
Ladezeit der Seite: 0.208 Sekunden
Powered by Kunena Forum