About simFlight - simflight.com - simflight.de - simflight.fr - simflight.nl - simflight.pt - simflight.es - simflight.it - simflight.jp - simrussia.com - simMarket
Double condition facility - rotary knob with push button
#1
Posted 11 February 2012 - 09:43 AM
My understanding of this capability is obvioiusly not correct as I would have had the following working.
Am trying to use rotary knob with push button to work the OBS dial in 2 modes on the Sandell 3308 in Dreemfleet A36.
The turn rate is too slow so I used
0=P1,0,K119,10
1=P1,0,K119,10
to accelerate the movement. This works fine.
However I would like the push button to revert the turn rate back to normal - for fine tuning the OBS selection.
This is the bit I am messing up.
Here is the full txt: push button 1,5
CRS dec CTR+F8 Button 1,0
CRS inc CTR+F3 Button 1,1
[Buttons.DreamFleet Beech Bonanza A36]
0=P1,0,K119,10
1=P1,0,K119,10
3=U1,0,K119,10
4=P1,1,K114,10
5=P1,1,K114,10
6=U1,1,K114,10
7=CP(F+1,5)(+1,1)1,0,C1005,256
8=CU(F+1,5)(+1,1)1,0,C1005,256
9=CP(F-1,5)(+1,1)1,0,C1005,256
10=CU(F-1,5)(+1,1)1,0,C1005,256
Any suggestions would be appreciated,
Thanks, David
#2
Posted 11 February 2012 - 10:19 AM
David225, on 11 February 2012 - 09:43 AM, said:
The turn rate is too slow so I used
0=P1,0,K119,10
1=P1,0,K119,10
Does the aircraft not accept normal FS controls for this? One thing making things slow, and even unreliable, is using keystrokes as you are doing. The FS controls are VOR1 OBI INC and DEC.
Quote
1=P1,0,K119,10
3=U1,0,K119,10
4=P1,1,K114,10
5=P1,1,K114,10
6=U1,1,K114,10
None of those lines have any conditions placed on them, so they will always be obeyed.
Quote
8=CU(F+1,5)(+1,1)1,0,C1005,256
9=CP(F-1,5)(+1,1)1,0,C1005,256
10=CU(F-1,5)(+1,1)1,0,C1005,256
All these lines do is mess about with flags and test them too. They don't actually interact with the simulator in any way.
I don't understand your thinking here. Each line is an instruction to FSUIPC to tell it what to do when the said buttons are pressed or released. Think about it like that. Each line is being executed as it is read according to the conditions imposed on that line. There are no conditions on the first ones, the only ones actually doing anything to FS. The ones with complex conditions (why so complex?) are doing nothing but messing with flags.
Do you want the button held pressed in to engage slow mode, or do you want the button to toggle between slow and fast whithout ever needing to hold it pressed in?
The former is easier -- yuo just make the button being pressed a condition. You only need a flag for the latter mode. But either way, the condition obviously has to be on the action you are trying to change.
Let me know which method and we can go further.
Regards
Pete
#3
Posted 12 February 2012 - 08:38 AM
The Sandel only works with the FS controls when in the VOR display mode - not in the GPS display mode (from what I can see anyway).
Sandel does have its own ini file for the key stroke commands for the GPS display mode. Only one rate for decrease/increase of course indicator.
With a push (and hold) button, these work just fine. But with a rotary encoder (with push button) I have a different ball game [using a 'Desktop Aviator' card].
Ignoring the VOR component of this device, I would like to use your latter option of toggling between fast and slow turn rate of the course indicator in GPS mode.
Using just the raw rotary encoder is way too slow for large CDI changes. Hence my attempt at flagsto swap between speeds with a momentary push of the button.
Have I confused you yet - I should have
Cheers, David
#4
Posted 12 February 2012 - 10:33 AM
David225, on 12 February 2012 - 08:38 AM, said:
Ah, you didn't mention that it was the GPS you were using.
Quote
Ah, so it detects the keystrokes itself. I see,
Quote
Yes, I understood that.
Quote
That's what i was asking about -- you want a button push to swap between two modes, you don't want to have to hold the button down for "precise" mode. Right? The latter would need no flags of course.
Quote
No, all I really needed to know in the first place was whether you wanted two distinct switchable modes, or only a special mode whilst the button was depressed. The latter is easier, involving no flags.
Did you understand the point I was making that, with no conditions on the active lines, there's nothing changing in your implementation? The flag messing is entirely seaprate and doing nothing. I hope that was clear?
Another question, the answer to which is not clear at all. In this:
0=P1,0,K119,10
1=P1,0,K119,10
3=U1,0,K119,10
4=P1,1,K114,10
5=P1,1,K114,10
6=U1,1,K114,10
You are potentially sending 3 keypresses for each rotary "tick", assuming that the rotary is doing a press then release on each turn. If it isn't, then it appears to give two keystrokes on one turn then only one on the next, alternately. Is this what you intended? Please clarify this else it will be difficult to know how to proceed.
In this:
7=CP(F+1,5)(+1,1)1,0,C1005,256
8=CU(F+1,5)(+1,1)1,0,C1005,256
9=CP(F-1,5)(+1,1)1,0,C1005,256
10=CU(F-1,5)(+1,1)1,0,C1005,256
I can't work out what you actually intended. You appear to be using one of the rotary directions (button 1,0) to actively toggle button flag (1,0) on and off or off and on, but you don't test that flag at all, anywhere. Button 1,0 being "pressed" will automatically toggle its flag on and off with alternate presses in any case, so the actual state, at any time, of that flag is really completely indeterminate.
BUT you make those actions, toggling that untested flag, depend on button 1,1 being pressed (i.e. the other direction of the dial), and also on the buttonflag for 1,5, which I assume is the mode button -- which isn't actuaslly assigned to do anything in any case, so its flag never changes.
If I could understand how you arrived at this mess I would be in a better position to clarify everything for you. At present I'm just bewildered by your attempts.
I'd rather explain how to do what you want to do rather than do it for you, as that is more constructive -- for you and any other readers. (That's why I run a Forum for support).
Regards
Pete
#5
Posted 12 February 2012 - 08:45 PM
Clarifying what I was trying to achieve here:
0=P1,0,K119,10
1=P1,0,K119,10
3=U1,0,K119,10
4=P1,1,K114,10
5=P1,1,K114,10
6=U1,1,K114,10
I wanted an accelerated rate on left turn of the rotary knob, hence:
0=P1,0,K119,10
1=P1,0,K119,10
and I wanted a normal rate on left turn of the rotary knob defining a different single key click Up for this, hence:
3=U1,0,K119,10
Lines 4,5 & 6 for turning the knob to the right in the same fashion (line 2 escaped into the ether somewhere)
The following was an attempt at replicating your manual for using those assignments in a toggle fashion.
7=CP(F+1,5)(+1,1)1,0,C1005,256
8=CU(F+1,5)(+1,1)1,0,C1005,256
9=CP(F-1,5)(+1,1)1,0,C1005,256
10=CU(F-1,5)(+1,1)1,0,C1005,256
I understand in principle what you have explained, but I admit I have to now go away and think on that and read your notes again.
Appreciate your time,
Sincerely, David
#6
Posted 13 February 2012 - 01:41 AM
David225, on 12 February 2012 - 08:45 PM, said:
0=P1,0,K119,10
1=P1,0,K119,10
and I wanted a normal rate on left turn of the rotary knob defining a different single key click Up for this, hence:
3=U1,0,K119,10
I assume you are really trying to say that you simply want two keypresses for fast, but only one for slow?
But the above gives two for a "Press" ("down" or "On"), P, and one for "Release" ("Up" or "Off") U. I don't know how your rotary works, but most give alternate presses and releases as you turn them. So how would that work with the above? You'd get alternately two clicks then one click wouldn't you? If not when do the press and release signals occur?
Quote
7=CP(F+1,5)(+1,1)1,0,C1005,256
8=CU(F+1,5)(+1,1)1,0,C1005,256
9=CP(F-1,5)(+1,1)1,0,C1005,256
10=CU(F-1,5)(+1,1)1,0,C1005,256
You've got me very worried now!
Onto the lines with the conditions. Let's just pull apart one of those lines to see what it means:
7=CP(F+1,5)(+1,1)1,0,C1005,256
CP says "this will be Confitional on a Press of a button"
Conditions are those parts in () parentheses:
(F+1,5) says "only obey this line if the Flag associated with button 1,5 is set"
(+1,1) says "only obey this line is button 1,1 is currently pressed"
1,0 is the button which when pressed actually makes FSUIPC look at this line: it is the activating or active button
C1005,256 says "when all these things are true, toggle the Flag associated with button 1,0" because 256 = (1 x 256) + 0
So, working backwards, those four lines are only looked at when button 1,0 is "pressed" -- this is, I think one of the rotary directions, right?
Even if it is pressed, the line is only excecuted if button 1,1 is also "pressd" -- isn't that the other direction? Both pressed together?
Even if both those were true, the line is only executed is the Flag for Button 1,5 is set. Since button 1,5 isn't even assigned to anything, that will never be true.
Even if all those things were true, all the line does is toggle the Flag for Button 1,0, which isn't even used in the first place.
Please please, tell me how you arrived at this from anything i wrote. If you can get so muddled from what i wrote it seriously needs re-writing. It has stood unchanged now for over 10 years, but maybe everyone else gives up? Please help me.
Regards
Pete
#7
Posted 13 February 2012 - 04:32 AM
I am very new to FSUIPC - until very recently did not know it even existed - so my learning curve is steep.
I have 3 buttons
- push button on rotary encoder showing as button 1,5
- left turn on rotary encoder showing as button 1,0
- right turn on the rotary encoder showing as button 1,1
Keys are assigned by its own .ini file
CRS dec CTR+F8 to Button 1,0
CRS inc CTR+F3 to Button 1,1
I would like to have two conditions.
- One where the CRS will increase/decrease slow
- Secondly where the CRS will increase/decrease at a fast rate
Is there a recommended way that this would be best accomplished?
Thanks, David
#8
Posted 13 February 2012 - 08:56 AM
#9
Posted 13 February 2012 - 09:18 AM
If it is any hint, when connected and using FSUIP to connect to the ini file for the key assignments, for each 'click' I get 1 degree of course change.
#10
Posted 13 February 2012 - 11:01 AM
David225, on 13 February 2012 - 04:32 AM, said:
Sorry, there's no need. I understand exactly what the question is. And I can indeed help you with the solution But whilst I have someone who is "new to FSUIPC" and who is so severely misunderstanding my documentation, I would like to understand how the misunderstanding arose so I can improve the documentation.
I see now that you are unwilling to do this by reading my analysis and answering questions. I assume you just want the answer on a plate without having to understand it at all? I am not so keen on that because it means you and others don't learn anything and makes me have to do it over again, for everything. Far better, don't you see, for me to understand what needs changing in the documentation?That would benefit everyone and allow me to get on with life. One way to do that is to find out how to explain it all to you, as a 'beginner' as you say.
Unfortunately so far, despite the fact that I've been spending a lot of time trying to break it down for you, you seem to want to ignore it all. So it is getting frustrating. I've been wasting my time?
The answer, assuming each click on the rotary sends "press" and "release" alternately:
1=P1,0,K119,10
2=CP(F+15,0)1,0,K119,10
3=U1,0,K119,10
4=CP(F+15,0)U1,0,K119,10
5=P1,1,K114,10
6=CP(F+15,0)P1,1,K114,10
7=U1,1,K114,10
8=CP(F+15,0)U1,1,K114,10
9=P1,5,C1005,3840
The answer assuming each click sends both "press" and "release":
1=P1,0,K119,10
2=CP(F+15,0)1,0,K119,10
3=P1,1,K114,10
4=CP(F+15,0)P1,1,K114,10
5=P1,5,C1005,3840
Now please don't come back with more questions unless you are bt then willing to answer mine too. Please consider Forum use as a two-way process. Deal?
Regards
Pete
#11
Posted 14 February 2012 - 07:54 AM
I wanted to go away reflect and re read, so I could try and give some quality to my response.
I do appreciate the time you have given me. At no stage did I ask nor expect the answer to be given to me. I am doing this because I want to learn. If I wanted the easy
way out I would have bought a plug and play unit.
Unfortunately written dialogue of this nature can be fought with misinterpretation. In this case dialogue #6 was taken by me to cynical and condescending. I took the questions to be in fact, statements of a sarcastic nature. In keeping with the good intent and nature of this forum I decided not to respond with what I thought. Instead I
decided to politely re ask the question, not asking for an answer but asking..."is there a recommended way that this would be best accomplished?"
However Pete relax, before your blood pressure rises too much. After reading your reply #10, I had a different interpretation on your requests for answers.
I saw someone who was genuine and wanted to have things correct. I somehow read more passion in your quest. You are very precise in what you write and say. There is little or no padding.This makes readers like myself having to be very careful that we read word for word what you say.
Unfortunately, most people like myself, aren't that clever and probably need a few more examples. So no, I am not ignoring you nor are you wasting your time. I just needed more time.
After 21383 posts, your sincerity certainly cant be questioned.
I, as I am sure all forum members do, appreciate your work,
Sincerely, David
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











