Jump to content
Sign in to follow this  
keithb77

Add-ons at risk

Recommended Posts

28 minutes ago, BusheFlyer said:

I have it working also, rather than disabling the transponder I edited the gtx327.xml file in the btsRV7.CAB file and it works. The edited bit is the part that is causing the crash with the transponder:


<!-- numeric button actions -->
(@xpdrMode) @mdTest &gt;
if{
	<!--
	@zero (@xpdrKey) == (@K0) ! and if{ @keyTest(0.000001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) @keyAction }
	@one (@xpdrKey) == (@K1) ! and if{ @keyTest(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) @keyAction }
	@two (@xpdrKey) == (@K2) ! and if{ @keyTest(2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) @keyAction }
	@three (@xpdrKey) == (@K3) ! and if{ @keyTest(3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) @keyAction }
	@four (@xpdrKey) == (@K4) ! and if{ @keyTest(4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) @keyAction }
	@five (@xpdrKey) == (@K5) ! and if{ @keyTest(5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) @keyAction }
	@six (@xpdrKey) == (@K6) ! and if{ @keyTest(6, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1) @keyAction }
	@seven (@xpdrKey) == (@K7) ! and if{ @keyTest(7, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1) @keyAction }
	@eight (@xpdrKey) == (@K8) ! and if{ @keyTest(8, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1) @keyAction }
	@nine (@xpdrKey) == (@K9) ! and if{ @keyTest(9, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1) @keyAction } 
	-->
}

This case in the Update function refers to a keyTest macro in the same file. Any call to that leads to the crash. As to why it is crashing.. I have no idea.. the abomination that is LUA makes it very hard to follow or debug.

Anyway, commenting that out makes the original transponder work except for the manual entry buttons, all other functions work perfectly.

That is progress!

There has got to be a way to program around that...

I've taken the opposite approach... started with the A36 transponder and added a section that recognizes the button pushes in the RV7 VC.


Bert

Share this post


Link to post
1 minute ago, Bert Pieke said:

That is progress!

There has got to be a way to program around that...

I've taken the opposite approach... started with the A36 transponder and added a section that recognizes the button pushes in the RV7 VC.

Yeah I feel there is.. essentially it's one function that is causing the issues with the transponder. Problem I have is LUA to me is so damn awkward to actually read. Perhaps a LUA expert might be able to spot what this issue is with this macro:

<!-- Procedure: Numerics, compare button press against screen address (@1;number, @2-@11;screenAddress) -->
<Macro Name="keyTest">
	@2 if{ 0 (@xpdrCrsr) == if{ @1 (&gt;@adrs0) 1 (&gt;@xpdrCrsrIncr) (@xSquawk) (&gt;@xPrvSquawk) } }
	@3 if{ 1 (@xpdrCrsr) == if{ @1 (&gt;@adrs1) 1 (&gt;@xpdrCrsrIncr) } }
	@4 if{ 2 (@xpdrCrsr) == if{ @1 (&gt;@adrs2) 1 (&gt;@xpdrCrsrIncr) } }
	@5 if{ 3 (@xpdrCrsr) == if{ @1 (&gt;@adrs3) 1 (&gt;@xpdrCrsrIncr) @clrTimerSet } }
	@6 if{ 4 (@xpdrCrsr) == if{ @1 (&gt;@adrs4) 2 (&gt;@xpdrCrsrIncr) } }
	@7 if{ 5 (@xpdrCrsr) == if{ @1 (&gt;@adrs5) 2 (&gt;@xpdrCrsrIncr) } }
	@8 if{ 6 (@xpdrCrsr) == if{ @1 (&gt;@adrs6) 2 (&gt;@xpdrCrsrIncr) } }
	@9 if{ 7 (@xpdrCrsr) == if{ @1 (&gt;@adrs7) 2 (&gt;@xpdrCrsrIncr) } }
	@10 if{ 8 (@xpdrCrsr) == if{ @1 (&gt;@adrs8) 2 (&gt;@xpdrCrsrIncr) } }
	@11 if{ 9 (@xpdrCrsr) == if{ @1 (&gt;@adrs9) 2 (&gt;@xpdrCrsrIncr) } }
</Macro>

I am currently looking for another example of translating the transponder numerical keys to the display so I can perhaps make some sense of it.

