Jump to content
The simFlight Network Forums

Button Programming


Recommended Posts

In my .ini per A.U.G.,

[General]

..

[buttons]

..

51=R0,27,Cx32000BC0,x3FFF0040

52=CP(+j0,b7)9,C66059,0

Button 7 has to be on (held down) for button 9 to turn on the landing lights.

That is what I am trying to accomplish.

No luck so far. Not sure what I am doing wrong. I have tried to test this a number of times. Re-Loaded FS each time. Experimented with different buttons. Ensured they were the correct buttons via FSUIPC interface.

Link to comment
Share on other sites

52=CP(+j0,b7)9,C66059,0

Button 7 has to be on (held down) for button 9 to turn on the landing lights.

That is what I am trying to accomplish.

No luck so far. Not sure what I am doing wrong.

Apparently you are not really looking at the examples in the user guide. The syntax is wrong. You are including "j" and "b" which are only placeholders for "joystick" and "button" numbers in the format definition -- you don't see them in the examples, do you? And you also omitted the joystick number for the active button: The line would be ignored, or even deleted.

In other words:

52=CP(+j0,b7)9,C66059,0

should be

52=CP(+0,7)0,9,C66059,0

I think you'll be okay if you read what is written a little more carefully. Computers are pretty stupid and don't understand what might be obvious to you. You need to give them very precise instructions.

Remember FSUIPC doesn't see the status of a button in a compound command, only the change of a button. You have to combine it with a status of a button by using a flag.

No, that's not actually true for the conditions, only for the active button. The flags are certainly relevant when a button has a momentary effect and you don't want to keep it pressed. You can effectively turn it into a latching toggle switch using flags. But the conditional use of as button directly can be used if the user is keeping the button pressed at the same time as using the other button, or if it is a latching switch, a toggle. The conditions are all actually checked when the state of the active button (0,9 in this case) changes.

Regards

Pete

Link to comment
Share on other sites

Apparently you are not really looking at the examples in the user guide. The syntax is wrong. You are including "j" and "b" which are only placeholders for "joystick" and "button" numbers in the format definition -- you don't see them in the examples, do you? And you also omitted the joystick number for the active button: The line would be ignored, or even deleted.

In other words:

52=CP(+j0,b7)9,C66059,0

should be

52=CP(+0,7)0,9,C66059,0

I think you'll be okay if you read what is written a little more carefully. Computers are pretty stupid and don't understand what might be obvious to you. You need to give them very precise instructions.

No, that's not actually true for the conditions, only for the active button. The flags are certainly relevant when a button has a momentary effect and you don't want to keep it pressed. You can effectively turn it into a latching toggle switch using flags. But the conditional use of as button directly can be used if the user is keeping the button pressed at the same time as using the other button, or if it is a latching switch, a toggle. The conditions are all actually checked when the state of the active button (0,9 in this case) changes.

Regards

Pete

Great News!

It worked. So now that I get this to work, I do not understand the next message.

FSUIPC-1.png

Sorry in advance for not understanding why I cant assign this button to something else. I was looking for a way to make a work around "mode switch" with this section of the AUG.

Am I missunderstanding the whole concept of conditional switches?

Link to comment
Share on other sites

It worked. So now that I get this to work, I do not understand the next message.

What is not to understand? The message says you cannot change that button programming in the dialogue because it is a compound assignment. Once you start editing buttons in the INI file, those same buttons (for the same profile or aircraft-specific set) can only be programmed in the INI file. The dialogue would become far too complex if I tried to provide all of the button programming capabilities there!

Sorry in advance for not understanding why I cant assign this button to something else.

If you've changed your mind and want to use the button differently, you have to delete the compound assignment in the INI file. I'm at a loss to understand why you went to all this trouble just to undo it!

Am I missunderstanding the whole concept of conditional switches?

I don't know because i cannot figure out what you are thinking.

Pete

Link to comment
Share on other sites

I was looking for a way to make a work around "mode switch" with this section of the AUG.

