Assigning Generic Simulator Commands to AM Buttons and Switches

Latest Information on Sim Innovation's flagship product Air Manager

Moderators: russ, Ralph

Post Reply
Message
Author
Daviator
Posts: 19
Joined: Wed Oct 04, 2017 11:55 pm

Assigning Generic Simulator Commands to AM Buttons and Switches

#1 Post by Daviator »

I'd like to be able to assign simulator commands such as: restart scenario, restart PC's, shutdown PC's etc., to button and switches within Air Manager in an effort to make things easier on Instructor Pilots wihtout allowing them the opportunity to destroy my beautifully arrayed, delicate X-Plane/Air Manager arrangment. Is this currently possible?

Cheers
D

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Assigning Generic Simulator Commands to AM Buttons and Switches

#2 Post by Ralph »

Restart scenario, if there's a command for it in X-Plane (I don't think so), restart PC no, shutdown PC yes. There is a pause command in X-Plane, some weather stuff, time.

Daviator
Posts: 19
Joined: Wed Oct 04, 2017 11:55 pm

Re: Assigning Generic Simulator Commands to AM Buttons and Switches

#3 Post by Daviator »

Thanks, Ralph. And these can be assigned to any AM switch or button? I'll have to lookup the wiki to figure out how to change that, but I'm rather hopeful now.

Cheers
D

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Assigning Generic Simulator Commands to AM Buttons and Switches

#4 Post by jph »

Air Manager has a custom link to an Arduino or similar called Message Port.
Basically, anything that you can custom code can be communicated back and forth to Air Manager with a simple Arduino Library (From SI)

It is easy to program a complete 'virtual' USB PC Keyboard with any of the native USB enabled processors - Pro Micro or any 32U4 board, DUE, Leonardo or the later Pi Pico - and others.
You could set one of these up as a USB 'keyboard' (a native windows keyboard) and add an FTDI or similar Serial USB to the chosen board to communicate with AM via serial. (the DUE and ESP32 both have dual ports on board so you wouldn't need an FTDI but the best option wold be a Pico and FTDI)
Then, from within AM, you have absolute control over what is sent from your 'keyboard' so you can send any commands / keystrokes that you need.
If you can accomplish what you need with keystrokes and a keyboard, and it's repeatable, then you could do almost anything. Note, there is no physical 'keyboard', it only exist virtually but you can send anything at all from it to the PC. You can also get simple programs that record mouse and keystrokes and save them as macros that are then recalled by hot keys, this can also be fired by the virtual 'keyboard' with messageport.
The possibilities with Air Manager are virtually endless. If something doesn't exist 'out of the box' then their are tools, such as message port, that allow you to be extremely creative.
Joe. CISSP, MSc.

Daviator
Posts: 19
Joined: Wed Oct 04, 2017 11:55 pm

Re: Assigning Generic Simulator Commands to AM Buttons and Switches

#5 Post by Daviator »

Thanks, JPH. Does this incluse the ability to customize the graphics buttons and switches with virtual keyboard commands?

Cheers
D

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Assigning Generic Simulator Commands to AM Buttons and Switches

#6 Post by Ralph »

Graphics buttons yes, but you would have to create those yourself. We do not support keyboards or virtual keyboard commands. Unless like Joe said, you use a hardware button with a virtual keyboard command. And in theory you can also route that with a software button, but that gets very 'hacky' :)

Daviator
Posts: 19
Joined: Wed Oct 04, 2017 11:55 pm

Re: Assigning Generic Simulator Commands to AM Buttons and Switches

#7 Post by Daviator »

Thanks, Ralph. I'll have a go and report back.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Assigning Generic Simulator Commands to AM Buttons and Switches

#8 Post by jph »

You can also do it via hardware buttons with AM via MP as the same micro running MP and the virtual USB keyboard can also have buttons hooked up to it that are not related to the keyboard so a press on a hardware button is captured by messageport which sends it to AM which you then decide what to do and an option could be to send instructions BACK to the micro to send a set of key strokes to the PC. as Ralph said, it gets interesting, well, he said 'hacky' , I prefer the term .. errr... 'interesting' :lol: :mrgreen:

I would offer one bit of advice when programming virtual USB keyboards....
Plug the device into another PC for testing, not your programming PC as when the output from the keyboard is not quite, err, how do I say it , 'as intended' then the resulting carnage to the PC you are working on can be also 'interesting' :D ;)
Don't ask me how I know that. :shock: :? :roll: :oops:

Iirc, last time I used a virtual keyboard from a pro micro (Leonardo clone) it was to a laptop running a VM of win 10 on 'real' win 10 with keyboard / keystroke capture.


Joe
Joe. CISSP, MSc.

Post Reply