Jump to content

Stupid speed/autopilot question


PietVDW
 Share

Recommended Posts

Hello,

 

Are there in prepar3DV5 - Aerosoft pro A319 some controls to adjust the numbers in the speed/mach selector from the autopilot panel.

Now I do it with the mousewheel- maybe a control by keyboard is possible?

Link to comment
Share on other sites

Hi,

 

If you are aware, how to program in LUA provided by FSUIPC, you can decrease/increase in steps (-10,-1,+1,+10) the speed value by manipulating LVars:

 

-- Inc/Dec IAS
function IncDecIAS (pStep)

	local lIAS = 0
	
	if ipc.readLvar("L:AB_AP_SPDmode_set") == -1 then		-- only if pulled

		if ipc.readLvar("L:AB_AP_SPDMACH") == 0 then
			lIAS = math.floor(ipc.readLvar("L:AB_AP_SPEED_Select"))
		else
			lIAS = math.floor(ipc.readLvar("L:AB_AP_Mach_Select") * 100 + 0.5)
		end	
			
		lIAS = lIAS + pStep

		if ipc.readLvar("L:AB_AP_SPDMACH") == 0 then

			if lIAS < 100 then
				lIAS = 100
			end

			if lIAS >= 399 then
				lIAS = 399
			end
		
		else
		
			if lIAS < 10 then
				lIAS = 10
			end

			if lIAS >= 99 then
				lIAS = 99
			end

		end

		if ipc.readLvar("L:AB_AP_SPDMACH") == 0 then
			ipc.writeLvar("L:AB_AP_SPEED_Select", lIAS)
		else
			ipc.writeLvar("L:AB_AP_Mach_Select", lIAS / 100)
		end
		
	end

end

 

This function can be called via event.button handling. Please understand, that I am not able to provide support, and that you must be aware, what LUA and FSUIPC is about. But it shows you a way, how to handle this.

 

Rgds
Reinhard

 

 

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...