Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello

I want to connect rotaries (eg 4 position-rotary for engine start 1 + 2 or 8 position-rotary for AUX BAT) [no encoder] in my homecockpit with the FSUIPC 3.81 737-OHD macros to FS9 . If I have understood correctly, this goes only by definition of conditions. What is the syntax for conditional statements in connection with macros? An example of such a statement would certainly be helpful (I am newbie in FSUIPC programming). Thank you very much.

Wolfgang

Posted

What is the syntax for conditional statements in connection with macros?

The only difference between using a Keypress, Control or Macro in any [buttons] parameter line is the letter at the start: K, C or M. So, any examples of conditionals to do what you want can use macros simply by substituting one form for another.

Keypresses are K,

Controls are C,

Macros are M:

(remembering Macro files have numbers assigned in the FSUIPC INI file [MacroFiles] section).

Regards

Pete

Posted

Hello Pete,

thank you for the quick response. I tried the first example on page 25 of the document FSUIPC for Advance Users. After starting the FS9 shows the rotation of the Rotary no reaction. In the FSUIPC.ini appears the following error message:

FSUIPC.ini

...

286=MP(+5,12)5,13,1:26,0 << ERROR 19! Line ignored >>

287=MP(+5,13)5,14,1:26,0 << ERROR 19! Line ignored >>

288=MP(+5,14)5,15,1:26,0 << ERROR 19! Line ignored >>

289=MP(+5,15)5,16,1:26,0 << ERROR 19! Line ignored >>

290=MP(+5,16)5,17,1:26,0 << ERROR 19! Line ignored >>

291=MU(+5,12)5,13,1:27,0 << ERROR 19! Line ignored >>

292=MU(+5,13)5,14,1:27,0 << ERROR 19! Line ignored >>

293=MU(+5,14)5,15,1:27,0 << ERROR 19! Line ignored >>

294=MU(+5,15)5,16,1:27,0 << ERROR 19! Line ignored >>

295=MU(+5,16)5,17,1:27,0 << ERROR 19! Line ignored >>

...

737 OHD.MCRO

...

26=AUXBAT>=R16:1

27=AUXBAT<=R16:2

...

[MacroFiles]

1=737 OHD

2=APchart

5=Radio

4=XPReal

What am I doing wrong? Many thanks for help.

Wolfgang

Posted
Hello Pete,

thank you for the quick response. I tried the first example on page 25 of the document FSUIPC for Advance Users. After starting the FS9 shows the rotation of the Rotary no reaction. In the FSUIPC.ini appears the following error message ...

I repeat, the entry for the result you want must start with K for a Keypress, C for a Control, or M for a Macro. You have none of these at all!!!

What is the "M" at the beginning for? For a Compound condition that should be "C"! Why ignore all the examples? No where will you see "M" being allowed to define a compound conditional!

Please do refer to the definition of the format. This is directly from the Documentation:

The basic format of each entry in the Buttons section is as follows:

For keypresses:

= ,,K,

For controls:

= ,,C,

For macros (see the separate section on macros):

= ,,M:,

See the letters denoting the action needed now?

The format of a Macro reference is M: as I already said. You have things like "1:26" with no letter to say what it is.

Pete

Posted

Hello,

thank you for the detailed answer. I have the C (= condition) with the C (= control) confused, sorry. After correcting the instructions come in the FSUIPC.ini no error messages. Unfortunately, the rotaries work still not accurate. Since I am use the joystick cards by Leo Bodnar (www.leobodnar.com), I will convert the rotaries - according to the instructions from Jan (www.737ng.co.uk) - to encoders with which I have not had any problems.

Wolfgang

  • 8 years later...
Posted

Hi Pete, here is another question.

My task is to write a macro for one button to open all doors.
I read your examples in advanced programmer doc, but I failed.
Here is what I wrote first to test my sequence for the button "PT,0" :

