Author Topic: Remote Control Issue - Pushback can't continue after tow connection  (Read 279 times)

fpvsteve

  • Newbie
  • *
  • Posts: 3
Hello there Umberto / FSDT.

I have come across an issue when attempting to perform a "Remote Control" pushback without requiring a manual selection from the GSX menu.

The process I am following (using the relevant LVARs) is as follows:

LVAR > Set RemoteControl to "On"
WAIT 500ms
LVAR > Set Departure to "Requested"
WAIT 500ms
LVAR > Set RemoteControl to "Off"
WAIT 500ms
GSX > Departure becomes "Requested" (Success!)
GSX > Bypass Pin attaches (Success!)
GSX > Tow connects to aircraft (Success!)
GSX > Departure becomes "InProgress" (Success!)
GSX > Tow raises aircraft (Success!)
---
At this point, I would expect the "Deicing" or "Select Pushback Direction" dialog boxes to appear (because RemoteControl is set to "Off")
The dialog box does not appear  .. and Departure reverts back to status of "Available" after a long wait.

---
GSX > performs pushback (Fail!)

MSFS 2020 - Not working
MSFS 2024 - Not working

Is this a bug when using the Remote Control functionality, or am I interpreting this wrong? I did take note in your manual that Remote Control should be disabled when selecting Departure due to the interactions being required.

Thank you for your help, much appreciated.

=========
EDIT:

So I did some experimentation and I disabled the Remote Control functionality, and reverted back to sending commands directly to GSX via the HotKey:

GSX > Menu HotKey Pressed
LVAR > SetMenuOpen
WAIT 500ms
LVAR > SetMenuItem Departure
WAIT 500ms
GSX > Departure becomes "Requested" (Success!)
GSX > Bypass Pin attaches (Success!)
GSX > Tow connects to aircraft (Success!)
GSX > Departure becomes "InProgress" (Success!)
GSX > Tow raises aircraft (Success!)
---
De-icing + Direction Boxes appear. (Success!)
---
User > Selection Made
GSX > performs pushback (Success!)

The only caveats with this approach are:
- the GSX icon needs to be "white" otherwise the keyboard shortcut is ignored.
- the GSX hotkey needs to be the default (or configured otherwise)

MSFS 2020 - Working
MSFS 2024 - Testing now will report back...Working

===
EDIT 2
===
So, given that the Hotkey functionality works, would it be possible for GSX to work in the same manner when using Remote Control?

What I am seeing is that when Remote Control is used to initiate Departure, any subsequent menus related to Departure cannot be seen by the user - even if Remote Control is turned off as soon as the service is requested.

Thank you for your help again.
« Last Edit: February 26, 2025, 03:58:49 am by fpvsteve »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51917
    • VIRTUALI Sagl
Re: Remote Control Issue - Pushback can't continue after tow connection
« Reply #1 on: February 26, 2025, 09:54:54 am »
Quote
Is this a bug when using the Remote Control functionality, or am I interpreting this wrong? I did take note in your manual that Remote Control should be disabled when selecting Departure due to the interactions being required.

Yes, that would how's supposed to work, but I must say we haven't tested it that much, because up to now, all Remote Control implementations we saw so far (Leonardo, FS Labs, Inibuilds A350), use the Remote Control feature fully, by enabling it at the start of the session, and disable it when the session ends.

What the manual was meant to say, is you should Enable/Disable Remote control "on demand", in case you don't want to handle the bi-directional interaction with GSX, making for an easier coding.

However, even if this is (should) be possible, it's still not recommended because, it will work only for as long we don't touch anything in the way GSX works. For example, if we had a new extra step or an immediate dialog at any time in between, your code will break and it would have to be changed to take into account the new dialog, so you would have to momentarily turn off and on again Remote Control.

Also, if you are supposed to continue the procedure later in Remote Control, you would still have to deal with the menu timeout time and the user choice, which is then not much different than implementing the complete Remote Control, where you handle the menus and the replies yourself, so no menus will ever show. Which is also better for users because, if you had to pause remote control each time there's a menu and let it show, what would be the point (or the benefit) or using Remote Control, from the user's point of view ? They'll still see the menus, so not much will change in the end, the main point of the Remote Control was to get rid of the menu entirely, or show them in a different way, for example inside an EFB or a similar instrument in the airplane.

