Generic-Battery Switch in Hardware and Instrument?

Questions about deployment and use of Air Manager Instruments

Moderators: russ, Ralph

Message
Author
Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Generic-Battery Switch in Hardware and Instrument?

#1 Post by Kaellis991 »

My PA28 panel with the hardware and instruments has been developed over the last year or so by an uneducated cockpit builder....me.
So much of the setup has been a trial and error exercise during the learning process and still some of the connections between instruments and hardware are confusing.
However, I do have a much better understanding of AM, Instruments, and hardware than I did when this panel was started last year. But still learning.

What I am having a little difficulty with now is that some time ago I added the Generic-Battery Switch hardware to my panel and it appears with the plug symbol.

I wanted to look at the code for that hardware but I can't find it. How do I look at or edit the code for the hardware that shows in my panel list?

When I go to Create/Edit and select hardware, I see a Generic-Battery Switch, but I dont think that's the same Generic-Battery Switch script that's in my panel, even though the names are the same.
Is it the same one? How would I know? I cant tell if it is or not.
image.png
image.png

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: Generic-Battery Switch in Hardware and Instrument?

#2 Post by Corjan »

Hi,


The two screenshots you shown are of the same plugin. You can tell by the name, which is the same.

Hardware functions where added later to AM, hardware used to only be added to instruments.
But right now we try to separate the two. So try to only use hardware within hardware function plugins.


Corjan

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: Generic-Battery Switch in Hardware and Instrument?

#3 Post by Kaellis991 »

I am still trying to get a clear mental image of how best to handle all of this.
Having all hardware in the panel is where I would like to get to.

But here is what confuses me. When I change the name of one or the other, then the names for Batt switch in the panel and the Batt switch in the hardware list are different.

Should those names be the same? I just dont see the connection.

Is that code in the hardware list the same code that the hardware in my panel is running?
image.png
image.png

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

Re: Generic-Battery Switch in Hardware and Instrument?

#4 Post by jph »

Kirk, read my reply to the other post youmade, you should hopefully see where the names come from, you can also play along at home, you cant break anthing, i give enough details there for you to create your first hardware unit with all the plugs you want, ;)
Joe. CISSP, MSc.

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: Generic-Battery Switch in Hardware and Instrument?

#5 Post by Kaellis991 »

Thanks Joe...

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: Generic-Battery Switch in Hardware and Instrument?

#6 Post by Kaellis991 »

So riddle me this....when I comment out the hw_switch_add function in the hardware I named PA28 (hardware) and stop and restart my panel, my physical switch still works.


image.png
image.png

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: Generic-Battery Switch in Hardware and Instrument?

#7 Post by Corjan »

Hi,


Seems like you never saved the file, indicated by the '*' next to the filename.


Corjan

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: Generic-Battery Switch in Hardware and Instrument?

#8 Post by Kaellis991 »

Corjan,

Here? I dont see an asterisk next to a file name anywhere in this view.
image.png

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: Generic-Battery Switch in Hardware and Instrument?

#9 Post by Corjan »

No,


Not in your last screenshot, but it was there in the one before that.

Does it still work when the file was saved to disk?
That would be very mysterious if it would :)


Corjan

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: Generic-Battery Switch in Hardware and Instrument?

#10 Post by Kaellis991 »

I'm still trying to get a clear picture of the relationship between the hardware showing in my panel and the hardware that shows in Create/Edit <hardware>.

In my panel I can select the hardware and select the device, channel and pin in the right window.

But I see that in the hardware function section there is also a hardware switch which appears in the hardware properties.
In there are the connection boxes for the (3) parameters of device, channel and pin.
But those do not need to be connected from what I can tell.

Is that correct?

Post Reply