; if both doors are open
    16=W3367=3 PT,0,K69,9               -{Key press: shft+E}-
    17=W3367=3 PT,0,K49,8               -{Key press: 1}-
    18=W3367=3 PT,0,K50,8               -{Key press: 2}-
; if both doors are closed
    19=W3367=0  PT,0,K69,9              -{Key press: shft+E}-
    20=W3367=0  PT,0,K49,8              -{Key press: 1}-
    21=W3367=0  PT,0,K50,8              -{Key press: 2}-
; if door 1 is open, then close
    22=W3367=1  PT,0,K69,9              -{Key press: shft+E}-
    23=W3367=1  PT,0,K49,8              -{Key press: 1}-
; if door 2 is open, then close
    24=W3367=2  PT,0,K69,9              -{Key press: shft+E}-
    25=W3367=2  PT,0,K50,8              -{Key press: 2}-

This sequence works fine.

Now I tried to create a macro control like this:

Entry in INI file:
    [MacroFiles]
               1=AAOpen
               2=AAPM GC

Macro file AAOpen:
     [Macros]
        1=OpenAlDoors
        1.1 W3367=0  PT,0,K69,9              -{Key press: shft+E}-
        1.2 W3367=0  PT,0,K49,8              -{Key press: 1}-
        1.3 W3367=0  PT,0,K50,8              -{Key press: 2}-

Macro file AAPM GC (just for test purpose)
     [Macros]
         1=MAP Capt=C2999,1
         2=NAV Capt=C2999,2
         3=VOR Capt=C2999,3

The macro from your example "PM GC" is displayed correctly in the FS controls list.
My macro doesn't appear.

What is wrong? Please help.

Thanks, Alhard

 

Posted
2 hours ago, alihor said:

My task is to write a macro for one button to open all doors.

Why use a macro when you can do it by just button assignment, as it looks like you've done.

Also, you don't need to use keypresses or offset conditions as you've done.  Just use Offset byte set, clear or toggle, directly to the 3367 offset! You can combine bits too. For all doors open just assign to 

Offset byte set, offset x3367, parameter 15 (15 = all 4 possible doors)

For all doors close use

Offset byte clear, offset x3367, parameter 15

For individual doors just use parameters 1, 2, 4, 8 as appropriate.

2 hours ago, alihor said:

 [Macros]
        1=OpenAlDoors
        1.1 W3367=0  PT,0,K69,9              -{Key press: shft+E}-
        1.2 W3367=0  PT,0,K49,8              -{Key press: 1}-
        1.3 W3367=0  PT,0,K50,8              -{Key press: 2}-

...

What is wrong?

What happened to the = after the 1.1 etc reference? Please see page 40 in the Advanced Users guide.

Of course you only need a one line macro if you write to the offset by Offset byte set.

Pete

 

Posted

Thanks Pete for your quick response.

I am sorry, but there are still problems:
My FSX SP2, FSUIPC Version is 4.964, Aircraft: default C172,

Here are my remarks:
1. There is no "Offset byte clear" , I used for now "Offset byte clrbits"

2. With these button assignments, only left door opens and closes.

6=PT,6,Cx09003367,x0F     -{offset byte clrbits, offset 3367}-
7=PT,0,Cx01003367,x0F     -{offset byte set, offset 3367}-

When I open right door with shE-2 sequence and try to close with button PT,6 then left door opens.

3. I now assigned to button PT,13 the reedited macro "AAOpen"

        [Macros]
          1=OpenAlDoors
             1.1=K69,9              -{Key press: shft+E}-
             1.2=K49,8              -{Key press: 1}-
             1.3=K50,8              -{Key press: 2}-

see here:   8=PT,13,CM1:1,0     -{Macro AAOpen: OpenAlDoors: OpenAlDoors: OpenAlDoors}-

Now both doors toggle open/close. That's fine.

But I need to use the condition "W3367=0" as written before.
How can I include this condition in my macro?

