C310 Redux Prop Feather

N4GIX
Posts: 1023
Joined: Mon Sep 06, 2010 3:47 pm
Re: C310 Redux Prop Feather

Post by N4GIX » Tue Oct 02, 2018 4:15 pm

Chris.Laughery wrote:
Tue Oct 02, 2018 7:17 am
IIRC, the LVAR only does the animation, nothing more. Maybe Milviz can chime in on this?

I recommend you add the following lines to your feather code:

Code: Select all

--Set the prop pitch
ipc.control(65923, -1)

--Toggle Feather Switch
ipc.control(66537)
You are quite correct Chris. The L:var only sets the animation, a companion Event controls the pitch. The embedded XML script for the left prop in the .mdl file is:

Code: Select all

      <CallbackCode>
        (M:Event) 'RightSingle' scmp 0 == if{
        (L:Prop1_Feathered,bool) !
        if{ 1 (>L:Prop1_Feathered,bool) -1 (>K:PROP_PITCH1_SET) (>K:TOGGLE_FEATHER_SWITCH_1) }
        els{ 0 (>L:Prop1_Feathered,bool) 0 (>K:PROP_PITCH1_SET) (>K:TOGGLE_FEATHER_SWITCH_1) }
        }
      </CallbackCode>

Millzy
Posts: 24
Joined: Mon Feb 23, 2015 12:57 am
Re: C310 Redux Prop Feather

Post by Millzy » Wed Oct 03, 2018 7:21 am

Hello Chris and Bill,

Below is the latest and hopefully final Lua Code to get the C-310R Props to Feather and Unfeather. After a flight test comparing both the original and new code it appears that the engines now feather and unfeather with the new code.

Code: Select all

--------------------------------------------
-- Variables
--------------------------------------------

Prop1_Feathered = "L:Prop1_Feathered"
Prop2_Feathered = "L:Prop2_Feathered"

--------------------------------------------
-- Scripts
--------------------------------------------

-- Propellor 1 Feathered
if ipcPARAM == 1 then
	-- Trigger the Feathered Pitch Animation
	     ipc.writeLvar(Prop1_Feathered, 1)
	-- Set the Prop Pitch
	     ipc.control(65923, -1)
	-- Toggle the Feather Switch
	     ipc.control(66537)
end
-- Propellor 2 Feathered
if ipcPARAM == 2 then
	-- Trigger the Feathered Pitch Animation
	     ipc.writeLvar(Prop2_Feathered, 1)
	-- Set the Prop Pitch
	     ipc.control(65924, -1)
	-- Toggle the Feather Switch
	     ipc.control(66538)
end
--------------------------------------------
Thanks again for all the help. Please let me know if you see any other flaws in this code?



Cheers,

John

=JLP=
Posts: 15
Joined: Tue Mar 06, 2018 9:56 pm
Re: C310 Redux Prop Feather

Post by =JLP= » Sat Nov 10, 2018 12:02 pm

Millzy wrote:
Tue Oct 02, 2018 7:11 am
Hello Chris,

I have now built a working Lua file with "Notepad ++" for feathering the props the C-310R with a Saitek Throttle Quadrant. Below is a copy of the code that I wrote for the Lua that others may feel free to use.

--------------------------------------------
-- Milviz Cessna 310 Redux
--------------------------------------------
--------------------------------------------
-- Version
--------------------------------------------
-- 1.01
--------------------------------------------
-- Parameters by Number
--------------------------------------------
--1 Prop 1 Feather
--2 Prop 2 Feather
--------------------------------------------
-- Variables
--------------------------------------------
Prop1_Feathered = "L:Prop1_Feathered"
Prop2_Feathered = "L:Prop2_Feathered"
--------------------------------------------
-- Scripts
--------------------------------------------
-- Propellor 1 Feathered
if ipcPARAM == 1 then
ipc.writeLvar(Prop1_Feathered, 1)
end
-- Propellor 2 Feathered
if ipcPARAM == 2 then
ipc.writeLvar(Prop2_Feathered, 1)
end

Again thank you for the help on getting this figured out.



Cheers,

John
John

I'm trying to use LUA throught FSUIPC with your "code"....No luck...
I loaded the LUA in FSUIPC...but nothing happens when throttleling....
I'm using saitech throttle quandrant // C310R.
Is there something I should look in the fsuipc config ?...Do I have to disable the quadrant in P3D and let FSUIPC take care of the quadrants..?
Any help would be appreciated

Regards.

Jean-luc

Millzy
Posts: 24
Joined: Mon Feb 23, 2015 12:57 am
Re: C310 Redux Prop Feather

Post by Millzy » Thu Dec 06, 2018 6:35 am

John

I'm trying to use LUA throught FSUIPC with your "code"....No luck...
I loaded the LUA in FSUIPC...but nothing happens when throttleling....
I'm using saitech throttle quandrant // C310R.
Is there something I should look in the fsuipc config ?...Do I have to disable the quadrant in P3D and let FSUIPC take care of the quadrants..?
Any help would be appreciated

Hello Jean-Luc,

I personally let FSUIPC control the Quadrants to ensure that there is no interference between P3D and FSUIPC joystick settings. When entering the LAU in FSUIPC did you set the options to 1 and 2 respectively?

Currently after updating to P3Dv4.4 the C-310 causes a CTD that I'm currently trying to remedy. Once I can get the plane loaded I'll better be able to help.


Cheers,

John


Locked

Return to “310 Redux Support Forum”