where to learn

Help creating logic scripts for Air Manager Instruments

Moderators: Ralph, russ

Message
Author
GHILL
Posts: 18
Joined: Wed Apr 13, 2022 9:46 pm

Re: where to learn

#11 Post by GHILL »

Ralph wrote: Thu Apr 28, 2022 6:04 am You can just add things like an oil pressure warning light as a hardware function, you don't have to do any coding, just assign the pins. Unless you really want to learn how it works?
I just followed the online instructions for that. I do want to learn so I'm able to create my own instruments in the future.

I don't want to just use generic gauges as I feel the software is not being used to its full unlike if you know how to write the code.

Like I'm trying to write the code for the low volts to come on at a set voltage value. It might be trivia but I thought it was the easiest item to add to learn the basis code after adding a switch lol.

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

Re: where to learn

#12 Post by JackZ »

:!:
GHILL wrote: Thu Apr 28, 2022 5:51 am I do feel this forum is a very un approachable place to ask for advise, that why I leave it till the very last thing before approaching folk on here. I've read a few post where people are getting slammed for 'not knowing'.
Really?
11 posts and answers already from the OP, and I haven’t seen any slamming for “not knowing” here. Could you give some previous example posts to backup your claims?

Some people just seem not to realize that this forum, along many is filled by people that generously give their time and knowledge to help others.
To be able to help, one needs more informations than simply “ I can’t read the code” which led some of us thinking you had a problem with Lua (which apparently is not the case since you created your own). We cannot simply “guess” what is your real problem only from partial clues. [/quote]
GHILL wrote: Thu Apr 28, 2022 5:51 am
It wasn't an aimless rant also. I've spent weeks trying to find the answer. I can't add the script I'm working on because I can't write. All I can do is ask for help on what I'm doing.

I did that on a previous post and got ignored,

Sorry for being a little bitter but I don't find this software user friendly unless you just want to use the generic gauges and no coding for anything else.
Sorry to hear that. Could you post a link of your previous ignored post?

Air Manager never claimed to be a turnkey solution. If you were looking for something like that, I suggest you ask for a refund and go to other solutions like Mobiflight or SimViz

With AM you’ll get way more control/power over what you can do, but granted the learning curve is steeper, but ain’t rocket science neither (proof is, you managed to have an oil pressure working light working already).
The problem you seem to have is more related to “how to get the proper variable to achieve my goal”.
Being specific and give as much as relevant details in your questions will largely increase you probability of having an answer instead of being ignored as you said
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

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

Re: where to learn

#13 Post by Ralph »

Did you look at the scripts of some of the hardware functions?
If you have something then you can post it here and we can help.

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

Re: where to learn

#14 Post by JackZ »

As Tony said, part of your problem is trying to run before walking.
If you are willing to learn how to harness Air Manager, you’ll have to learn a bit of Lua programming first. The video I suggested is a good start.

You produced some code:

Code: Select all

if Electrical_bus_main_amps[2] <24 then 
Hw_set_led(led_alt, 1)
Else
Hw_set_led(led_alt, 0)
End
That is not likely to work, simply because in almost every programming language, keywords are case sensitive.
In Lua, Else is different from else and End is different from end . The former is invalid while the other is correct. A hint: in the Code editor, keywords are always in color, so if a keyword is black that means it is not recognized (typo error or undefined)

Maybe we should start from here? And second, Tony’s video tutorial are a great help.
Then progress to your problem at hand, which is having the lights react to the amps value.
Once again, what is the airplane you want this light for, as I gather you were using MSFS?
Could you simply copy/paste the whole code of the instrument here (and use the </> button to format it)?
We could see what is the problem exactly.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

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

Re: where to learn

#15 Post by JackZ »

I have been through your previous posts and I found this.
viewtopic.php?p=45418#p45418

So much for a “complete newbie” you claimed to be! Turns outthat if you read carefully the Wiki, 90% of your problems are solved already.
I am out.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

GHILL
Posts: 18
Joined: Wed Apr 13, 2022 9:46 pm

Re: where to learn

#16 Post by GHILL »

Thats what I tried to do with the script for the oil pressure and bus voltage that is online..

I copied and pasted the script and changed they names of the lights and used all the same syntax that was there.

All the colored words where the Same I just changed the source of the information I wanted to read from by going to the relevant web page and copying the variables.