4. With your proposal to use the button offset assignment I have to assign at least two buttons for opening and close. As I understood, is the door opening procedure a "toggle" function, so I can easily use the macro assignment. I need the conditional macro, cause some people can open one door only by the "Sh-E" sequence and then I want to close the doors conditionally.

I hope I made my problem clear.

regards
  Alhard

 

Posted
4 hours ago, alihor said:

My FSX SP2, FSUIPC Version is 4.964, Aircraft: default C172,

The currently supported version is 4.965.  Please update.

4 hours ago, alihor said:

1. There is no "Offset byte clear" , I used for now "Offset byte clrbits"

Yes., of course. SetBits, Togglebits and Clrbits. Sorry. An error made due to pressure of work at the time.

4 hours ago, alihor said:

2. With these button assignments, only left door opens and closes.

6=PT,6,Cx09003367,x0F     -{offset byte clrbits, offset 3367}-
7=PT,0,Cx01003367,x0F     -{offset byte set, offset 3367}-

The door assignments in the Aircraft.CFG are incorrect then. The value x0F (or decimal 15) operates all possible doors, like sending 1,2,3,4  for the Ctr E keypress. I use combinations of these regularly, but I take care to check their definitions in each Aircraft.CFG I use.

And it is odd that you are using "clrbits" for the one, but not its converse "setbits" for the other. If you want to use Set all the time, the parameter would be x0F (or actually x03 as we discover later) for opening and x00 for closing. But if you only want to deal with the first 2 defined doors, SetBits and ClrBits with parameter 3 (or x03) is better.

4 hours ago, alihor said:

Now both doors toggle open/close. That's fine.

For only two defined doors use x03 or just 3 in the original assignments above, then. Evidently doors 3 and 4 muck things up in your particular aircraft. In mine door 1 is for left passenger doors, for and aft, 2 handles the supply doors, on the right, fore and aft, and 3 and 4 are the cargo doors, fore and after respectively. These assignments can be changed in the aircraft.cfg file.

4 hours ago, alihor said:

But I need to use the condition "W3367=0" as written before.
How can I include this condition in my macro?

Well, why did you remove it? Your previous version was okay but for some reason you replaced the = after the .1. etc with spaces!

4 hours ago, alihor said:

4. With your proposal to use the button offset assignment I have to assign at least two buttons for opening and close.

If you want to open or close them separately, of course. How else?

4 hours ago, alihor said:

As I understood, is the door opening procedure a "toggle" function, so I can easily use the macro assignment.

The offset is a direct "open" OR "close" depending whether you set the bits or clear the bits. Toggle will open closed ones and close open ones. If you don't know how they were, surely that isn't want you want? Why else are you testing for W3367=0 above? FSUIPC is effectively doing that for you with the SetBits, except it doesn't really need to. it knows which doors are open or closed.

4 hours ago, alihor said:

I need the conditional macro, cause some people can open one door only by the "Sh-E" sequence and then I want to close the doors conditionally.

You misunderstand and therefore miss the point. Writing directly to the offset to open or close doors removes your need entirely to have a condition. They are entirely unconditional. Setting opens the door, clearing closes it, no matter how it started.

Pete

 

Posted

Hi Pete, I am sorry , I am stuck
My specs: WIN7-64PRO,  FSX SP2, FSUIPC Version is 4.965, Aircraft: default C172,


I wrote this macro again following your advise

[Macros]
1=OpenAllDoors
1.1=W3367=0 PT,0,K69,9              -{Key press: shft+E}-
1.2=W3367=0 PT,0,K49,8              -{Key press: 1}-
1.3=W3367=0 PT,0,K50,8              -{Key press: 2}-

But the macro doesn't appear.


Then I tried with button "offset byte togglebits"
The assignment whether 15 or 3, still opens left door only (and toggles)   :

My C172 aircraft.cfg shows this

   [exits]
     number_of_exits=2
     exit.0=0.4 // (0=Main 1=Passenger)
     exit.1=0.4 // (0=Main 1=Passenger)

