Controlling Panel Visibility with Device Switch

Peer support for Air Manager desktop users

Moderators: russ, Ralph

Message
Author
User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Controlling Panel Visibility with Device Switch

#11 Post by Keith Baxter »

Ralph wrote: Tue Jun 29, 2021 11:24 am Then don't use the beta?
Ralph,

Unfortunately I need things like NAV data, animation and a few other things for the new instruments I have been working on since AM4 beta began.

If I update from AM3.7 to AM4.0.2 then there is no going back and A large majority of my instruments in AM3.7 will not work.
AM4.0.2 and AM4 (beta40) is so unstable at this time I would prefer to wait for AM4.1 beta before updating.

As I have said. AM3.7 works so well and Is an awesome product.
AM4 beta was also awesome until MSFS2020 came along.

I will continue to use AM4 (beta40) or AM4.1 beta until all the teething issues are sorted. These issues can be expected on a new product with all the changes and I know they will be fixed. You guys are excellent when it comes to sorting out issues.

My thinking is. If AM4 (beta40) is broke then AM4.0.2 should also be broken. Or are the fixes not finding there way to the beta?



Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Controlling Panel Visibility with Device Switch

#12 Post by Sling »

Keith Baxter wrote: Tue Jun 29, 2021 11:49 am AM4.0.2 and AM4 (beta40) is so unstable at this time I would prefer to wait for AM4.1 beta before updating.
What is unstable that stops you from using 4.0.2?

The reason I ask is I’m using it currently and aside from an infrequent random CTD now and again it’s mostly usable. Needless to say I haven’t been using every last API function and AM feature so perhaps there are some that have issues.

I’d certainly be interested to find out what they may be.

Tony

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Controlling Panel Visibility with Device Switch

#13 Post by Keith Baxter »

Sling wrote: Tue Jun 29, 2021 1:18 pm
Keith Baxter wrote: Tue Jun 29, 2021 11:49 am AM4.0.2 and AM4 (beta40) is so unstable at this time I would prefer to wait for AM4.1 beta before updating.
What is unstable that stops you from using 4.0.2?

The reason I ask is I’m using it currently and aside from an infrequent random CTD now and again it’s mostly usable. Needless to say I haven’t been using every last API function and AM feature so perhaps there are some that have issues.

I’d certainly be interested to find out what they may be.

Tony
Tony,

Mostly map and nav data related with a few hardware issues.
I am so scared to update at this time. At least until these little niggle's are sorted. I just do not have the confidence. If the AM4 (beta 40) is anything to go on. It will not be any time soon. AM3.7 does the job just awesome on my old instruments.

I suppose it is like using a DISCORD. :mrgreen: Some people are afraid of the leap. ;) ;)

Besides I think Corjan has a handle on it and AM4.1 will be the bees knees.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

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

Re: Controlling Panel Visibility with Device Switch

#14 Post by jph »

Keith Baxter wrote: Tue Jun 29, 2021 1:31 pm
I suppose it is like using a DISCORD. :mrgreen: Some people are afraid of the leap. ;) ;)

Keith
Nope, it is possibly just that 'some people' see absolutely and utterly no point at all in such a thing.
An appropriate analogy may be the likes of Faecesbook or Twatter...... (or whatever they are called) :lol:
Yet another supposed 'solution' looking for a 'problem' :mrgreen:
Add 'DISCORD' to the 'DISCARD' list. Each to their own of course. Live and let live etc etc..... :D

Joe
Last edited by jph on Tue Jun 29, 2021 1:47 pm, edited 1 time in total.
Joe. CISSP, MSc.

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Controlling Panel Visibility with Device Switch

#15 Post by Keith Baxter »

jph wrote: Tue Jun 29, 2021 1:42 pm
Keith Baxter wrote: Tue Jun 29, 2021 1:31 pm
I suppose it is like using a DISCORD. :mrgreen: Some people are afraid of the leap. ;) ;)

Keith
;)

Nope, it is possibly just that 'some people' see absolutely and utterly no point at all in such a thing.
An appropriate analogy may be the likes of Faecesbook or Twatter...... (or whatever they are called) :lol:
Yet another supposed 'solution' looking for a 'problem' :mrgreen:

Joe
Ah I caught the fish. I put that in there just for you Joe. :mrgreen:

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

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