To do this, you should handle the communication with GSX by-directionally, which means reacting to the two events (one for the menu with various values to show depending on the meaning, the other one for the text message, with the value indicating their timeout ) used by GSX to communicate to the "menu" (which in Remote Control is your app) it's time to show a menu, or to show a text message, which will appear as text lines in the "menu" and "tooltip" files in the GSX package.

The C++ sample provided shows how to do this, it's a translation in C++ of the default GSX Toolbar Menu logic, and it's kept purposely very sparse on graphic (it's a text mode console app), so it could be short and easy to follow without any graphic code that would have hindered the logic, and also to make a point you would be free to display the menus in any graphic style you want.

This approach will make your app resistant to any possible future changes in the GSX logic because, in case we'd added a new pop-up menu, or just moved an existing one to appear at a different time, you won't have to make any changes, it will just work and will show the menu no matter what it says and when it pops out.

fpvsteve

  • Newbie
  • *
  • Posts: 3
Re: Remote Control Issue - Pushback can't continue after tow connection
« Reply #2 on: February 26, 2025, 11:48:37 am »
Thank you for your reply.

For my implementation requirements, I simply wish to:
a) respond to GSX service statuses [if started by another application, or GSX itself]
b) be able to start GSX services if they have not already been started

I did not want to set RemoteControl on permanently, only when I need to start a service which is why I immediately turn it off again after doing so. However, this has made me realise that I should check to see if Remote Control was already enabled when I start a service - and if so, I should not turn it off afterwards. This will ensure other applications (such as FSLabs) will not lose their own functionality if my software is being used. I will take care of that.

However:
Since you say the secondary menu (de-ice, pushback direction) menu should show to the user even if remote control is subsequently disabled, will this be fixed in a later version?

The bug appears to be:
1. Remote Control ON
2. Start Service
3. Remote Control OFF
4. Secondary menus do not display to user, (even if Remote Control is now turned off)

Thank you.



« Last Edit: February 26, 2025, 11:51:37 am by fpvsteve »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51917
    • VIRTUALI Sagl
Re: Remote Control Issue - Pushback can't continue after tow connection
« Reply #3 on: February 26, 2025, 12:06:24 pm »
Since you say the secondary menu (de-ice, pushback direction) menu should show to the user even if remote control is subsequently disabled, will this be fixed in a later version?

I'm not sure it's even possible, and this is not a GSX bug but, instead, the very well known issue of not being able to programmatically open a Toolbar menu if it's full closed (dark icon).

In order to show a pop-up a menu, the Toolbar menu must be enabled (it can be hidden, but not disabled), so it should have a light icon. There's no way to trigger opening the menu from Simconnect, it's only possible from .JS, which is ok if you are a .JS airplane gauge, which always run as long the airplane is loaded, but since the .JS code in the Toolbar menu gets immediately killed as soon the toolbar icon is closed (instead of just hidden), nobody can bring up the menu again other than the user.

So, it will work if you can keep the menu enabled but hidden (light icon), but if for any reason the menu gets closed, it won't work.

This is not even related to Remote Control, it's part of the normal GSX usage: if you close the menu from the Toolbar with the mouse instead of closing it with the Hotkey or the X icon (those last two will just hide it), in all cases where GSX had to pop-up a menu, for example when deicing arrives and ask the fluid type, or when refueling ask for the fuel quantity, they will be missed if the menu is closed from the Toolbar, resulting in its icon being dark again.

That's why it's best to use Remote Control entirely, including handling of the menus as in the sample because, when done that way, the menu can be left completely disabled for the whole session, and you will never lose a pop-up, because you are handling them yourself.

fpvsteve

  • Newbie
  • *
  • Posts: 3
Re: Remote Control Issue - Pushback can't continue after tow connection
« Reply #4 on: February 26, 2025, 12:20:27 pm »
Okay - so am I right in assuming (I have not yet tested) that enabling Remote Control will turn the GSX icon OFF? In which case that makes sense that the menu no longer appears.

I'll be honest, I wanted to avoid monitoring the GSX files and having to parse them for text as it makes the integration a bit more of a pain as now I have to detect the GSX file locations etc from the registry - but if that's how it works I guess I have no other option 😩

Thanks for the help in any case.