26=PT,6,Cx0D003367,x0F     -{offset byte togglebits, offset 3367}-
or
26=PT,6,Cx0D003367,x03     -{offset byte togglebits, offset 3367}-


I tried it also with the FSX default DeHavilland_Beaver_DHC2
with 4 doors
   [exits]
      number_of_exits = 3
      exit.0 = 0.4 // (0=Main 1=Cargo 2=Emergency)
      exit.1 = 0.4 // (0=Main 1=Cargo 2=Emergency)
      exit.2 = 0.4 // (0=Main 1=Cargo 2=Emergency)

with the button offset 3367, just one (left) door opens.

Sorry and regards
Alhard

 

Posted
1 hour ago, alihor said:

[Macros]
1=OpenAllDoors
1.1=W3367=0 PT,0,K69,9              -{Key press: shft+E}-
1.2=W3367=0 PT,0,K49,8              -{Key press: 1}-
1.3=W3367=0 PT,0,K50,8              -{Key press: 2}-

The "PT,0" part says "when button 0 on T is pressed ... ". But this is a macro which you are presumably going to assign to a button! Which button?

Sorry, maybe I didn't see all this before. I've been so busy sorting other problems out. Now FSUIPC 4.966 is released with those problems resolved i can think more clearly about other things.

The condition on acting on a button press or release is part of the testing of the button to see whether to ignore that press or release or not. As such it is part of the assignment only, not of the macro.  The macro execution is a possible outcome of the button press if the condition allows it.

To put it another way, since all button conditions are based on whether the button is acted on or not, there are no condition facilities in macros. The macro is merely an action which can be assigned to a button or keypress. There is nothing else but that. It is executed or it isn't.

You can have a macro like

[Macros]
1=OpenAllDoors
1.1=K69,9              -{Key press: shft+E}-
1.2=K49,8              -{Key press: 1}-
1.3=K50,8              -{Key press: 2}-

and button assignments to execute this macro based on conditions.

But this brings me back to the question I asked a while back: "Why use a macro when you can do it by just button assignment, as it looks like you've done?" There is really no advantage in using a macro for this unless it is to build a set of macros to help others make assignments to functions on specific aircraft..

I do realise that it would theoretically possible to have button conditions in macros, though it could get very complicated if there were conditions on the button as well as on the macro actions. However, some time ago I decided that I ought to avoid adding more and more complex programming facilities to the separate features of FSUIPC because this tends to break more things than it adds as well as making it more and more obscure for users. I decided to add the Lua interpreter to it instead, a well-respected scripting language designed specifically for enabling simple and more complex parameters to be used in driving programs -- as well as actually adding facilities, which was an unexpected bonus of this approach.

If you want to do interesting things I recommend you look at using Lua instead of Macros. I probably wouldn't have added the macro facility at all if I'd discovered Lua first! The syntax and rules for macros (and button programming) are arcane and very restrictive and error prone by comparison.

On the other matter:

1 hour ago, alihor said:

Then I tried with button "offset byte togglebits"
The assignment whether 15 or 3, still opens left door only (and toggles)   :

I had this assignment:

2=P174,6,Cx0D003367,x03     -{offset byte togglebits, offset 3367}-

(Joystick 174 is a Goflight RP48)

Both doors were definitely opening or closing on the default FSX Beaver. With Event and Button logging enabled in FSUIPC I get this shown in the LOG:

   659510 Button changed: bRef=0, Joy=174, Btn=6, Pressed
   659510 [Buttons] 2=P174,6,Cx0D003367,x03
   659510 IPC Offsets Control: Ctrl=x0D00, Length=1, Offset=3367, Param=x3
   659510 JoystickValues PCnum=0, dwCount=1, data[2]={000000ae 00000040}
   659510 *** EVENT: Cntrl= 66389 (0x00010355), Param= 1 (0x00000001) TOGGLE_AIRCRAFT_EXIT
   659510 *** EVENT: Cntrl= 66389 (0x00010355), Param= 2 (0x00000002) TOGGLE_AIRCRAFT_EXIT
   659697 Button changed: bRef=0, Joy=174, Btn=6, Released
   659697 JoystickValues PCnum=0, dwCount=1, data[2]={000000ae 00000000}