I cannot figure out why you missed that line. That is why I took the trouble to understand this. Sorry. I'll ask for help somewhere else.

This is probably why not too many people venture over here. Sorry to waste your time.

Link to comment
Share on other sites

I was looking for a way to make a work around "mode switch" with this section of the AUG.

I cannot figure out why you missed that line.

I didn't miss the line. But what is the question? You've already seen how to make conditionals work. What is your new problem? That's all I asked. The only question I saw was about why you got a message saying you couldn't use the dialogue to edit the button programming you already had. And i explained the reason for that, which was actually stated in any case in the message you were asking about!

And as it said, you have to edit the INI file, which is what you've surely been doing in any case. It isn't "new territory" for you, which is why I don't understand where you are coming from -- especially going to all the trouble of including a picture of my own program with a message I know full well!

This is probably why not too many people venture over here. Sorry to waste your time.

Not wasted! I don't understand why you are saying this? Where are you coming from with this attitude? I've been trying to help you, for goodness sake! :-(

I do my best to help everyone with a question. Just browse the posts. I even add facilities into my programs at short notice to help folks. i was simply being honest with you when I said i didn;t understand. Why not accept that for what was meant, and actually said if you reread it?

And when you say "not too many people venture over here.", how do you work that out? This forum has the most topics posted of all Simflight forums, and the third most messages posted, after only the Screenshots Forum and the Emma Field one. You should check your facts.

Pete

Link to comment
Share on other sites

I didn't miss the line. But what is the question? You've already seen how to make conditionals work. What is your new problem? That's all I asked. The only question I saw was about why you got a message saying you couldn't use the dialogue to edit the button programming you already had. And i explained the reason for that, which was actually stated in any case in the message you were asking about!

And as it said, you have to edit the INI file, which is what you've surely been doing in any case. It isn't "new territory" for you, which is why I don't understand where you are coming from -- especially going to all the trouble of including a picture of my own program with a message I know full well!

Not wasted! I don't understand why you are saying this? Where are you coming from with this attitude? I've been trying to help you, for goodness sake! :-(

I do my best to help everyone with a question. Just browse the posts. I even add facilities into my programs at short notice to help folks. i was simply being honest with you when I said i didn;t understand. Why not accept that for what was meant, and actually said if you reread it?

And when you say "not too many people venture over here.", how do you work that out? This forum has the most topics posted of all Simflight forums, and the third most messages posted, after only the Screenshots Forum and the Emma Field one. You should check your facts.

Pete

Fair enough. BIG missunderstanding then. It seemed as if you were expecting me to know all the ins and outs of this, when you responsd with comments like, "What is not to understand."

In my mind, there was ( a lot ) not to understand as this material is new for me. On my end that came across as rude.

A person can take that as something other than what you meant which is what I did.

Now that you have clarified that with your post I better understand how you are trying to help.

I appologize for the above, I just thought I was being flamed in the forum and I took offense, whilst all I was trying to do was learn. ;-)

Pete, my approach to learning new material is to first, understand things an item at a time, one by one, line by line. I do not learn well reading pages of new material and then go make it all work somehow. I do not have that kind of photographic memory.

When I made the syntax error in my .ini line above, I read no further in the text simply because the next paragraph or two deals with button flags. I was simply not ready to go on to that.

Your examples for the compound switches 1=CP(+1,1)0,3, ... 2=CP(+1,2)0,3, ... 3=CP(+1,3)0,3, ...even further down in the material did not register to me as the (exact) syntax of the compound switch. That registered to me as syntax for something to do with button flags or something. I am simply explaining how I got lost in your examples and material.

If I may, a suggestion would be to give a working example of a compound switch (exactly after) the N=CP(+j2,b2)j,b... like you gave me with [52=CP(+0,7)0,9,C66059,0] above. First that would have made things clear. Second, it would have been handy to merely cut and paste [52=CP(+0,7)0,9,C66059,0] into my .ini file.

All I would have had to do was plug in the joystick button numbers, restart FS and viala it would have worked.

Once I got the syntax from you, plugged the line into my .ini file, started FS, and saw the compound switch work, the syntax and the commands became more clear.

Even though this is the A.U.G. it would be nice to see more clarity sections like the "Appendix: Axis assignment in FSUIPC4 – 10x2 Commandments" (User Guide). I found that a really nice tool. Nice and simple and very clear to follow.

Link to comment
Share on other sites

Fair enough. BIG missunderstanding then. It seemed as if you were expecting me to know all the ins and outs of this, when you responsd with comments like, "What is not to understand."

The "what is not to understand" was in reference to your saying that you didn't understand the message shown on the screen, which simply pointed out that because you now were using a compound button setting, you couldn't change things in the dialogue but had to edit the INI fie instead.

Since you'd already been editing the INI file, I couldn't understand why this came as a surprise to you, nor why the plain English message wasn't clear. You still haven't said why this was so?

In my mind, there was ( a lot ) not to understand as this material is new for me. On my end that came across as rude.

Why didn't you take my answer as the answer to your question? I fail to see how you can see anything "rude" in any of it. What was there not to understand in the message you asked about? Why go to all the trouble of capturing and posting a picture of something you were asking about if, in fact, you weren't really asking about it at all?

Anyway, apology accepted.

I note your objections to my reference guide, but I should state that I am simply NOT a good teacher. There is really little point in me writing loads of guff which would only confuse folks more. The current reference material has been accepted and used by many many users now for 12 years, with small additions now and then, but no tutorials by myself at all. The Appendix you like was a user contribution, and there are others around which may help you, as well as examples of all sorts. Browse the User Contributions sub-forum, for instance. And do ask specific questions. I'll answer them as well as I can -- which is what I thought I did when you asked about the displayed message (and look what arose from that, :-( something I still fail to understand!).

Regards

Pete

Link to comment
Share on other sites

The "what is not to understand" was in reference to your saying that you didn't understand the message shown on the screen, which simply pointed out that because you now were using a compound button setting, you couldn't change things in the dialogue but had to edit the INI fie instead.

Since you'd already been editing the INI file, I couldn't understand why this came as a surprise to you, nor why the plain English message wasn't clear. You still haven't said why this was so?

Why didn't you take my answer as the answer to your question? I fail to see how you can see anything "rude" in any of it. What was there not to understand in the message you asked about? Why go to all the trouble of capturing and posting a picture of something you were asking about if, in fact, you weren't really asking about it at all?

Anyway, apology accepted.

I note your objections to my reference guide, but I should state that I am simply NOT a good teacher. There is really little point in me writing loads of guff which would only confuse folks more.

Pete

Hoping to shed some more light on this. From my part of the world, "What is not to understand" comes across like (How can you not understand this easy material). Where by now I see you are saying it more as (What is it that you are not understanding about this... Shortened now to "What is not to understand." I get what you are now asking me or how you are asking me. In other words the tone got lost over the Atlantic somwhere I think Pete. ;-)

Also on my end in return, I was doing a poor job of asking you WHY I got that message. I see where it could be interpreted as me asking what does this message mean. Yes you and I agree it means what it says. I should have asked why did I GET this message. Now I have a better understanding of it. It is because we are programming the buttons via the .ini file. and that method (locks you out) of that particuar button via the interface because it is now conditional on another button's condition.. If I understand that correctly.

Link to comment
Share on other sites

I see where it could be interpreted as me asking what does this message mean. Yes you and I agree it means what it says.

That's where the "what is not to understand" comes in and what it referred to. I saw no other question, and you made a big meal of that one question by even including a picture of it! :-)

I should have asked why did I GET this message. Now I have a better understanding of it. It is because we are programming the buttons via the .ini file. and that method (locks you out) of that particuar button via the interface because it is now conditional on another button's condition.. If I understand that correctly.

Yes, as I explained -- it would make the dialogue far too complicated for 99.9% of what it is used for to try to include conditionals there. To edit buttons for multiple uses and for conditionals I decided to refer folks to the INI file. I thought I said this in my first answer?

Regards

Pete

Link to comment
Share on other sites

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.