uragano Posted May 5, 2013 Report Share Posted May 5, 2013 Dear i have prepared a easy EFIS as You can see below I have programmed all with FSUIPC OFFSET, but i have a problems with the buttons WXR, STA ARPT etc etc, I have installed momentary push botton. I wrote for ARPT the OFFSET 70004 with value 1, but it works only for be switched ON.......To be switched OFF the value must be 0, but I could use this state (VALUE 0 and 1) only if i had a switch with static position , with momentary position is not usable. I could fix the problem using the Macro, but I would like to understand how can program FSUIPC in this matter. I have a similar problem with the encoder (BARO + and -) I am using the MACRO for this function. thx in advanced Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 5, 2013 Report Share Posted May 5, 2013 I have programmed all with FSUIPC OFFSET, but i have a problems with the buttons WXR, STA ARPT etc etc, I have installed momentary push botton. I wrote for ARPT the OFFSET 70004 with value 1, but it works only for be switched ON.......To be switched OFF the value must be 0, but I could use this state (VALUE 0 and 1) only if i had a switch with static position , with momentary position is not usable. How are you programming -- with an actual program, or using FSUIPC assignments to "Offset" controls? I could fix the problem using the Macro, but I would like to understand how can program FSUIPC in this matter. Why not simply use the Offset togglebits control, with value 1. Then it will alternately set and clear the 1. I have a similar problem with the encoder (BARO + and -) I am using the MACRO for this function. Again, there's the Offset inc and dec controls. What is wrong with using those? Pete Link to comment Share on other sites More sharing options...
uragano Posted May 5, 2013 Author Report Share Posted May 5, 2013 How are you programming -- with an actual program, or using FSUIPC assignments to "Offset" controls? Why not simply use the Offset togglebits control, with value 1. Then it will alternately set and clear the 1. Again, there's the Offset inc and dec controls. What is wrong with using those? Pete Thx Pete I use FSUIPc for all, but I am sure I do not know all function to be used, for the ARPT function the value is 1 to show and 0 to hidden, but I know only the function "press" and release : 391=P10,14,C70004,1 392=U10,14,C70004,0 How can program the togglebits ? Can You please report me an expample? Duccio Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 5, 2013 Report Share Posted May 5, 2013 Thx Pete I use FSUIPc for all, Well, you said that already, but you didn't say whether you were writing your own driver program to interface to FSUIPC! That's what I asked. but I am sure I do not know all function to be used, for the ARPT function the value is 1 to show and 0 to hidden, but I know only the function "press" and release :391=P10,14,C70004,1 392=U10,14,C70004,0 So, you are using FSUIPC assignments, not writing your own program. We discover that now. And here 70004 isn't an Offset, but a Control number. You said you were programming with FSUIPC OFFSET! No, you are assigning to a control! No offset is involved! How can program the togglebits ? The FSUIPC Offset byte togglebits control is a control you can assign in the dropdown list. But for that you need an offset! If you are only using controls you need to use conditional (compound) control assignments, as documented in the FSUIPC advanced users manual. You can easily use the button's own flag as the condition to make the button act like a toggle switch. Please do read up on this and ask questions afterwards if you still don't understand. Pete Link to comment Share on other sites More sharing options...
uragano Posted May 5, 2013 Author Report Share Posted May 5, 2013 Pete....sorry for my poor english.... I will try to explain my main problem. I wil take as example the ARPT button on EFIS (CAPTAIN SIDE) the momentary button is connected to a leo bodnar PCB, I have assigned the control 70004 but is does not work, I tried to read better the "compound" command in teh manual but I did non understand how to use the "compound" with this matter. Can You drive me here how Can I do this in order to understad better the logical process? Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 5, 2013 Report Share Posted May 5, 2013 I wil take as example the ARPT button on EFIS (CAPTAIN SIDE) the momentary button is connected to a leo bodnar PCB, I have assigned the control 70004 but is does not work If one of the PMDG controls does not work I'm afraid it is PMDG you need to report this to. I tried to read better the "compound" command in teh manual but I did non understand how to use the "compound" with this matter.Can You drive me here how Can I do this in order to understad better the logical process? To change the action of a momentary button into a toggle you only need to make the button's "press" action dependent upon its own flag. So it is two "P" lines in the INI, one with condition flag set and the the other with cofdition flag not set. The button's own flag switches on or off with each press. Check the examples in the manual. What part do you not understand? Regards Pete Link to comment Share on other sites More sharing options...
uragano Posted May 5, 2013 Author Report Share Posted May 5, 2013 "To change the action of a momentary button into a toggle you only need to make the button's "press" action dependent upon its own flag. So it is two "P" lines in the INI, one with condition flag set and the the other with condition flag not set. The button's own flag switches on or off with each press." the control 70004 is working but if i use: 391=P10,14,C70004,1 392=U10,14,C70004,0 it will not work. I uderstand as wrote by You I must use a control with flag but i did not understand how write this command, the only thing i know is the value 1 show the airport and value 0 hidden the airport. Can You write me please an example of how can use the flag ? thx Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 5, 2013 Report Share Posted May 5, 2013 "To change the action of a momentary button into a toggle you only need to make the button's "press" action dependent upon its own flag. So it is two "P" lines in the INI, one with condition flag set and the the other with condition flag not set. The button's own flag switches on or off with each press." the control 70004 is working but if i use: 391=P10,14,C70004,1 392=U10,14,C70004,0 it will not work. Of course not, because being momentary, The Press is immediately followed by a Release! So it sets 1 for on then 0 for off immediately. I uderstand as wrote by You I must use a control with flag but i did not understand how write this command, the only thing i know is the value 1 show the airport and value 0 hidden the airport. Can You write me please an example of how can use the flag ? I wrote the documentation to explain these things. Have you looked? I don't mind helping you understand what is written, but it seems to me you have not even bothered to look? Please check the section "Compound button conditions" in the Advanced User's Guide (indexed in the contents as "compound button controls"). Take a look, THEN come back. So far I seem to have been wasting my time pointing you to the answers. I don't think it is correct for me to solve all folks' problems, because that way I have to do it all of the time. It is much better if folks learn to do it, then they can do it again, and so on. This is why there is documentation and not only a place where I can do all the work again and again. Do you see? I'll help, but you must try a bit, please. Pete Link to comment Share on other sites More sharing options...
uragano Posted May 5, 2013 Author Report Share Posted May 5, 2013 Dear Pete I have tried to read, but i did not understand the way to fix, but no problem I will read agian and again in order to understand, but be sure i have lookn the manual... I will came back in same days, thx for the info Link to comment Share on other sites More sharing options...
uragano Posted May 11, 2013 Author Report Share Posted May 11, 2013 Hi Pete 1=P11,3,C1005,3842 2=CP(F+15,2)11,3, ... 3=CP(F-15,2)11,3, ... I have reported the lines wrote in the manual and now is more clear, but how can I use the control here ? Can I add ,70001,1 for example? as this "2=CP(F+15,2)11,3,C70001,1" Link to comment Share on other sites More sharing options...
uragano Posted May 12, 2013 Author Report Share Posted May 12, 2013 Yes it is workig!!! Now I am staring with rotary encoder........ any suggestion? Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 15, 2013 Report Share Posted May 15, 2013 Now I am staring with rotary encoder........ any suggestion? What, don't you know what you want to use it for? Rotary encoders vary. The easy-to-program ones send one button number for one direction and a different one in the other. The more complicated ones send both in both directions, but in a different phase. You need to determine what yours does first. Pete Link to comment Share on other sites More sharing options...
uragano Posted May 15, 2013 Author Report Share Posted May 15, 2013 Hi Pete encoder at the moment is working fine by MACRO, but I d like to improve by the control. the control is 69997 i ve tried several test but in evry direction I move the encoder i can only increase the value and never decrease. I do not understad how can use the control for this matter, i.e. I assume 69997,1 to increase and it is working but i do not find how decrease!!!! Can You suggest any solution or where can I read in order to learn pls? Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 15, 2013 Report Share Posted May 15, 2013 the control is 69997 i ve tried several test but in evry direction I move the encoder i can only increase the value and never decrease. I do not understad how can use the control for this matter, i.e. I assume 69997,1 to increase and it is working but i do not find how decrease!!!! Can You suggest any solution or where can I read in order to learn pls? Where did you find 69997? That sounds like a PMDG 737NGX control. What is its description? [LATER] Okay, 69997 is 69632 + 365, so according to the PMDG document it is EVT_EFIS_CPT_BARO (THIRD_PARTY_EVENT_ID_MIN + 365) So, if a parameter of 1 increases it by 1, didn't you try the obvious, a parameter of -1? Sorry, but i do not have the NGX installed and cannot solve all PMDG questions. You have to work it out yourself or ask at the PMDG forum. Regards Pete Link to comment Share on other sites More sharing options...
uragano Posted May 16, 2013 Author Report Share Posted May 16, 2013 ......PETE i was thinking about -1 but .....I was very shame to propose :) now that You told me I will try! thx I wll report Link to comment Share on other sites More sharing options...
uragano Posted May 18, 2013 Author Report Share Posted May 18, 2013 .....did not working...... any suggestions? Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 18, 2013 Report Share Posted May 18, 2013 .....did not working...... any suggestions? Sorry, I'm the wrong person to ask. Try the PMDG NGX forums. I don't use PMDG aircraft. Maybe you have to experiment. There must be a way. Maybe they use 1 for inc, 2 for dec, or 0 for dec, or maybe there's a different event for decrementing Maybe they handle it like the mouse left and right button methods on the virtual cockpit -- see if the Mouse values listed somewhere in their SDK work. I've no idea and cannot try it for you! Pete Link to comment Share on other sites More sharing options...
uragano Posted May 19, 2013 Author Report Share Posted May 19, 2013 Oki Pete thx for the support anyway, I will keep You informed for the new event Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 19, 2013 Report Share Posted May 19, 2013 Oki Pete thx for the support anyway, I will keep You informed for the new event I did have a quick look at the PMDG SDK data (the PMDG_NGX_SDK.h file) and found this: #define MOUSE_FLAG_RIGHTSINGLE 0x80000000 #define MOUSE_FLAG_MIDDLESINGLE 0x40000000 #define MOUSE_FLAG_LEFTSINGLE 0x20000000 #define MOUSE_FLAG_RIGHTDOUBLE 0x10000000 #define MOUSE_FLAG_MIDDLEDOUBLE 0x08000000 #define MOUSE_FLAG_LEFTDOUBLE 0x04000000 #define MOUSE_FLAG_RIGHTDRAG 0x02000000 #define MOUSE_FLAG_MIDDLEDRAG 0x01000000 #define MOUSE_FLAG_LEFTDRAG 0x00800000 #define MOUSE_FLAG_MOVE 0x00400000 #define MOUSE_FLAG_DOWN_REPEAT 0x00200000 #define MOUSE_FLAG_RIGHTRELEASE 0x00080000 #define MOUSE_FLAG_MIDDLERELEASE 0x00040000 #define MOUSE_FLAG_LEFTRELEASE 0x00020000 #define MOUSE_FLAG_WHEEL_FLIP 0x00010000 // invert direction of mouse wheel #define MOUSE_FLAG_WHEEL_SKIP 0x00008000 // look at next 2 rect for mouse wheel commands #define MOUSE_FLAG_WHEEL_UP 0x00004000 #define MOUSE_FLAG_WHEEL_DOWN 0x00002000 I know that a lot of dials in the cockpit are adjusted by left or right mouse button use. Maybe the parameters need to be the values above for RIGHTSINGLE to increase and LEFTSINGLE for decrease? Worth a try? Those values are presented in that file for a reason. Regards Pete Link to comment Share on other sites More sharing options...
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