You can see that all that changing bits in offset 3367 does is send the exact same FS control that shift E does. The parameters for that control select the door, so FSUIPC here sends the control twice, with parameters 1 then 2. You could actually program such parameters in FSUIPC for the control too, rather than use the Shift E keypress method, which is rather crude compared to sending the controls directly. To illustrate that here's what happens when I press Shit+E then 1 then 2:

  1657744 KEYDOWN: VK=16, Waiting=0, Repeat=N, Shifts=1
  1657744 .. Key not programmed -- passed on to FS
  1658212 KEYDOWN: VK=69, Waiting=0, Repeat=N, Shifts=1
  1658212 .. Key not programmed -- passed on to FS
  1658212 *** EVENT: Cntrl= 66389 (0x00010355), Param= 0 (0x00000000) TOGGLE_AIRCRAFT_EXIT
  1658290 KEYUP: VK=69, Waiting=0
  1658337 KEYUP: VK=16, Waiting=0
  1658696 KEYDOWN: VK=49, Waiting=0, Repeat=N, Shifts=0
  1658696 .. Key not programmed -- passed on to FS
  1658696 *** EVENT: Cntrl= 66389 (0x00010355), Param= 0 (0x00000000) TOGGLE_AIRCRAFT_EXIT
  1658712 *** EVENT: Cntrl= 65538 (0x00010002), Param= 0 (0x00000000) SELECT_1
  1658790 KEYUP: VK=49, Waiting=0
  1659055 KEYDOWN: VK=50, Waiting=0, Repeat=N, Shifts=0
  1659055 .. Key not programmed -- passed on to FS
  1659055 *** EVENT: Cntrl= 66389 (0x00010355), Param= 0 (0x00000000) TOGGLE_AIRCRAFT_EXIT
  1659055 *** EVENT: Cntrl= 65538 (0x00010002), Param= 0 (0x00000000) SELECT_1
  1659055 *** EVENT: Cntrl= 65539 (0x00010003), Param= 0 (0x00000000) SELECT_2
  1659195 KEYUP: VK=50, Waiting=0

You can see, by comparison with the direct use of the control actually named "Toggle aircraft exit" in FSUIPC assignments the FS process is a lot less clumsy.

BUT both methods work fine here, with all the aircraft I've tried. Something odd is going on with your system if the offset method doesn't work. Perhaps you should ebable the Button and Event logging so we can check.

BTW FSUIPC 4.966 is released and that is what I was using. Maybe youshould update first?

Pete

   

Posted

Hi Pete , thanks for your extensive explanations.

Regarding your activities, don't be forced by my questions to respond shortly and deeply, Just tell me, "I will respond later" . That would be fair.

I am retired and I have time.

So now I will use the Event logging for my investigations.

And yes, I also have some experience with LUA.

And yes, I will update.  :-)

regards

Alhard

PS: Do you know that Erlangen, where I live, is the twin city of Stoke-on-Trent

 

 

Posted
23 minutes ago, alihor said:

PS: Do you know that Erlangen, where I live, is the twin city of Stoke-on-Trent

I have seen that on the signs, yes.  I live just a couple of hundred metres outside Stoke-on-Trent, in a place called Biddulph, which is twinned with Fusignano in Italy, not far from Bologna.

Pete

 

Posted
1 hour ago, alihor said:

I enabled the logging and attached are my results.

Yes. Her. for clarity with all the "FALSE" conditions and spurious entries removed along with the unprogrammed "KEYUP"s, and with the active lines emboldened:

