Issue difference on same gauge on the PC Server and the PI

Support for Air Player desktop.

Moderators: russ, Ralph

Post Reply
Message
Author
sikorsky77
Posts: 22
Joined: Sun Dec 06, 2015 1:09 pm

Issue difference on same gauge on the PC Server and the PI

#1 Post by sikorsky77 »

Hi all

first all my best wishes for this new year (mainly health and dreams for our sim passion and moreover cockpit building)

a small issue
i build a Fuel Gauge to be used on a PI
i create it in 800 x 480 size like my PI 5" monitor
it works well when a show it with AM on the PC Sim , but is uncompleted in the PI
i lost the text value "% Icing" and the related value
see the screenshot , on the left the PI , on the right the Gauge on the PC Sim

best regards
Thierry
Attachments
WP_20190105_16_17_09_Pro_LI.png

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

Re: Issue difference on same gauge on the PC Server and the PI

#2 Post by Ralph »

Maybe the text box is too small.

sikorsky77
Posts: 22
Joined: Sun Dec 06, 2015 1:09 pm

Re: Issue difference on same gauge on the PC Server and the PI

#3 Post by sikorsky77 »

Hi Ralf

this is the same gauge sized in a 800 x 480 to fit exactly the 5" PI Monitor
you can see that all the text over right the icing which are more longer over are full visible

maybe i badly create my code which saturate the memory of the Air Player

best regards
Thierry

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

Re: Issue difference on same gauge on the PC Server and the PI

#4 Post by Ralph »

You can post the instrument here if you want.

sikorsky77
Posts: 22
Joined: Sun Dec 06, 2015 1:09 pm

Re: Issue difference on same gauge on the PC Server and the PI

#5 Post by sikorsky77 »

HI Ralph

i sent you the zip file of the instrument that work on PC but is incomplete in the Air Player Raspberry on your mailbox because i d'on't arrive to post it here

Thanks for your help

PS : I believe your product the moment i discovered it , so please continue on this way , but take care of your pricing politic that can be kill the judicious choice and technical effort you make on

Best regards
Regards

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

Re: Issue difference on same gauge on the PC Server and the PI

#6 Post by Ralph »

I've sent you an email with our findings. It's a scripting issue. You will have to improve the initialization a bit. Sometimes the power variable is too late, then the elements are already 'initialized' with power being 'false'. This API function might be your solution: https://siminnovations.com/wiki/index.p ... t_callback

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

Re: Issue difference on same gauge on the PC Server and the PI

#7 Post by Corjan »

I recommend changing this:

Code: Select all

V_BATTERY_ON  = false
function F_ENG_FUEL_FLOW_PPH(V_ENG_FUEL_FLOW_PPH_1 , V_ENG_FUEL_FLOW_PPH_2)
	if V_BATTERY_ON  == true then
	       ...
	else
		...
	end
end

fsx_variable_subscribe("ENG FUEL FLOW PPH:1","Pounds per hour", 
                                   "ENG FUEL FLOW PPH:2", "Pounds per hour", F_ENG_FUEL_FLOW_PPH)
To:

Code: Select all

function F_ENG_FUEL_FLOW_PPH(V_ENG_FUEL_FLOW_PPH_1 , V_ENG_FUEL_FLOW_PPH_2, POWER)
	if POWER == true then
	       ...
	else
		...
	end
end

fsx_variable_subscribe("ENG FUEL FLOW PPH:1","Pounds per hour", 
                                   "ENG FUEL FLOW PPH:2", "Pounds per hour",
                                   "ELECTRICAL MASTER BATTERY" , "BOOL",  F_ENG_FUEL_FLOW_PPH)
This way the callback is changed when the fuel flow or the power has changed. In the old situation, it would only be called when fuel changes.
The same thing applied to almost every function within your instrument.

I don't think you will need the request_callback function in this case.


Please let me know if this makes sense,

Corjan

Post Reply