Dual TID - ilabs-kdc/bluesky GitHub Wiki

In iLabs, the commands can be passed through the Touch Input Device (TID) that has been installed in the workplace. The setup is similar to the ATCs work desk where the left TID will be acting as Display TID to pass display-related settings for the radar screen whereas the right TID will be acting as Function TID to pass function-related commands for the flights. The User Interface for this program is done with the QtDesigner toolbox having various object names for each toolbox in TID_Base.ui file.

main

EDIT: The tids can be activated through a setting called 'autostartTIDS =True' in the settings file, set this to true and they will appear automatically by calling the 'autostarttids()' function. Note that this is a bit glitchy when it comes to setting the correct window size.

The TIDs can be activated through the button click event that has been enabled in mainwindow.py file that can be accessed through the bluesky/ui/qtgl directory. The toolboxes in the main program are shown in the above figure and by clicking this toolbox, corresponding windows will be popped on with the initial menu. The button click event will activate the start_tid() function which is present in tid.py having the same directory as mentioned above.

The start_tid() function has the layout set with the necessary file path and will enable the execution of buttons for the initial case. This function requires 2 arguments and they are the window name and layout name. The window name should be always named as "TID_Function" and "TID_Display" for their respective operations and the layout name should also be in the form of string such as "my_layout". An example for layout format is explained below. The commands are passed by calling the stack function.

my_layout = [list1, list2, list3, ...]
#each list has procedure to implement the button
list1 = ['obj_name1', 'TID button name', ['command1', 'command2', ...]]
list2 = ['obj_name2', 'TID button name', ['command1', 'command2', ...]]

The inputs should be processed from the TID. These inputs are processed in guiclient.py file that is present in bluesky/ui/qtgl directory. Following are the GUI commands that needs to be passed from the TID.

Command Description
EXQ Execute a command line
CMD Set a command
CHCMD Change current command
ARG Add an argument
SETARG Set an argument
CHAR Add a character
COR Correct command
CLR Clear command
SETACT set acid in command line
EXQNOAC execute command without aircraft selected

Some buttons is enabled to present another menu or also called as submenu. This can be done with change_tid() function which is present in the same tid.py file. This function also requires 2 arguments as window name and the layout name. It is important to note that the window name should be same while presenting submenus else the program will stop and show an error. Following shows an example for the change of windows for TID Function with layout2 layout.

my_layout = [list1, list2, list3, ...]
list1 = ['obj_name1', 'TID button name', ['lambda: change_tid("TID_Function", "layout2")']]
#layout 2 - a submenu
layout2 = [list1, list2, list3, ...]

The necessary layouts for the Function and Display TID for APP and ACC operations can be created in their respective files. The directory of the file to enable these layouts is bluesky/ui/qtgl/TIDS.