Old style Cessna 172 oil pressure won´t run

Questions about deployment and use of Air Manager Instruments

Moderators: russ, Ralph

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

Re: Old style Cessna 172 oil pressure won´t run

#11 Post by Keith Baxter »

Hi,

Ok let Ralph attend to other stuff.

I am about most time and prepared to help.

Just so that there are no surprises.
1) You are using xplane.
2) the airframe is the std xplane Cessna Skyhawk? NOT The Cessna Skyhawk (G1000)
3) You have DatarefTool installed?

Let us start by modifying the oil temp and oil pressure gauge and get that working.
I am going to point you in the direction and you must do the changes. that way you will learn.

Do what I suggested in my previous post. Make a clone of the instrument and change the dataref.

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
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Old style Cessna 172 oil pressure won´t run

#12 Post by Ralph »

Compare these two and you'll hopefully understand what I mean with a missing name:

Code: Select all

fsx_variable_subscribe("ENG OIL TEMPERATURE:1", "Farenheit", 
                       "ENG OIL PRESSURE:1", "PSI",
                       "ELECTRICAL MAIN BUS VOLTAGE", "Volts", p3d_oil_vars)
xpl_dataref_subscribe("sim/flightmodel/engine/ENGN_oil_temp_c", "FLOAT[8]",
                      "sim/flightmodel/engine/ENGN_oil_press", "FLOAT[8]", 
                      "sim/cockpit2/electrical/bus_volts", "FLOAT[6]",
Especially look at p3d_oil_vars and what the X-Plane subscribe has. If you don't see it then just let me know :)

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

Re: Old style Cessna 172 oil pressure won´t run

#13 Post by Sling »

acornejo wrote: Thu Dec 03, 2020 1:37 pm
Ralph wrote: Thu Dec 03, 2020 1:12 pm There's a lot of things that aren't correct in this script :)

- The X-Plane subscribe has no callback.
- The original callback function has bus volts first, then oil pressure and temperature for X-Plane and then for Airfoil Labs. You have Engine oil temperature first, then pressure and then bus volts.
- On line 80 there's a function which doesn't do anything.

Is it so clear that is my first time trying to do something with scripts???...hahaha...You say I`m wrong with this and that...And the "subscribe" and "callback" ¿what is that?...hahaha...Sorry for take your time with small basic things...But you know that every project takes an important effort for each of one that have yhe passion of flight and try to drive the simulation to another level...

Thank you so much for that.
If you don’t know what a subscribe and callback are you really should read the Wiki API pages and follow along with the tutorial videos before attempting instrument mods. It really pays just to understand the basics first.

acornejo
Posts: 5
Joined: Thu Dec 03, 2020 2:05 am

Re: Old style Cessna 172 oil pressure won´t run

#14 Post by acornejo »

Is working now...Thank you so much Keith...Just adding the "_psi" and start to display well...

Thank you Ralph too for your time and advises.

I`m happy again...hahaha

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

Re: Old style Cessna 172 oil pressure won´t run

#15 Post by Keith Baxter »

acornejo wrote: Thu Dec 03, 2020 2:11 pm Is working now...Thank you so much Keith...Just adding the "_psi" and start to display well...

Thank you Ralph too for your time and advises.

I`m happy again...hahaha
Hi,

Glad you are happy.

As Tony says. It is important to understand the basics.
And get DatarefTool installed. That would have told you your issue.

https://github.com/leecbaker/datareftool

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
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Old style Cessna 172 oil pressure won´t run

#16 Post by Ralph »

I totally agree. We can give you the answers, but now you've learned something. Well done!

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

Re: Old style Cessna 172 oil pressure won´t run

#17 Post by Keith Baxter »

Ralph wrote: Thu Dec 03, 2020 3:13 pm I totally agree. We can give you the answers, but now you've learned something. Well done!
Ralph,

You need to fix that in the that instrument. Both xplane default Cessna's point to that dataref.

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
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Old style Cessna 172 oil pressure won´t run

#18 Post by Ralph »

Will check it out, thanks!

Post Reply