Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I have a quick question.  When editing the INI file to add a button dependency such as n=CP(+j2,b2)j,b does this need to be inserted in front of the relative button entries or at the end of the INI file?
Thanks

Alan

  • 2 weeks later...
Posted

I have a quick question.  When editing the INI file to add a button dependency such as n=CP(+j2,b2)j,b does this need to be inserted in front of the relative button entries or at the end of the INI file?

Thanks

Alan

 

If it is in the correct [buttons ...] section, it doesn't really matter where it goes (note, NOT "at the end of the INI file", unless the correct Buttons section is at the end of the file!). However, the entry number, your 'n', defines the ORDER in which the lines are processed. So bear that in mind -- lines referring to the same action button (j,b in your example) may need to execute is a specific order for your logic to work correctly.

 

Pete

Posted

Okay so if the 'n' defines the order of execution then the 'n' in n=CP(+j2,b2)j,b does need to have a lower number than that of the 'n' for the actual button entries so it is executed first.

So for the dependency to work the button section would need to look like this example?

 

45=cp(+j68,b2)j72,b4

46=68,2

47=72,4

 

Thanks

Alan

 

PS Yes I did mean to say at the end of the Buttons section of the INI file not the end of the INI file -- sorry.  

Posted

45=cp(+j68,b2)j72,b4

46=68,2

47=72,4

 

In "45=cp(+j68,b2)j72,b4" you don't want the b's and j's. They were supposed to be REPLACED by the real button and joystick number, not be kept as well! They are there simply to show you where to put them!

 

As they stand there, none of those lines do anything in any case as they have nothing assigned.

 

But if they did have something assigned, then if 68,2 were held down then anything assigned to 72,4 would action in line 45 before anything assigned in line 47, but both would action. If you are trying to make it one or the other then you need the reverse condition on line 47.

 

Line 46 would action when you pressed 68,2.

 

All the line numbers dictate is the ORDER in which things occur. Only the conditions dictate whether they should! Multiple lines for the same button will all be executed, not just the first one.

 

Okay so if the 'n' defines the order of execution then the 'n' in n=CP(+j2,b2)j,b does need to have a lower number than that of the 'n' for the actual button entries so it is executed first.

 

There is no difference between "actual button entry" and "button entry".  All entries in the Buttons section are button entries and all are operational. The conditional ones are just conditional. not "unactual"!

 

Pete

Posted

I'm sorry to be pedantic but I want to make sure I'm doing this correctly.  

 

Button 68,2 is programmed as the APU master

Button 72,4 is programmed as the APU Start button.

Pressing button 72,4 is not supposed to do anything unless button 68,2 has first been pressed and once button 68,2 has been pressed it will allow the function of button 72,4 to take place once it is pressed.  In the real world button 68,2 closes a relay to provide power to button 72,4.

 

So my button conditional was supposed to be (sorry about leaving in the J and the P):

n=CP(+68,2)72,4

 

So with this 

45=cp(+68,2)72,4

46=68,2

47=72,4

 

Am I correct in saying that:

Line 45 states that the button assignment on line 47 will not take place (if that button is pressed) unless button 68,2 has been pressed and that if button 68,2 has been pressed then the button assignment on line 47 will take place when it is pressed?

Thanks for your help on this.

Alan

Posted

I'm sorry to be pedantic but I want to make sure I'm doing this correctly.  

 

Be more pedantic please. You seem to post partial lines, with no assignments, so I can't see what's intended. It's as if you thought the condition goes on one line and the button assignment on another. That is not so.

 

Button 68,2 is programmed as the APU master

Button 72,4 is programmed as the APU Start button.

Pressing button 72,4 is not supposed to do anything unless button 68,2 has first been pressed and once button 68,2 has been pressed it will allow the function of button 72,4 to take place once it is pressed.  In the real world button 68,2 closes a relay to provide power to button 72,4.

 

The condition you are using would need 68,2 to be held pressed whilst you then press 72,4. You describe what you want differently. Usually such conditions are using switches or selectors which effectively stay pressed.

 

So with this 

45=cp(+68,2)72,4

46=68,2

47=72,4

 

You still have no actual assignments in these lines so they do nothing.

 

If they did have assignments, then what you show goes against what you just said, that 72,4 should do nothing unless 68,2 is pressed, yet you have a line 47 that will always do somethinmg because it has no condition to stop it. What is that line for?

 

If the only purpose of 68,2 is to enable 72,4, what is line 46 for?

 

I did go through all this in my last message but you do not appear to have read it at all. :sad:

 

Am I correct in saying that:

Line 45 states that the button assignment on line 47 will not take place (if that button is pressed) unless button 68,2 has been pressed

 

Not "has been pressed" but "still is pressed". Then that is true.

 

 and that if button 68,2 has been pressed then the button assignment on line 47 will take place when it is pressed?

 

Line 47 has no condition, therefore it will always happen if 72,4 is pressed.

 

I get the feeling you are simply not really reading what I am writing. Each assignment line is a complete thing in itself. There is no relationship between the lines whatsoever. The only thing the numbering does is force the order in which the lines are processed. That will only be important when the action of one line changes something a later line uses, or when one button is intended to make several things happen in a sequence.

 

Pete

Posted

Pete

Sorry I should have mentioned that I was not using actual button information from the INI file  -- just examples -- that's why there are no assignments.  

I guess I should have written the example as:

 

45=CP(+J68,B2)J72,B4

46=J68,B2

47=J72,B4

 

I just wanted to get the logic correct.   I was trying to clarify where the button conditional line should be located (as the actual button line entries are done by FSUIPC).  I also should have mentioned that the buttons I am referring to are actually button operated switches and are latching such that they hold there position (DOWN/ON) until they are pressed again (UP/OFF).

Thanks

Alan

Posted

I guess I should have written the example as:

 

45=CP(+J68,B2)J72,B4

46=J68,B2

47=J72,B4

 

 

Er, why have you put J's and B's in, again?

 

And still you don't have any actual assignments in any of the lines, so none of them do anything at all! 

 

You seem to be going backwards not forwards. Please review what I have been telling you in the last two replies. I simply cannot find any other ways of saying the same things! In particular, what on Earth is the point of your lines 46 and 47. What do you think they will do?

 

I just wanted to get the logic correct.   I was trying to clarify where the button conditional line should be located (as the actual button line entries are done by FSUIPC).

 

This is where you are making your fundamental error!  I told you before, and you ignored it, that there is no difference between an "actual" entry and any other! You keep ignoring everything I tell you!

 

The conditional line is the ONLY line. You simply take the FSUIPC-generated line (if that's how you make it) and insert the condition. Every line in the Buttons section is an assignment. You do NOT have separate condition lines!!! Please please please read what I have been saying for the last hours! I feel I am bashing my head against a brick wall! :-(

 

I'm off-line now for some time. Maybe someone else can write words you can really read and understand. I'm running out of ways I'm afraid.

 

Pete

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.