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
Old style Cessna 172 oil pressure won´t run
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Old style Cessna 172 oil pressure won´t run
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
Re: Old style Cessna 172 oil pressure won´t run
Compare these two and you'll hopefully understand what I mean with a missing name:
Especially look at p3d_oil_vars and what the X-Plane subscribe has. If you don't see it then just let me know
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]",
Re: Old style Cessna 172 oil pressure won´t run
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 wrote: ↑Thu Dec 03, 2020 1:37 pmRalph 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.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: Old style Cessna 172 oil pressure won´t run
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
Thank you Ralph too for your time and advises.
I`m happy again...hahaha
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Old style Cessna 172 oil pressure won´t run
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
Re: Old style Cessna 172 oil pressure won´t run
I totally agree. We can give you the answers, but now you've learned something. Well done!
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Old style Cessna 172 oil pressure won´t run
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
Re: Old style Cessna 172 oil pressure won´t run
Will check it out, thanks!