Case 1: Conditional Buttons, first click

   173255 Button changed: bRef=0, Joy=0 (T), Btn=0, Pressed
   173255 [Buttons] 16=W3367>3 PT,0,K69,9
   173255 .... Offset check: x3367/2 > 3? (7), Result = TRUE
   173255 SendKeyToFS(00040045=[shft+E], KEYDOWN) ctr=0
   173255 [Buttons] 17=W3367>3 PT,0,K49,8
   173255 .... Offset check: x3367/2 > 3? (7), Result = TRUE
   173255 SendKeyToFS(00000031=[1], KEYDOWN) ctr=4
   173255 [Buttons] 18=W3367>3 PT,0,K50,8
   173255 .... Offset check: x3367/2 > 3? (7), Result = TRUE
   173255 Sending WM_KEYDOWN, Key=16 (Shift) (Scan code 42), Ctr=5
   173255 SendKeyToFS(00000032=[2], KEYDOWN) ctr=6
   173255 [Buttons] 27=W3367>3 PT,0,K51,8
   173255 .... Offset check: x3367/2 > 3? (7), Result = TRUE
   173255 SendKeyToFS(00000033=[3], KEYDOWN) ctr=7
   173255 KEYDOWN: VK=16, Waiting=0, Repeat=N, Shifts=1
   173270 Sending WM_KEYDOWN, Key=69 (Scan code 18), Ctr=8
   173270 KEYDOWN: VK=69, Waiting=0, Repeat=N, Shifts=1
   173270 *** EVENT: Cntrl= 66389 (0x00010355), Param= 0 (0x00000000) TOGGLE_AIRCRAFT_EXIT
   173317 Sending WM_KEYDOWN, Key=49 (Scan code 2), Ctr=5
   173317 KEYDOWN: VK=49, Waiting=0, Repeat=N, Shifts=0
   173317 *** EVENT: Cntrl= 66389 (0x00010355), Param= 0 (0x00000000) TOGGLE_AIRCRAFT_EXIT
   173317 *** EVENT: Cntrl= 65538 (0x00010002), Param= 0 (0x00000000) SELECT_1

   173348 Sending WM_KEYDOWN, Key=50 (Scan code 3), Ctr=3
   173348 KEYDOWN: VK=50, Waiting=0, Repeat=N, Shifts=0
   173348 *** EVENT: Cntrl= 66389 (0x00010355), Param= 0 (0x00000000) TOGGLE_AIRCRAFT_EXIT
   173348 *** EVENT: Cntrl= 65538 (0x00010002), Param= 0 (0x00000000) SELECT_1
   173348 *** EVENT: Cntrl= 65539 (0x00010003), Param= 0 (0x00000000) SELECT_2

   173380 Sending WM_KEYDOWN, Key=51 (Scan code 4), Ctr=2
   173395 KEYDOWN: VK=51, Waiting=0, Repeat=N, Shifts=0
   173395 *** EVENT: Cntrl= 66389 (0x00010355), Param= 0 (0x00000000) TOGGLE_AIRCRAFT_EXIT
   173395 *** EVENT: Cntrl= 65538 (0x00010002), Param= 0 (0x00000000) SELECT_1
   173395 *** EVENT: Cntrl= 65539 (0x00010003), Param= 0 (0x00000000) SELECT_2
   173395 *** EVENT: Cntrl= 65540 (0x00010004), Param= 0 (0x00000000) SELECT_3
   173458 [Buttons] 16=W3367>3 PT,0,K69,9
   173458 .... Offset check: x3367/2 > 3? (7), Result = TRUE
   173458 [Buttons] 17=W3367>3 PT,0,K49,8
   173458 .... Offset check: x3367/2 > 3? (7), Result = TRUE
   173458 [Buttons] 18=W3367>3 PT,0,K50,8
   173458 .... Offset check: x3367/2 > 3? (7), Result = TRUE
   173458 .... Offset check: x3367/2 > 3? (7), Result = TRUE
   174425 Monitor IPC:3367 (S8) = 6
   174425 SimRead: 3367="EXIT OPEN:0"
            FLT32: 99.2338027954
   174425 Monitor IPC:3367 (S8) = 4
   174425 SimRead: 3367="EXIT OPEN:1"
            FLT32: 99.2338027954
   174425 Monitor IPC:3367 (S8) = 0
   174425 SimRead: 3367="EXIT OPEN:2"
            FLT32: 99.2338027954

