Jump to content
The simFlight Network Forums
Sign in to follow this  
Gypsy Baron

4749d problem

Recommended Posts

Hello Pete,

FSUIPC4 version 4749d appears to have broken a function that previously

has been working. I noticed this evening that 4 of my switches on my Saitek

throttle quadrants were no longer functioning as programmed but I could confirm

that the switches were working. The switches in question use the "Offset Signed

Byte Increment" and "Decrement" functions:

x3100zzzz Offset SByte Increment (offset = zzzz), hexadecimal *

x4100zzzz Offset SByte Decrement (offset = zzzz), hexadecimal *

When the user-defined locations 0x66C3 and 0x66C4 are modified by the above

controls they invoke a Lua script to handle the functions needed...writing

to an L:Var and opening a Lua display indicating the value read from the

user-defined locations.

Additionally these same 4 switches invoke the FSX "PANEL_ID_OPEN" command

which is the 2D panel for the C=1 autopilot.

Thus, pressing one switch I should see the panel pop up, a message appear

and either the turn or elevator knobs on the C-1 rotate.

With 4749d only the "PANEL_ID_OPEN" is functioning. I reverted back to

version 4747 and everything worked again. Reinstalled 4749d and the

functions fail to work.

I also have a pair of switches, non-aircraft specific, that use the

"OFFSET BYTE CYCLIC INCREMENT" and "DECREMENT" functions and these are

still working.

161=PA,4,Cx510066C0,x00080001 ;//INCREMENT 0X66C0 VALUE BY 1, MAX 8 THEN 0, CYLCLIC

162=PA,5,Cx610066C0,x00080001 ;//DECREMENT 0X66C0 VALUE BY 1, MIN 0 THEN 8, CYLCLIC

Here is a section of my FSUIPC4.ini file for the aircraft in question that

contains the non-operational functions:

!8=//SET 8 C1 CONTROLS

130=B66C0=7 PD,14,CM6:73,1 ;//C1 MASTER ON

131=B66C0=7 PD,15,CM6:73,0 ;//C1 MASTER OFF

132=B66C0=7 PD,15,CM6:74,0 ;//AIL OFF

133=B66C0=7 PD,15,CM6:75,0 ;//RUD OFF

134=B66C0=7 PD,15,CM6:76,0 ;//ELE OFF

135=B66C0=7 PD,16,CM6:74,1 ;//AIL ON

136=B66C0=7 PD,17,CM6:75,1 ;//RUD ON

137=B66C0=7 PD,18,CM6:76,1 ;//ELE ON

138=B66C0=7 PD,19,CM6:77,1 ;//TELLTALE LIGHTS TOGGLE

139=B66C0=7 RA,0,Cx310066C3,x00640001 ;//ELEVATOR UP <-------- Not working in 4749d

140=B66C0=7 RA,1,Cx410066C3,xFF9C0001 ;//ELEVATOR DOWN <-------- Not working in 4749d

141=B66C0=7 RA,2,Cx310066C4,x00640001 ;//TURN RIGHT <-------- Not working in 4749d

142=B66C0=7 RA,3,Cx410066C4,xFF9C0001 ;//TURN LEFT <-------- Not working in 4749d

143=B66C0=7 PD,15,C66507,54 ;//INSURE C1 PANEL IS OPEN WHEN CONTROLS ARE OPERATED

144=B66C0=7 PA,0,C66507,54 <------- Same switch press works

145=B66C0=7 PA,1,C66507,54 <------- Same switch press works

146=B66C0=7 PA,2,C66507,54 <------- Same switch press works

147=B66C0=7 PA,3,C66507,54 <------- Same switch press works

148=B66C0=7 PD,19,C66507,54

149=B66C0=7 PD,14,CM6:88,0 ;//C1 MASTER SELECT

Looking at location 0x66C3 and 0x66C4 with the logging function I see them

both "stuck" at the maximum value, 100.

=============== My Lua Script for the functions ============================

function C1_ELEVATOR(offs, val4)

ELEVATOR_in = ipc.readSB(0x66C3)

ipc.writeLvar("L:c1CenterElevatorKnob", ELEVATOR_in)

ipc.display("Elevator Knob = "..ELEVATOR_in, 1)

end

function C1_TURN(offs, val6)

TURN_in = ipc.readSB(0x66C4)

ipc.writeLvar("L:c1TurnControlKnob", TURN_in)

ipc.display("Turn Knob = "..TURN_in, 1)

end

event.offset(0x66C3,"SB","C1_ELEVATOR")

event.offset(0x66C4,"SB","C1_TURN")

======================================================

Another group of switch assignments using the functions below work as planned.

x1100zzzz Offset UByte Increment (offset = zzzz), hexadecimal *

x2100zzzz Offset UByte Decrement (offset = zzzz), hexadecimal *

50=B66C0=2 RD,14,Cx11000892,x00030001 ;//MAG1 INC

51=B66C0=2 RD,15,Cx21000892,x00000001 ;//MAG1 DEC

52=B66C0=2 RD,16,Cx1100092A,x00030001 ;//MAG2 INC

53=B66C0=2 RD,17,Cx2100092A,x00000001 ;//MAG2 DEC

54=B66C0=2 RD,18,Cx110009C2,x00030001 ;//MAG3 INC

55=B66C0=2 RD,19,Cx210009C2,x00000001 ;//MAG3 DEC

56=B66C0=2 RA,0,Cx11000A5A,x00030001 ;//MAG4 INC

57=B66C0=2 RA,1,Cx21000A5A,x00000001 ;//MAG4 DEC

It appears that it is the SIGNED BYTE functions that are not working.

I substituted the unsigned byte functions in lines 139 to 142 above and the

controls began to work again, but only in the positive range. This indicates

that the Lua script is intact and the only failure point is the incremen/decrement

function using sign bytes.

Paul

Share this post


Link to post
Share on other sites

FSUIPC4 version 4749d appears to have broken a function that previously

has been working. I noticed this evening that 4 of my switches on my Saitek

throttle quadrants were no longer functioning as programmed but I could confirm

that the switches were working. The switches in question use the "Offset Signed

Byte Increment" and "Decrement" functions:

As listed in the 4.749d changes document, I did find a bug in the signed and cyclic decrement controls, see here:

23. The Offset signed decrement and Offset cyclic decrement had minor bugs affecting how they operated. These are now fixed.

It appears that it is the SIGNED BYTE functions that are not working.

I'll re-check them here, but I've not touched the INCREMENT controls, only the DECREMENT ones.

[LATER]

Of these:

139=B66C0=7 RA,0,Cx310066C3,x00640001 ;//ELEVATOR UP <-------- Not working in 4749d

140=B66C0=7 RA,1,Cx410066C3,xFF9C0001 ;//ELEVATOR DOWN <-------- Not working in 4749d

141=B66C0=7 RA,2,Cx310066C4,x00640001 ;//TURN RIGHT <-------- Not working in 4749d

142=B66C0=7 RA,3,Cx410066C4,xFF9C0001 ;//TURN LEFT <-------- Not working in 4749d

I get both increments working fine. It only appears to be the decrements I messed up. Sorry. I had an incorrect - sign in one line which made the decrement immediately jump to -limit. The increment would then not work, of course, because the value was at the limit already.

Fixed in 4.749e, up within the next half hour.

Regards

Pete

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.