For some reason I was getting nil index and other issues to do with end of file brackets etc which I worked through but was left with the nil index fault.

I'm not at home at the moment, once I get home I'll write what I think is correct and post it.

I really want to learn this as I find the building just as much fun as the flying. I'm not going to give up I will learn it one way or another lol.

I'm not after answers on a plate , I'm more than happy to learn by trial and make mistakes, but 2 weeks and not able to get a light on was driving me crazy lol

Alex

GHILL
Posts: 18
Joined: Wed Apr 13, 2022 9:46 pm

Re: where to learn

#17 Post by GHILL »

JackZ wrote: Thu Apr 28, 2022 8:28 am I have been through your previous posts and I found this.
viewtopic.php?p=45418#p45418

So much for a “complete newbie” you claimed to be! Turns outthat if you read carefully the Wiki, 90% of your problems are solved already.
I am out.
I am a complete beginner, it took me over a week to solve that issue, was only finding the video E26 that I found the answer to my issue.

This is why I find forums an un friendly environment.

I'm in your world your understand it. If I took you into a plant room to repair I'm sure you'll be out of your depth too.

Don't forget where you came from. Everyone has a first day.....

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

Re: where to learn

#18 Post by Keith Baxter »

GHILL wrote: Thu Apr 28, 2022 1:34 pm
JackZ wrote: Thu Apr 28, 2022 8:28 am I have been through your previous posts and I found this.
viewtopic.php?p=45418#p45418

So much for a “complete newbie” you claimed to be! Turns outthat if you read carefully the Wiki, 90% of your problems are solved already.
I am out.
I am a complete beginner, it took me over a week to solve that issue, was only finding the video E26 that I found the answer to my issue.

This is why I find forums an un friendly environment.

I'm in your world your understand it. If I took you into a plant room to repair I'm sure you'll be out of your depth too.

Don't forget where you came from. Everyone has a first day.....
Hi,

We are all prepared to help newbies.
Please remember we do this for free and do not expect anything in exchange except the courtesy basics.
Tony has spent many hours to provide the basic tutorials for all aspects of the basic AM functions. Those need to be practiced and simple small instruments created.

I am happy to do one on one sessions with any member on the discord. However I only use xplane in my FREE sessions. So if you want MSFS specific you will have to invite a MSFS member to the session.

But before you ask for a session, please go through all of the tutorials. I get annoyed when peeps ask for help when they have not gone through the tutorials.


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: 2067
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: where to learn

#19 Post by jph »

Many people tend to live in a world where they expect instant gratification. It just doesn't happen like that. There is no 'easy' programming language or solution without groundwork and experimentation. It is a VERY unfortunate side effect of the modern world in many cases.
Perhaps try a few of the following.
Set out a clear objective of exactly what you expect to achieve. Study ALL the material that is available. Have reasonable expectations of time frames. You mention 2 weeks as a cause of seemingly major frustration. That is nothing at all. A lot depends on your incoming skillsets(s) and experience.
If you ask for help then list exactly what you are trying to achieve, what sim / game you are using, what OS can sometimes be helpful also. If hardware etc what Hardware - Arduino type, Versions of software / sim / game etc.
Show what you have done so far including the code you are using by using the code insertion options when posting.
People are always willing to help if you are willing to help yourself and give clear details of how far along you are and also have realistic aims. What they won't normally do is write a solution for you from the ground up.
One issue is that, to me, you appear to come over as if you are 'just missing something small', something you just don't quite understand and once that clicks then all will be good. That is not the case though or realistic and you seem to be having huge issues understanding almost all parts as it is all new. The post @JackZ linked to is a great example where you seemed to be convinced you were missing something really obvious and simple. You were getting quite frustrated when being advised - several times - to go back to the wiki as all the info was there. The reality was that you had no idea of the syntax or layout or method yet you seemed to be oblivious of this despite what you had written and what was on the wiki that you were referred to several times were completely different. I am not even sure that you actually understand now how you got the result on the post referred to. Worth thinking about.
Joe
“Everything in moderation, including moderation.”
“Experience is merely the name men gave to their mistakes.”
Joe (CISSP) -IT security consultant

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

Re: where to learn

#20 Post by JackZ »

1 picture is worth 1000 words

Before:
image.png
image.png (4.94 KiB) Viewed 671 times
After:
image.png
image.png (5.83 KiB) Viewed 671 times
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

Post Reply