Share this post


Link to post
1 hour ago, Ron Attwood said:

Coincidentally, I loaded the RV into V4 20 minutes ago, disabled the 327, assigned controls via FSUIPC5 and flew....a fuselage! The prop lever wouldn't behave so I took my own advice and unloaded it. It will be missed. In future I will not try to second guess/try to be a smart arse, with V4 again. I'll wait, like the patient man I am. :dry:

I've got wings.  I haven't "fixed" mine and they are right there on the fuselage where they should be.

 

 

 

Share this post


Link to post
1 hour ago, BusheFlyer said:

 Problem I have is LUA to me is so damn awkward to actually read. Perhaps a LUA expert might be able to spot what this issue is with this macro

I had just been thinking about trying to decipher the transponder code myself, hoping it might be a simple and obvious problem.  I don't know a thing about LUA, though, unfortunately.

Share this post


Link to post
3 hours ago, BusheFlyer said:

<!-- Procedure: Numerics, compare button press against screen address (@1;number, @2-@11;screenAddress) -->
<Macro Name="keyTest">
	@2 if{ 0 (@xpdrCrsr) == if{ @1 (&gt;@adrs0) 1 (&gt;@xpdrCrsrIncr) (@xSquawk) (&gt;@xPrvSquawk) } }
	@3 if{ 1 (@xpdrCrsr) == if{ @1 (&gt;@adrs1) 1 (&gt;@xpdrCrsrIncr) } }
	@4 if{ 2 (@xpdrCrsr) == if{ @1 (&gt;@adrs2) 1 (&gt;@xpdrCrsrIncr) } }
	@5 if{ 3 (@xpdrCrsr) == if{ @1 (&gt;@adrs3) 1 (&gt;@xpdrCrsrIncr) @clrTimerSet } }
	@6 if{ 4 (@xpdrCrsr) == if{ @1 (&gt;@adrs4) 2 (&gt;@xpdrCrsrIncr) } }
	@7 if{ 5 (@xpdrCrsr) == if{ @1 (&gt;@adrs5) 2 (&gt;@xpdrCrsrIncr) } }
	@8 if{ 6 (@xpdrCrsr) == if{ @1 (&gt;@adrs6) 2 (&gt;@xpdrCrsrIncr) } }
	@9 if{ 7 (@xpdrCrsr) == if{ @1 (&gt;@adrs7) 2 (&gt;@xpdrCrsrIncr) } }
	@10 if{ 8 (@xpdrCrsr) == if{ @1 (&gt;@adrs8) 2 (&gt;@xpdrCrsrIncr) } }
	@11 if{ 9 (@xpdrCrsr) == if{ @1 (&gt;@adrs9) 2 (&gt;@xpdrCrsrIncr) } }
</Macro>

I am currently looking for another example of translating the transponder numerical keys to the display so I can perhaps make some sense of it.

Here is something that works:

<!-- numeric button actions -->
    (@xpdrMode) @mdTest &gt;
        if{    
 
    @zero (@xpdrKey) == (@K0) ! and if{ @keyTest(0) @keyAction }
    @one (@xpdrKey) == (@K1) ! and if{ @keyTest(1) @keyAction }
    @two (@xpdrKey) == (@K2) ! and if{ @keyTest(2) @keyAction }
    @three (@xpdrKey) == (@K3) ! and if{ @keyTest(3) @keyAction }
    @four (@xpdrKey) == (@K4) ! and if{ @keyTest(4) @keyAction }
    @five (@xpdrKey) == (@K5) ! and if{ @keyTest(5) @keyAction }
    @six (@xpdrKey) == (@K6) ! and if{ @keyTest(6) @keyAction }
    @seven (@xpdrKey) == (@K7) ! and if{ @keyTest(7) @keyAction }

<!--
    @eight (@xpdrKey) == (@K8) ! and if{ @keyTest(8, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1) @keyAction }
    @nine (@xpdrKey) == (@K9) ! and if{ @keyTest(9, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1) @keyAction }

-->


          } }


