David225 Posted February 11, 2012 Report Posted February 11, 2012 Hello Folk, 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
Pete Dowson Posted February 11, 2012 Report Posted February 11, 2012 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 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. 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 None of those lines have any conditions placed on them, so they will always be obeyed. 7=CP(F+1,5)(+1,1)1,0,C1005,2568=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
David225 Posted February 12, 2012 Author Report Posted February 12, 2012 G'day Pete, 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
Pete Dowson Posted February 12, 2012 Report Posted February 12, 2012 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). Ah, you didn't mention that it was the GPS you were using. 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. Ah, so it detects the keystrokes itself. I see, I would like to use your latter option of toggling between fast and slow turn rate of the course indicator in GPS mode. Yes, I understood that. Hence my attempt at flagsto swap between speeds with a momentary push of the button. 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. Have I confused you yet - I should have 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
David225 Posted February 12, 2012 Author Report Posted February 12, 2012 Thanks Pete, 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
Pete Dowson Posted February 13, 2012 Report Posted February 13, 2012 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 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? 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 You've got me very worried now! :-( How did you derive the above from anything I wrote? In the first place they obviously have no effect whatsoever on the lines which actually send the keypresses, the ones beforehand, because you've put no conditions whatsoever on those keypressing lines. They are completely unconditional, so they'll just operate regardless of anything else. Isn't that obvious? If not, please tell me why not. Because somehow otherwise I'm failing to explain even the very basics. I'd really like to understand how i am failing so badly. 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
David225 Posted February 13, 2012 Author Report Posted February 13, 2012 Maybe I should rephrase the question: 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 It would be nice if the momentary push button would toggle between those two conditions. Is there a recommended way that this would be best accomplished? Thanks, David
alaxus Posted February 13, 2012 Report Posted February 13, 2012 Ok I am confused, are you using a rotary switch or a rotary encoder? If you are using a rotary encoder, what type are you using (full, half or quarter wave)? And what hardware is the encoder connected too?
David225 Posted February 13, 2012 Author Report Posted February 13, 2012 Rotary Encoder - Desktop Aviator 2095A - I cant tell you the type of encoder, other than it is the one sold by them. 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.
Pete Dowson Posted February 13, 2012 Report Posted February 13, 2012 Maybe I should rephrase the question 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
David225 Posted February 14, 2012 Author Report Posted February 14, 2012 I am truly sorry that I have been so miss understood. My lack of answering your questions was because I haven't had time yet (due family and work) to sit and do as I said I would do, that is...." I admit I have to now go away and think on that and read your notes again. All I have done is a rushed immediate answer to the previous nights response. 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
Pete Dowson Posted February 14, 2012 Report Posted February 14, 2012 I, as I am sure all forum members do, appreciate your work, Okay, thank you. Pete
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now