All 4 doors opens

Two of the doors are operated together as 0 1 or 2 above?

You see from the above how cumbersome using keypresses are, when you could use the FS controls directly. Why on Earth use the keypresses?

Case 3: Button with TOGGLE_AIRCRAFT_EXIT   assigned

   772642 Button changed: bRef=0, Joy=0 (T), Btn=6, Pressed
   772642 [Buttons] 26=PT,6,C66389,0
   772642 FS Control Sent: Ctrl=66389, Param=0
   772642 *** EVENT: Cntrl= 66389 (0x00010355), Param= 0 (0x00000000) TOGGLE_AIRCRAFT_EXIT
  772907 Button changed: bRef=0, Joy=0 (T), Btn=6, Released
   773671 Monitor IPC:3367 (S8) = 1
   773671 SimRead: 3367="EXIT OPEN:0"
            FLT32: 0.666926264763

One door (left front) opens

Yes, of course! You were simply supposed to replace the KeyPresses with the Toggle Aircraft Exit control, conditional on 3367 still, with parameters 1 then 2 then 3 -- instead of Shift+E then '1' then '2' then '3'!

Sending just one Toggle aircraft Exit with parameter 0 or 1 is the same as just doing "Shift E" once,, on its own!!!

Case 4: Button with "offset togglebits"   assigned

  1093146 Button changed: bRef=0, Joy=0 (T), Btn=6, Pressed
  1093146 [Buttons] 26=PT,6,Cx0D003367,x0F
  1093146 IPC Offsets Control: Ctrl=x0D00, Length=1, Offset=3367, Param=xF
  1093146 *** EVENT: Cntrl= 66389 (0x00010355), Param= 1 (0x00000001) TOGGLE_AIRCRAFT_EXIT
  1093146 *** EVENT: Cntrl= 66389 (0x00010355), Param= 2 (0x00000002) TOGGLE_AIRCRAFT_EXIT
  1093146 *** EVENT: Cntrl= 66389 (0x00010355), Param= 3 (0x00000003) TOGGLE_AIRCRAFT_EXIT
  1093146 *** EVENT: Cntrl= 66389 (0x00010355), Param= 4 (0x00000004) TOGGLE_AIRCRAFT_EXIT

  1093146 Monitor IPC:3367 (S8) = 15
  1093302 Button changed: bRef=0, Joy=0 (T), Btn=6, Released

One door (left front) opens

Hmm. It's doing exactly the right thing though. Something is wrong or different with your setup someehow, then, which I don't understand. Because EXACTLY the same sequences here opens or closes the doors correctly, including on the default Beaver.

Try with a parameter 7. You seem to only have 3 door controls even with 4 doors, according to the earlier logs.

Also see what assigning a button or key to Toggle Aircraft Exit with parameters 1, 2, 3, or 4 does, respectively. Because those controls seem broken. I'm wondering if that was working correctly in FSX/SP2. It always worked in FSX/ACC, and now in FSX-SE and P3D.

Pete

 

Posted

Hi Pete, I tested now the behaviour on a very new Windows an FSX installation. I call it my "virgin" test PC.

Attached is the complete log file.

The behaviour of the Beaver is always still opening/closing ONE door only.

22 hours ago, Pete Dowson said:

You see from the above how cumbersome using keypresses are, when you could use the FS controls directly. Why on Earth use the keypresses?

My objectiv  is,  to assign ONE button (individual selected) to toggle Opening/Closing ALL (!) doors.

In my Simmer group, which I moderate, all want to have this feature.

As FS Control " TOGGLE_AIRCRAFT_EXIT " is unfortunately not working on my 2 systems, I was looking for an alternative = KEYPRESSES.

 

PLease check the log file and please tell me also why always the  ATC_MENU_CLOSE function is operated.

