Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to use AAO with the Maddog?

Featured Replies

13 hours ago, daan_vb said:

I’ve been tinkering with this as well. Has to be the most mental LVars I’ve come across yet! Why does it have to be so difficult and time consuming! The CRJ was probably the best in terms of layout and naming convention

The Bae-146 is also really really nice, well organized and labeled. This Maddog is just Madness. So i give up and hope you guys will get it to work. BTW great work on the first Streamdeck Version, keep up the work 😉

I've got the hang of this now, its not so bad actually. A bit of mental arithmetic is good for the soul.

I'm struggling with the heading and altitude selects though. In the sim you click on them to pull the knob out to arm them.

In in the model def file i think its this (similar for alt as well):

fgcp_hdg_button1

(L:fgcp_hdg_button1, enum)

But there are no mental Lvars associated with it, and plugging that into a script doesn't seem to work eg

1 (>L:fgcp_hdg_button1, enum)

Any ideas?

Edited by daan_vb

🛫

Aren’t those wrapped in animation tags? If they are then that will just fire the animation without doing the logic. The logic drives the animation, not vice versa. All the push pull logic is normally in a 4 line block of code, all of the knobs have them. 
 

Where possible I find it better to use the mouse wheel numbers as they are much shorter and easier to work with. There are a couple of items that only allow mouse click actions though.
 

The Altitude knob push pull has a 5 line section of code for manipulation. Working from memory here but when you right click to push the alt knob in, you have to remember to send the right release logic too otherwise the alt knob stays pushed in and that is not a thing in reality. You adjust altitude in 100’s of feet while holding the alt knob in. When you let go of it it automatically pops back out again and you are back in 1000 feet steps. The way I use it in Spad is to push the Alt knob in then have a 4 second pause before sending the right release logic, that way I get 4 seconds to dial in 100 feet steps, then it switches back on its own. 

Cheers, Andy.

35 minutes ago, Andydigital said:

Aren’t those wrapped in animation tags? If they are then that will just fire the animation without doing the logic. The logic drives the animation, not vice versa. All the push pull logic is normally in a 4 line block of code, all of the knobs have them. 
 

Where possible I find it better to use the mouse wheel numbers as they are much shorter and easier to work with. There are a couple of items that only allow mouse click actions though.
 

The Altitude knob push pull has a 5 line section of code for manipulation. Working from memory here but when you right click to push the alt knob in, you have to remember to send the right release logic too otherwise the alt knob stays pushed in and that is not a thing in reality. You adjust altitude in 100’s of feet while holding the alt knob in. When you let go of it it automatically pops back out again and you are back in 1000 feet steps. The way I use it in Spad is to push the Alt knob in then have a 4 second pause before sending the right release logic, that way I get 4 seconds to dial in 100 feet steps, then it switches back on its own. 

If I can get the right code then I can do some interesting manipulations of it like you have done. 

It’s wrapped in a <Code> tag but those two don’t have those 4 manipulation lines, eg LeftSwitch, Right Switch, WheelUp etc associated with it (that I can see in the model_interior file) that most of the others do…

Unless that’s not the right Lvar…but I can’t see what else it might be.

🛫

The heading knob section starts at line 13948 with beta 28 installed, use Notepad++ to view the file then you will have line numbers. The section you need is a few lines later 13959, the wheel up and down section start at 13961.

The LVAR you need to send those numbers to is at the end of those lines i.e. fgcp_event
 

To find that section I just used the FIND facility with "hdg" as the term used. Just keep pressing enter until you get to a section that has a block of code with (M;Event) at the start of the lines. M:Event is mouse event.

Edited by Andydigital

Cheers, Andy.

Just to explain what I meant about the animation tags, this is the section that does nothing other than make said item animate in the cockpit.

 

		<Animation>
			<Parameter>
				<Code>(L:fgcp_hdg_knob1, enum)</Code>
			</Parameter>
		</Animation>

 

Cheers, Andy.

The heading push is a weird one, what you need to send is -2147483635 note the minus sign. I could go into why you need to do that but I don't completely understand it myself. But basically in this case the number is too big for a 32bit integer, so instead of adding 13 to 2147483648 you subtract it e.g. 2147483635 BUT you also have to make it a negative number, so you send -2147483635 to fgcp_event.

I've yet to come across anything else where I have to do the above but I've not gone much beyond the FGCP so far with my setup.

I hope I didn't confuse things.

Edited by Andydigital

Cheers, Andy.

40 minutes ago, Andydigital said:

The heading push is a weird one, what you need to send is -2147483635 note the minus sign. I could go into why you need to do that but I don't completely understand it myself. But basically in this case the number is too big for a 32bit integer, so instead of adding 13 to 2147483648 you subtract it e.g. 2147483635 BUT you also have to make it a negative number, so you send -2147483635 to fgcp_event.

I've yet to come across anything else where I have to do the above but I've not gone much beyond the FGCP so far with my setup.

I hope I didn't confuse things.

Thanks very much Andy! Ah ok, I had used the Wheel Up/WheelDown for turning the heading left and right. I was thinking before whether the LeftSwitch and RightSwitch was actually for pushing the knob in and out. I’ll try this when I get back home thank you!

🛫

3 hours ago, Andydigital said:

The heading push is a weird one, what you need to send is -2147483635 note the minus sign. I could go into why you need to do that but I don't completely understand it myself. But basically in this case the number is too big for a 32bit integer, so instead of adding 13 to 2147483648 you subtract it e.g. 2147483635 BUT you also have to make it a negative number, so you send -2147483635 to fgcp_event.

I've yet to come across anything else where I have to do the above but I've not gone much beyond the FGCP so far with my setup.

I hope I didn't confuse things.

Worked great thanks again

🛫

  • Commercial Member
On 5/3/2022 at 5:24 PM, guenseli said:

Can "old" ipc.control numbers transfered into sth useful with AAO?

e.g. ipc.control(69656, HDGvar)

 

thx

Hello @ll,
 

anybody who has been wondering about this, yes this is possible. Those are just numerical K:-Events
nnn (>K:#69656)

There is one limitation in AAO though, with version 2.29 the "LISTEN_FOR_K" command does not return the value that has been sent with the event. That will be possible in version 2.30.
Example:
(LISTEN_FOR_K:#69662) (>L:MdAltitude) will return "0" in 2.29 and "whateveraltitudehasbeensetwiththisevent" in 2.30.

If you never touch anything in the VC with the mouse you can utilize local LVars to control things like the MCP altitude from the outside ((L:MyMDAPAlt) is a random name chosen for this purpose)

Inc Script:
(L:MyMDAPAlt) 1000 < if{ (L:MyMDAPAlt) 100 + s0 } els{  (L:MyMDAPAlt) 1000 + s0 } l0  (>L:MyMDAPAlt) l0 (>K:#69662)

Dec Script
(L:MyMDAPAlt)·2000·>=·if{·(L:MyMDAPAlt)·1000·-·s0·}·els{·(L:MyMDAPAlt)·100·>=·if{·(L:MyMDAPAlt)·100·-·s0·}·els{·0·s0·}·}·l0·(>L:MyMDAPAlt)·l0·(>K:#69662)

LORBY-SI

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.