Re: Controlling Panel Visibility with Device Switch

#16 Post by jph »

Keith Baxter wrote: Tue Jun 29, 2021 1:46 pm
jph wrote: Tue Jun 29, 2021 1:42 pm
Keith Baxter wrote: Tue Jun 29, 2021 1:31 pm
I suppose it is like using a DISCORD. :mrgreen: Some people are afraid of the leap. ;) ;)

Keith
;)

Nope, it is possibly just that 'some people' see absolutely and utterly no point at all in such a thing.
An appropriate analogy may be the likes of Faecesbook or Twatter...... (or whatever they are called) :lol:
Yet another supposed 'solution' looking for a 'problem' :mrgreen:

Joe
Ah I ought the fish. I put that in there just for you Joe. :mrgreen:

Keith
Haha. :) . but the fish is cheaper at the supermarket and tastes better. :lol:

jou ou bok ;)

Joe...
Joe. CISSP, MSc.

monkeysuncle
Posts: 60
Joined: Tue Nov 20, 2018 9:34 pm

Re: Controlling Panel Visibility with Device Switch

#17 Post by monkeysuncle »

navymustang wrote: Mon Jun 28, 2021 9:52 pm I have a three monitors (15" MFDs with 12 buttons) in my cockpit. Each screen has a black background screen that is visible. in front of all other layers. When the instrument senses that the master battery switch has been turned on, I turn off the visibility of the black screen.

Works great.
HI! Getting back my original post, can someone explain how to do this, or point me to a post that explains it? I like the approach of creating a black instrument that covers everything and just Show/Hide it based on a sim event.

Thanks!
Dave

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

Re: Controlling Panel Visibility with Device Switch

#18 Post by Ralph »

Then I suggest having a look at the instrument creation tutorial from Tony:
https://www.youtube.com/watch?v=lLvlqMB ... fgML5TNaWV
That will give you a rough idea of what it takes to do instrument/panel scripting.

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: Controlling Panel Visibility with Device Switch

#19 Post by JackZ »

monkeysuncle wrote: Mon Jun 28, 2021 10:00 pm navymustang, that's exactly what I want to do. Is there a post somewhere here that describes the process? I have panels that work great, and adding this feature would be really cool.

thanks in advance! Dave
We assume that these instruments/panels are Glass cockpit ones?
Could you be more specific on what panels you are referring to and in which conditions should they turn black?

If so the instrument should already have the ON/OFF state, on a per instrument basis in their code, otherwise that means they lack an important basic feature and should be enhanced.
No need for an extra instrument on top of the others IMHO.

If it’s for analog gauges, I don’t see the point, as IRL the gauges are « always on » obviously.
Lighting is a different story, but not linked to the avionics master
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Controlling Panel Visibility with Device Switch

#20 Post by Keith Baxter »

monkeysuncle wrote: Tue Jun 29, 2021 3:41 pm
navymustang wrote: Mon Jun 28, 2021 9:52 pm I have a three monitors (15" MFDs with 12 buttons) in my cockpit. Each screen has a black background screen that is visible. in front of all other layers. When the instrument senses that the master battery switch has been turned on, I turn off the visibility of the black screen.

Works great.
HI! Getting back my original post, can someone explain how to do this, or point me to a post that explains it? I like the approach of creating a black instrument that covers everything and just Show/Hide it based on a sim event.

Thanks!
Dave
Hi Dave,

I unintentionally derailed the thread a bit . Sorry for that

This is some code for xplane that will do what you want if I understand you correct.

You will have to find the event if it is for another sim.

If you are still not sure I can assist on the discord and get you up and going with the basics.

Code: Select all

--add a canvas that we will draw objects in later
my_canvas=canvas_add(0,0,1920,1080)

---Draw the canvas with a black rectangle. This could also be a circle or polygon. or multiple of any variants.
canvas_draw(my_canvas,function()

   _rect(0,0,1920,1080)
   _fill("black:)

end)

-- This function will be called when the sim avionics is switched and start show/hide the canvas.
function avionics_callback(av)
--add visibility when the avionics switch value is ==0
   visible(skin_off,av ==0)
end
xpl_dataref_subscribe("sim/cockpit2/switches/avionics_power_on","INT", avionics_callback)

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Post Reply