I checked all button assignments in FSX and in FSUIPC, but I can't find any assignment to this function.

Thanks and best regards

Alhard

 

Problem Open Doors FSUIPC4.log

Posted

Pete, I missed to send the aircraft.cfg of the Beaver in my virgin PC:

[exits]
number_of_exits=3
exit.0=0.4 // (0=Main 1=Cargo 2=Emergency)
exit.1=0.4 // (0=Main 1=Cargo 2=Emergency)
exit.2=0.4 // (0=Main 1=Cargo 2=Emergency)


Alhard

Posted

In addition

22 hours ago, Pete Dowson said:

Also see what assigning a button or key to Toggle Aircraft Exit with parameters 1, 2, 3, or 4 does, respectively. Because those controls seem broken. I'm wondering if that was working correctly in FSX/SP2. It always worked in FSX/ACC, and now in FSX-SE and P3D.

I will test it now on P3D. OK?

Alhard

Posted

Result with P3D.

I tested with default Maule. All Door toggle works fine with offset togglebits 15.

It doesn't work with TOGGLE_AIRCRAFT_EXIT  parameter 15 for all doors, but single doors with par 1,2,3.

So for P3D, which is for now not my favourite Sim,  I have a solution .

regards

Alhard

Posted
1 hour ago, alihor said:

My objectiv  is,  to assign ONE button (individual selected) to toggle Opening/Closing ALL (!) doors.

But whether you send a series of keypresses which, as you can see from the logs, just make the Sim look up the keypresses (every time) in the assignments list THEN send the same controls you could have sent in the first place. or send those controls directly yourself, is surely no difference regarding one button or not.

52 minutes ago, alihor said:

I tested with default Maule. All Door toggle works fine with offset togglebits 15.

Okay. So we confirmed it is a problem with FSX/SP2, as it has always worked fine here with both FSX/ACC and FSX-SE -- as well as P3D.

53 minutes ago, alihor said:

It doesn't work with TOGGLE_AIRCRAFT_EXIT  parameter 15 for all doors, but single doors with par 1,2,3.

Yes. I never said you could use a mask for the command -- that's only for the FS offset. The Toggle Aircraft Exit takes the door number as parameter.

1 hour ago, alihor said:

Pete, I missed to send the aircraft.cfg of the Beaver in my virgin PC:

[exits]
number_of_exits=3
exit.0=0.4 // (0=Main 1=Cargo 2=Emergency)
exit.1=0.4 // (0=Main 1=Cargo 2=Emergency)
exit.2=0.4 // (0=Main 1=Cargo 2=Emergency)

Same here.

1 hour ago, alihor said:

As FS Control " TOGGLE_AIRCRAFT_EXIT " is unfortunately not working on my 2 systems, I was looking for an alternative = KEYPRESSES

BUT BUT BUT, as you can see from the logging for the keypresses with Events, those simply send the Toggle Aircraft Exit which you say works. The command equivalents ot your "Shift+E, 1, 2, 3" keypresses are "Toggle Aircraft Exit, Select 1, Select 2, Select 3" -- as you can see if you go back and look at the log!

1 hour ago, alihor said:

PLease check the log file and please tell me also why always the  ATC_MENU_CLOSE function is operated.

I checked all button assignments in FSX and in FSUIPC, but I can't find any assignment to this function.

Yes, I get the same here. I cut them out of my log posts here. I don't know there they are coming from. Unless they are being Sent (rather than "Posted") I don't have much chance of finding out either. I just ignore them. I might change FSUIPC so it won't log them, ut folks might sometimes need to see such a log.

Anything else now outstanding? With so many posts from you I might have missed something.

Pete

 

Posted

Great thanks, Pete. There is nothing outstanding for now.

I really appreciated, as ever,  your strong and prompt help and I learned a lot.

All the Best!

regards

  Alhard,   using FSUIPC since more than 10 years.

 

 

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
×
×
  • 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.