<Macro Name="keyTest">

    0 (@xpdrCrsr) == if{ @1 (&gt;@adrs0) 1 (&gt;@xpdrCrsrIncr) (@xSquawk) (&gt;@xPrvSquawk) }
    1 (@xpdrCrsr) == if{ @1 (&gt;@adrs1) 1 (&gt;@xpdrCrsrIncr) }
    2 (@xpdrCrsr) == if{ @1 (&gt;@adrs2) 1 (&gt;@xpdrCrsrIncr) }
    3 (@xpdrCrsr) == if{ @1 (&gt;@adrs3) 1 (&gt;@xpdrCrsrIncr) @clrTimerSet }

    4 (@xpdrCrsr) == if{ @1 (&gt;@adrs4) 2 (&gt;@xpdrCrsrIncr) }
    5 (@xpdrCrsr) == if{ @1 (&gt;@adrs5) 2 (&gt;@xpdrCrsrIncr) }
    6 (@xpdrCrsr) == if{ @1 (&gt;@adrs6) 2 (&gt;@xpdrCrsrIncr) }
    7 (@xpdrCrsr) == if{ @1 (&gt;@adrs7) 2 (&gt;@xpdrCrsrIncr) }
    8 (@xpdrCrsr) == if{ @1 (&gt;@adrs8) 2 (&gt;@xpdrCrsrIncr) }
    9 (@xpdrCrsr) == if{ @1 (&gt;@adrs9) 2 (&gt;@xpdrCrsrIncr) }

</Macro>

 


Bert

Share this post


Link to post
2 hours ago, Bert Pieke said:

Here is something that works:

<!-- numeric button actions -->
    (@xpdrMode) @mdTest &gt;
        if{    
 
    @zero (@xpdrKey) == (@K0) ! and if{ @keyTest(0) @keyAction }
    @one (@xpdrKey) == (@K1) ! and if{ @keyTest(1) @keyAction }
    @two (@xpdrKey) == (@K2) ! and if{ @keyTest(2) @keyAction }
    @three (@xpdrKey) == (@K3) ! and if{ @keyTest(3) @keyAction }
    @four (@xpdrKey) == (@K4) ! and if{ @keyTest(4) @keyAction }
    @five (@xpdrKey) == (@K5) ! and if{ @keyTest(5) @keyAction }
    @six (@xpdrKey) == (@K6) ! and if{ @keyTest(6) @keyAction }
    @seven (@xpdrKey) == (@K7) ! and if{ @keyTest(7) @keyAction }

<!--
    @eight (@xpdrKey) == (@K8) ! and if{ @keyTest(8, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1) @keyAction }
    @nine (@xpdrKey) == (@K9) ! and if{ @keyTest(9, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1) @keyAction }

-->


          } }


<Macro Name="keyTest">

    0 (@xpdrCrsr) == if{ @1 (&gt;@adrs0) 1 (&gt;@xpdrCrsrIncr) (@xSquawk) (&gt;@xPrvSquawk) }
    1 (@xpdrCrsr) == if{ @1 (&gt;@adrs1) 1 (&gt;@xpdrCrsrIncr) }
    2 (@xpdrCrsr) == if{ @1 (&gt;@adrs2) 1 (&gt;@xpdrCrsrIncr) }
    3 (@xpdrCrsr) == if{ @1 (&gt;@adrs3) 1 (&gt;@xpdrCrsrIncr) @clrTimerSet }

    4 (@xpdrCrsr) == if{ @1 (&gt;@adrs4) 2 (&gt;@xpdrCrsrIncr) }
    5 (@xpdrCrsr) == if{ @1 (&gt;@adrs5) 2 (&gt;@xpdrCrsrIncr) }
    6 (@xpdrCrsr) == if{ @1 (&gt;@adrs6) 2 (&gt;@xpdrCrsrIncr) }
    7 (@xpdrCrsr) == if{ @1 (&gt;@adrs7) 2 (&gt;@xpdrCrsrIncr) }
    8 (@xpdrCrsr) == if{ @1 (&gt;@adrs8) 2 (&gt;@xpdrCrsrIncr) }
    9 (@xpdrCrsr) == if{ @1 (&gt;@adrs9) 2 (&gt;@xpdrCrsrIncr) }

</Macro>

 

Superb! Nice work Bert! Glad you made sense of it. I just tested and working here also. Fantastic, it's nice that this fine aeroplane can live another life in P3D 4.0.

Share this post


Link to post

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
Sign in to follow this  
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...