Jump to content
The simFlight Network Forums

hm

Members
  • Posts

    95
  • Joined

  • Last visited

Everything posted by hm

  1. Hi, You are right, Pete, there are indeed 4 states :oops: but like you said in this case 4 states are probably needed: no brakes -> low brakes -> medium brakes -> max brakes. But the counter in my example, however, will overflow by the next push after "Max brakes" to "No brakes". Therefore IMHO it is better that in this application uses a binary up/down counter with two buttons. In that case you can step up and down to higher or lower break forces. This is my proposal: ; Up counting ; 01=CP(F-0,11)0,3,C1005,11 02=CP(F-0,12)0,3,C1005,11 03=CP(F-0,11)(F-0,12)0,3,C1005,12 ; 04=CP(F+0,11)0,3,C1004,20 05=CP(F+0,12)0,3,C1004,20 06=CP(F-0,11)(F-0,12)0,3,C1003,20 ; 07=CP(F-0,11)0,3,C1004,21 08=CP(F+0,12)0,3,C1004,21 09=CP(F+0,11)(F-0,12)0,3,C1003,21 ; 10=CP(F+0,11)0,3,C1004,22 11=CP(F-0,12)0,3,C1004,22 12=CP(F-0,11)(F+0,12)0,3,C1003,22 ; 13=CP(F-0,11)0,3,C1004,23 14=CP(F-0,12)0,3,C1004,23 15=CP(F+0,11)(F+0,12)0,3,C1003,23 ; ; Down counting ; 16=CP(F+0,11)0,2,C1005,11 17=CP(F+0,12)0,2,C1005,11 18=CP(F+0,11)(F+0,12)0,2,C1005,12 ; 19=CP(F+0,11)0,2,C1004,20 20=CP(F+0,12)0,2,C1004,20 21=CP(F-0,11)(F-0,12)0,2,C1003,20 ; 22=CP(F-0,11)0,2,C1004,21 23=CP(F+0,12)0,2,C1004,21 24=CP(F+0,11)(F-0,12)0,2,C1003,21 ; 25=CP(F+0,11)0,2,C1004,22 26=CP(F-0,12)0,2,C1004,22 27=CP(F-0,11)(F+0,12)0,2,C1003,22 ; 28=CP(F-0,11)0,2,C1004,23 29=CP(F-0,12)0,2,C1004,23 30=CP(F+0,11)(F+0,12)0,2,C1003,23 ; 29=CP(F+0,20)0,3,do no brakes 30=CP(F+0,20)0,2,do no brakes 30=CP(F+0,21)0,3,do low brakes 31=CP(F+0,21)0,2,do low brakes 32=CP(F+0,22)0,3,do medium brakes 33=CP(F+0,22)0,2,do medium brakes 34=CP(F+0,23)0,3,do max brakes 35=CP(F+0,23)0,2,do max brakes It is less complicated then it looks, but some tricks are necessary: lines 01 to 03 are the counter, counting up with button 3, precautions are taken to not allow overflow (behind 1/1): flag 11 can only be toggled when flag 11 or flag 12 is not set, and flag 11 can only be toggled in counts (0/0, 1/0, 0/1), flag 12 can only be toggled once in count 1/0 to 0/1. lines 04 - 15 are again the binary decoding of the counter but this time to intermediate flags and therefore the additional instructions to reset the flag, if the conditions aren't met, are necessary. The following lines are counting down with button 2. Again precautions are taken to not underflow the counter (below zero). This time the decoding is in combination with button 2. And so this way you can cycle up/down trough the states: No brakes <--> Low brakes <--> Medium brakes <--> Max brakes hm
  2. Sorry I made a few typo's, this is the correction: Well here is my (shorter icon_wink.gif )solution: 01= P0,3,C1005,11 02= CP(F-0,11)0,3,C1005,12 03=CP(F+0,11)(F-0,12)0,3, do this 04=CP(F+0,11)(F+0,12)0,3, do that 05=CP(F-0,11)(F-0,12)0,3, do the third thing How does it work, line 3 to 5 are a binary decoding of the possible combinations of the states of two flags 11 and 12 (states 00, 10 and 11) line 1 and 2 are forming a binary 3 counter: the first line toggles flag 11: if you push the button (here 3) flag 11 changes his state from 0 to 1 or from 0 to 1 so this flag cycles trough 0 - 1 - 0 - 1 - 0 - 1 - 0 - 1 - .... by each push of the button. in rule 2 however flag 12, which has also a toggle command, can only be toggled when flag 11 is zero and as such this flag changes his state as follows by each push of the button: 0 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - ...... in combination with flag 11 : a binary 3 state counter which is decoded in the three following rules. I changed the order because the first count detected will be 1. My previous example was of course very complicated but it contains the rules of above (16, 17) and it shows you how you can assign a lot of commands to a few joystick buttons. hm
  3. Well here is my (shorter :wink: )solution: 01= P0,3,C1005,11 02= CP(F-0,11)0,3,C1005,12 03=CP(F-0,11)(F-0,12)0,3, do this 04=CP(F+0,11)(F-0,12)0,3, do that 05=CP(FF+0,11)(F+0,12)0,3, do the third thing How does it work, line 3 to 5 are a binary decoding of the possible combinations of the states of two flags 11 and 12 (states 00, 10 and 11) line 1 and 2 are forming a binary 3 counter: 01 the first line toggles flag 11: if you push the button (here 3) flag 11 changes his state from 0 to 1 or from 0 to 1 so this flag cycles trough 0 - 1 - 0 - 1 - 0 - 1 - 0 - 1 - .... by each pusch of the button. in rule 2 however flag 12, which has also a toggle command, can only be toggled when flag 11 is zero and as such this flag changes his state as follows by each puch of the button: 0 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - ...... in combination with flag 11 : a binary 3 state counter which is decoded in the three following rules. My previous example was of course very complicated but it contains the rules of above (16, 17) and it shows you how you can assign a lot of commands to a few joystick buttons. hm
  4. Hi, This is some programming I did to test some ideas I had. It is working! Of coarse you can make it in your application much simpler if you use the 1-3 of the counter directly to set your instructions. My programming is for a 8 button Microsoft Sidewinder. hm [buttons] PollInterval=20 ; 0=CP(F-10)(-0,7)0,6,C1003,20 1=CP(F-10)(-0,6)0,7,C1003,20 ; ; Flag 10 follows key (-6 & -7) ; 2=CU(-0,7)0,6,C1003,10 3=CU(-0,6)0,7,C1003,10 ; ; Flag 11 follows key (+6 & -7) ; 4=CP(-0,7)0,6,C1004,10 5=CP(-0,7)0,6,C1003,11 6=CU(F+0,11)0,6,C1004,11 ; ; Flag 12 follows key (-6 & +7) ; 7=CP(-0,6)0,7,C1004,10 8=CP(-0,6)0,7,C1003,12 9=CU(F+0,12)0,7,C1004,12 ; ; Flag 13 follows key (+6 & +7) ; 10=CP(F+0,11)0,7,C1004,11 11=CP(+0,6)0,7,C1003,13 12=CU(F+0,13)0,7,C1004,13 ; 13=CP(F+0,12)0,6,C1004,12 14=CP(+0,7)0,6,C1003,13 15=CU(F+0,13)0,6,C1004,13 ;------------------------------------------------------------------- ; 8 state up/down counter :------------------------------------------------------------------- ; Count up ;------------------------------------------------------------------- 16=CP(F+0,13)0,3,C1005,14 17=CP(F+0,13)(F-0,14)0,3,C1005,15 18=CP(F+0,13)(F-0,14)(F-0,15)0,3,C1005,16 ; 19=CP(F+0,20)(F+0,14)0,3,C1004,20 20=CP(F+0,20)(F+0,15)0,3,C1004,20 21=CP(F+0,20)(F+0,16)0,3,C1004,20 22=CP(F+0,13)(F-0,14)(F-0,15)(F-0,16)0,3,C1003,20 ; 23=CP(F+0,21)(F-0,14)0,3,C1004,21 24=CP(F+0,21)(F+0,15)0,3,C1004,21 25=CP(F+0,21)(F+0,16)0,3,C1004,21 26=CP(F+0,13)(F+0,14)(F-0,15)(F-0,16)0,3,C1003,21 ; 27=CP(F+0,22)(F+0,14)0,3,C1004,22 28=CP(F+0,22)(F-0,15)0,3,C1004,22 29=CP(F+0,22)(F+0,16)0,3,C1004,22 30=CP(F+0,13)(F-0,14)(F+0,15)(F-0,16)0,3,C1003,22 ; 31=CP(F+0,23)(F-0,14)0,3,C1004,23 32=CP(F+0,23)(F-0,15)0,3,C1004,23 33=CP(F+0,23)(F+0,16)0,3,C1004,23 34=CP(F+0,13)(F+0,14)(F+0,15)(F-0,16)0,3,C1003,23 ; 35=CP(F+0,24)(F+0,14)0,3,C1004,24 36=CP(F+0,24)(F+0,15)0,3,C1004,24 37=CP(F+0,24)(F-0,16)0,3,C1004,24 38=CP(F+0,13)(F-0,14)(F-0,15)(F+0,16)0,3,C1003,24 ; 39=CP(F+0,25)(F-0,14)0,3,C1004,25 40=CP(F+0,25)(F+0,15)0,3,C1004,25 41=CP(F+0,25)(F-0,16)0,3,C1004,25 42=CP(F+0,13)(F+0,14)(F-0,15)(F+0,16)0,3,C1003,25 ; 43=CP(F+0,26)(F+0,14)0,3,C1004,26 44=CP(F+0,26)(F-0,15)0,3,C1004,26 45=CP(F+0,26)(F-0,16)0,3,C1004,26 46=CP(F+0,13)(F-0,14)(F+0,15)(F+0,16)0,3,C1003,26 ; 47=CP(F+0,27)(F-0,14)0,3,C1004,27 48=CP(F+0,27)(F-0,15)0,3,C1004,27 49=CP(F+0,27)(F-0,14)0,3,C1004,27 50=CP(F+0,13)(F+0,14)(F+0,15)(F+0,16)0,3,C1003,27 ;----------------------------------------------------- ; Count down ;----------------------------------------------------- 51=CP(F+0,13)0,2,C1005,14 52=CP(F+0,13)(F+0,14)0,2,C1005,15 53=CP(F+0,13)(F+0,14)(F+0,15)0,2,C1005,16 ; 54=CP(F+0,20)(F+0,14)0,2,C1004,20 55=CP(F+0,20)(F+0,15)0,2,C1004,20 56=CP(F+0,20)(F+0,16)0,2,C1004,20 57=CP(F+0,13)(F-0,14)(F-0,15)(F-0,16)0,2,C1003,20 ; 58=CP(F+0,21)(F-0,14)0,2,C1004,21 59=CP(F+0,21)(F+0,15)0,2,C1004,21 60=CP(F+0,21)(F+0,16)0,2,C1004,21 61=CP(F+0,13)(F+0,14)(F-0,15)(F-0,16)0,2,C1003,21 ; 62=CP(F+0,22)(F+0,14)0,2,C1004,22 63=CP(F+0,22)(F-0,15)0,2,C1004,22 64=CP(F+0,22)(F+0,16)0,2,C1004,22 65=CP(F+0,13)(F-0,14)(F+0,15)(F-0,16)0,2,C1003,22 ; 66=CP(F+0,23)(F-0,14)0,2,C1004,23 67=CP(F+0,23)(F-0,15)0,2,C1004,23 68=CP(F+0,23)(F+0,16)0,2,C1004,23 69=CP(F+0,13)(F+0,14)(F+0,15)(F-0,16)0,2,C1003,23 ; 70=CP(F+0,24)(F+0,14)0,2,C1004,24 71=CP(F+0,24)(F+0,15)0,2,C1004,24 72=CP(F+0,24)(F-0,16)0,2,C1004,24 73=CP(F+0,13)(F-0,14)(F-0,15)(F+0,16)0,2,C1003,24 ; 74=CP(F+0,25)(F-0,14)0,2,C1004,25 75=CP(F+0,25)(F+0,15)0,2,C1004,25 76=CP(F+0,25)(F-0,16)0,2,C1004,25 77=CP(F+0,13)(F+0,14)(F-0,15)(F+0,16)0,2,C1003,25 ; 78=CP(F+0,26)(F+0,14)0,2,C1004,26 79=CP(F+0,26)(F-0,15)0,2,C1004,26 80=CP(F+0,26)(F-0,16)0,2,C1004,26 81=CP(F+0,13)(F-0,14)(F+0,15)(F+0,16)0,2,C1003,26 ; 82=CP(F+0,27)(F-0,14)0,2,C1004,27 83=CP(F+0,27)(F-0,15)0,2,C1004,27 84=CP(F+0,27)(F-0,14)0,2,C1004,27 85=CP(F+0,13)(F+0,14)(F+0,15)(F+0,16)0,2,C1003,27 ; ;------------------------------------------------------------- ; Here are the commands for FS9 ;------------------------------------------------------------- ;if -6 & -7 (Flag 10) ; 86=CR(F+0,10)0,0,C65588,0 ;Break Repeat 87=CP(F+0,20)(F+0,10)0,1,C65570,0 ;State 0 :Gear Toggle 88=CR(F+0,20)(F+0,10)0,2,C65607,0 ;State 0 :Trim down Repeat 89=CR(F+0,20)(F+0,10)0,3,C65615,0 ;State 0 :Trim up Repeat 90=CP(F+0,10)0,4,C65758,0 ;Flaps Incr 91=CP(F+0,10)0,5,C65759,0 ;Flaps Decr ; ; if +6 & -7 (Flag 11) ; 92=CP(F+0,20)(F+0,11)0,0,C65752,1 ;Parking breaks toggle 93=CP(F+0,20)(F+0,11)0,1,C65751,0 ;State 0 :Landing Lights Toggle 94=CR(F+0,20)(F+0,11)0,2,C65771,0 ;State 0 :Propeller Pitch Decr 95=CR(F+0,20)(F+0,11)0,3,C65769,0 ;State 0 :Propeller Pitch Incr 96=CP(F+0,20)(F+0,11)0,4,C66390,0 ;Wing fold (Dragchute) toggle 97=CP(F+0,20)(F+0,11)0,5,C65589,0 ;Spoilers toggle ; ; if -6 & +7 (Flag 12) ; 98=CP(F+0,12)0,0,K192,1 ;~ for CS727 99=CP(F+0,20)(F+0,12)0,1,C65858,0 ;State 0 :Pitot Heat Toggle 100=CR(F+0,20)(F+0,12)0,2,C65777,0 ;State 0 :Mixture Decr 101=CR(F+0,20)(F+0,12)0,3,C65775,0 ;State 0 :Mixture Incr 102=CP(F+0,12)0,4,K83,8 ;Next view 103=CP(F+0,12)0,5,K83,9 ;Previous view ; ; if +7 & +8 (Flag 13) ; 104=CP(F+0,20)(F+0,13)(F-0,31)0,0,C66224,0 ;State 0 :Autostart Engines 105=CP(F+0,20)(F+0,13)(F+0,31)0,0,K112,11 ;State 0 :Engine shut down (CTRL+SHFT+F1) 106=CU(F+0,20)(F+0,13)0,0,C1005,31 ;State 0 :Toggle Engine Flag 107=CP(F+0,20)(F+0,13)0,1,C66293,0 ;State 0 :Toggle Avionics Master 108=CP(F+0,20)(F+0,13)0,2,C66244,0 ;State 0 :Decrement Cowl Flaps 109=CP(F+0,20)(F+0,13)0,3,C66243,0 ;State 0 :Increment Cowl flaps ; ;------------------------------------------------------------- ; Here with the 8 state machine ;------------------------------------------------------------- ; State 1: COM1 radio ;------------------------------------------------------------- ; 110=CP(F+0,21)(F+0,11)0,1,C66372,0 ;Toggle Standby/COM 1 111=CR(F+0,21)(F+0,11)0,2,C65636,0 ;COM 1 units (-1) 112=CR(F+0,21)(F+0,11)0,3,C65637,0 ;COM 1 units (+1) 113=CR(F+0,21)(F+0,12)0,2,C66434,0 ;COM 1 fractions (-1+C) 114=CR(F+0,21)(F+0,12)0,3,C66435,0 ;COM 1 fractions (+1+C) ; ;------------------------------------------------------------- ; State 2: COM2 radio ;------------------------------------------------------------- ; 115=CP(F+0,22)(F+0,11)0,1,C66444,0 ;Toggle Standby/COM 2 116=CR(F+0,22)(F+0,11)0,2,C66436,0 ;COM 2 units (-1) 117=CR(F+0,22)(F+0,11)0,3,C66437,0 ;COM 2 units (+1) 118=CR(F+0,22)(F+0,12)0,2,C66439,0 ;COM 2 fractions (-1) 119=CR(F+0,22)(F+0,12)0,3,C66441,0 ;COM 2 fractions (+1) ; ;------------------------------------------------------------- ; State 3: Heading Bug ;------------------------------------------------------------- ; 120=CP(F+0,23)(F+0,11)0,2,C65880,0 ;Heading Bug (-1) 121=CP(F+0,23)(F+0,11)0,3,C65879,0 ;Heading Bug (+1) 122=CR(F+0,23)(F+0,12)0,2,C1024,0 ;Heading Bug (-10) 123=CR(F+0,23)(F+0,12)0,3,C1025,0 ;Heading Bug (+10) ; ;------------------------------------------------------------- ; State 4: NAV1 Frequence ;------------------------------------------------------------- ; 124=CP(F+0,22)(F+0,11)0,1,C65640,0 ;Toggle Standby/NAV 1 125=CR(F+0,22)(F+0,11)0,2,C65640,0 ;NAV 1 units (-1) 126=CR(F+0,22)(F+0,11)0,3,C65641,0 ;NAV 1 units (+1) 127=CR(F+0,22)(F+0,12)0,2,C66445,0 ;NAV 1 fractions (-1) 128=CR(F+0,22)(F+0,12)0,3,C66446,0 ;NAV 1 fractions (+1) ; ;------------------------------------------------------------- ; State 5: VOR1 OBI ;------------------------------------------------------------- ; 129=CP(F+0,24)(F+0,11)0,2,C65662,0 ;VOR1 OBI (-1) 130=CP(F+0,24)(F+0,11)0,3,C65663,0 ;VOR1 OBI (+1) 131=CR(F+0,24)(F+0,12)0,2,C1024,0 ;VOR1 OBI (-10) 132=CR(F+0,24)(F+0,12)0,3,C1025,0 ;VOR1 OBI (+10) ; ;------------------------------------------------------------- ; State 6: NAV2 Frequence ;------------------------------------------------------------- ; 133=CP(F+0,22)(F+0,11)0,1,C66452,0 ;Toggle Standby/NAV 2 134=CR(F+0,22)(F+0,11)0,2,C65644,0 ;NAV 2 units (-1) 135=CR(F+0,22)(F+0,11)0,3,C65645,0 ;NAV 2 units (+1) 136=CR(F+0,22)(F+0,12)0,2,C66449,0 ;NAV 2 fractions (-1) 137=CR(F+0,22)(F+0,12)0,3,C66450,0 ;NAV 2 fractions (+1) ; ;------------------------------------------------------------- ; State 7: VOR2 OBI ;------------------------------------------------------------- ; 138=CP(F+0,25)(F+0,11)0,2,C65664,0 ;VOR2 OBI (-1) 139=CP(F+0,25)(F+0,11)0,3,C65665,0 ;VOR2 OBI (+1) 140=CR(F+0,25)(F+0,12)0,2,C1024,0 ;VOR2 OBI (-10) 141=CR(F+0,25)(F+0,12)0,3,C1025,0 ;VOR2 OBI (+10)
  5. Hi Peter, Thanks, for the new FSUIPC version, but where can I download it ? :wink: Schiratti's file is of date 4-11. Regards, Hugo
  6. Hello Didier, I am from Belgium too. So if you need some explanaition abouth button programming, you can contact me. You find my email address at http://users.telenet.be/desi-iii -> contact page, the site is also in dutch, french or german :) hm
  7. Hello, I am preparing an article about "Do more with your joystick", of course based on "Button programming", and I am looking for a good soul to write a little DLL: to display a message in the "scrolling text window" or in a corner of the screen for a second or so. The text has to be appearing when a certain variable, written by a button programming command, changes. This variable defines the number of a the text row in an external file. The goal of the DLL: you can program an up/down "sequencer", some kind of a software rotary switch, with Button Programming. Depending on his setting, certain commands can be executed, like the setting of radio frequences, course bugs, Vor OBI, trim up/down, propeller pitch control etc. The only problem is that, because it is all Button Programming, there is no "physical indication" of the sequencer setting. Therefore I need this little DLL, to display the sequence number (minimal) or better, a short text row, stored in a file, with "COM1 set" or "VOR 1 OBI set" etc. I assume you understand that the DLL must be freeware, and I am sure it will be a successful addition to FSUIPC and not limited to my proposition as application alone. Thanks in advance, hm
  8. Hi Pete, Thanks, But my thoughts were going not that far: if someone would like to use "general" sections, well in that case I would say that the order of the sections would play a role. The first section that matches the mask would be the active with the obligation that the first section has to be always the [Keys] or [buttons] general section, and I would halt the scanning at the end of the "activated" section. On the other hand I see your problem too: what if you add a button or key programming via the FSUIPC interface? I personally only used the interface to verify which airplane name FSUIPC was using. Because I am using compound button programming most of the "online" programming is refused anyway. But just to satisfy my curiosity: what if you are making a mix of button programming for a mix of airplanes, where you program other buttons for already defined airplanes at different times? Are you creating each time "mini" sections at the end of the config, even if there is already a section defined for the same airplane? In any case thanks! hm
  9. Pete, I am not the programmer of FSUIPC, but somewhere you have to select the programmed button section in relation to the airplane name. I would program it as follows: name = the name of the plane known by FSUIPC section = the name of the section given by the programmer: if (!strnicmp(name, section, strlen(section)) { do the programmers section } And the section could be valid for one particulary airplane type, disregarding the paint it has, ex. We could specifie one section: [buttons.MiG-21UM long range] or even [buttons.MiG-21] instead of 3 same sections: [buttons.MiG-21UM long range paint 1] . . [buttons.MiG-21UM long range paint 2] . . [buttons.MiG-21UM long range paint 3] . . We could even even define one section for the different airplane types like the ones that are delivered with the Mig-21 by CS ( a version with one external fuel tank, a clean version and the long range with three external fuel tanks) or one section for all the Maule types (tri-cycle gear, amphibian and three differend kinds of taildraggers) etc. Just my thoughts... Regards hm
  10. Hi Pete, Me again. I try to make some programming for my airplanes, however, I have still difficulties with the aircraft specific sections: if an aircraft.cfg contains 3 different paints and I want to fly them all three, do I have to specify a section for each paint ? or can I use some shortcut in the specification ? Until now I found out that I have to specify a section for each paint, until the opposite is proved. BTW A programming trick: If you have to toggle a button with two different commands: 33=CP(+0,6)(+0,7)(F-0,31)0,0,C66224,0 ;Autostart Engines 34=CP(+0,6)(+0,7)(F+0,31)0,0,K112,11 ;Engine shut down (CTRL+SHFT+F1) 35=CU(+0,6)(+0,7)0,0,c1005,31 ;Toggle Engine Flag This one for the CS YAK-3 rear view mirror: 20=CP(+0,6)(+0,7)(F-0,30)0,0,C66294,0 ;(incr.visor) Rear-view mirror 21=CP(+0,6)(+0,7)(F+0,30)0,0,C66295,0 ;(decr. visor) " 22=CU(F+0,6)(+0,7)0,0,C1005,30 ;toggle mirror flag hm
  11. Hi Pete, Well I did some test and "programmed" a button via the FSUIPC interface in FS 9. This is the result: FSUIPC creates for some airplanes button programming sections that are only valid for a certain paint. [buttons.CS F-104 Starfighter] 0=P0,4,C65668,0 [buttons.CS Boeing 727-100] 0=P0,4,C65668,0 [buttons.CS Boeing 727-200 paint4] 0=P0,4,C65668,0 [buttons.Utva 75 Astra] 0=P0,4,C65668,0 [buttons.SIAI-Marchetti SF.260 Belgian Camo] 0=P0,4,C65667,0 [buttons.CS Yak-3 Paint1] 0=P0,4,C65666,0 [buttons.MiG-21UM] 0=P0,4,C66039,0 hm
  12. Hi, Maybe I am an irritating person, but I didn't need to ask this questions if it was documented! But it isn't !!! Not in the "FSUIPC Users Manual" nor in the "FSUIPC for Advanced Users" manual. hm
  13. Hi Pete, Welcome back; hope you enjoyed your holydays. I have some questions regardingbutton programming: first of all. How do I specify that a button programming section is valid for all paints because something strange is happening: for some airplanes I have to specify them, for other I don't have to do it. Next, I have to repeat the whole programming for the planes that I have defined a section. Would it not possible that in the future a section could be defined as being common to all planes, and that the sections devoted to certain planes could contain additions, modifications or deletions of some "common" rules: Something like this: [buttons.Common] 0=CP...... 1=CR...... 2=CP...... . . . 29=CP.... [buttons.CS727 *] valid for all paints 2=CP...... modification of rule 2 3= deletion of rule 3 30=CR..... addition of rules 31=CR..... [buttons.Mig-21 paint1] only valid for Mig-21 with paint 1 30=CR.... 31=CR.... etc. I know, I am a nuisance... Hugo
  14. Hi Pete, I have a request regarding an extension of the button programming without causing compatibility problems with earlier versions :wink: but I don't want to discuss this on a public forum :oops: . Can you sent me a valid email address ? My email program acts very strange if I reply on one of your earlier private emails. Hugo
  15. HI Pete, I have taken the two sections of the "advanced". Surely it must be a typo. ------------------------------------------- 220 \ | is in the 4th row down, to the left of all the alpha keys 188 , < is also in the 4th row down, to the right of the alpha keys 190 . > is to the right of 188 191 / ? is to the right of 190 The value is a combination (add them) of the following values, as needed: 1 Shift 2 Control 4 Tab 8 Normal (add this in anyway) 16 Alt (take care with this one—it invokes the Menu) If only “normal” is needed, the whole parameter and the preceding comma can be omitted. Usual values are: 9 for shift+ … 10 for control+ … 11 for shift+control+ … For FS controls the is a number from 65536 upwards, denoting the specific FS control number. Lists of these can be found in my various FS controls documents. In the FSUIPC Buttons page the controls are shown by ---------------------------------------------------------------- Keyboard Programming FSUIPC’s options dialogue provides a page for programming keypresses to assign specific single FS controls. Here we look at how this programming is encoded in the FSUIPC.INI file, and how the programming can be extended to provide multiple controls for a single keystroke combination. FORMAT OF KEY DEFINITIONS The key programming is saved in a section in the INI file called [Keyss]. Up to 256 separate entries defining key actions can be included in this section, normally numbered sequentially from 0. The format of each entry in the Keys section is as follows: n=key,shifts,control,parameter for a key press action only, or n=key,shifts,control1,parameter1,control2,parameter2 for a key with press (1) and release (2) actions. Here n can run from 0 to 255 (i.e. maximum 256 different keystroke actions can be added), key virtual keycode, as in the FS CFG file (see list above, in the section about Buttons). shifts 8 normal +1 shift +2 control +4 alt (not really very useful) +16 tab (an added "shift" to give more combinations)control FS control number (as in my lists), or special FSUIPC number for additional controls (these range from 1000 to 3000 at present: see list below). parameter value to go with control, for "SET" types and some special FSUIPC controls. ------------------------------------------------------- I made a mistake too, and much worse :oops: because it locks the computer. In my previous message 7=CP(+0,7)(F+0,12)0,7,C1004,12 must be: 7=CP(+0,7)(F+0,12)0,6,C1004,12 Pete, I surely will make a better description of what I have done, but please correct my text then to make it more "english". English isn't my mother tongue. Hugo
  16. Hi Pete and all, It works, however it was more complex than I assumed. First of all I made my flag conditions wrong "(+F..." in stead of "(F+..." , the {Keyss} definition doesn't seem to work. But I am a little bit confused here because the combination for shift, alt, ctrl and tab seems different for "key input" as for "key output". If I use tab the second parameter has to be 8 + 16 (24), on the other hand if I want to generate TAB-F1 the 4th parameter would be 12 ??? ex. "0=P1,3,112,12" I have programmed my key combinations as follows: ;[Keyss] ;0=112,24,C1003,10 [buttons] ; ;7 up, 6 down, set flag 11 ; 0=CP(-0,7)0,6,C1003,11 ; ; Is flag 11 set and 6 released, clear flag 11 ; 1=CU(F+0,11)0,6,C1004,11 ; ; 6 up, 7 down, set flag 12 ; 2=CP(-0,6)0,7,C1003,12 ; ; Is flag 12 set and 7 released, clear flag 12 ; 3=CU(F+0,12)0,7,C1004,12 ; ; Here is the trick: if we push 6 before 7 then flag 11 is ; set (because we pushed 6 first and satisfied rule 0), so if ; 6 is down and flag 11 set and 7 is down reset flag 11 ; 4=CP(+0,6)(F+0,11)0,7,C1004,11 ; ; Now set the flag 13 for the 6 and 7 down ; 5=CP(+0,6)0,7,C1003,13 ; ; If flag 13 is set and we release button 7, reset flag 13, rule 9 will ; reset the flag if we release button 6 first :) ; 6=CU(F+0,13)0,7,C1004,13 ; ; Now we use the same trick but we pushed button 7 before 6, so rule 2 ; was satisfied first, so we need to reset flag 12 ; 7=CP(+0,7)(F+0,12)0,7,C1004,12 8=CP(+0,7)0,6,C1003,13 9=CU(F+0,13)0,6,C1004,13 ; ; We didn't use a flag for 6 and 7 up (difficult to program :( ) ; 10=CR(-0,6)(-0,7)0,0,C65588,0 11=CP(-0,6)(-0,7)0,1,C65570,0 12=CR(-0,6)(-0,7)0,2,C65607,0 13=CR(-0,6)(-0,7)0,3,C65615,0 14=CP(-0,6)(-0,7)0,4,C65758,0 15=CP(-0,6)(-0,7)0,5,C65759,0 ; ; So here we use flag 11 set as condition ; 16=CP(F+0,11)0,0,K192,1 17=CP(F+0,11)0,1,C65751,0 18=CR(F+0,11)0,2,C65771,0 19=CR(F+0,11)0,3,C65769,0 20=CP(F+0,11)0,4,C65589,0 ; ; And we use flag 10 to make a different command if flag 10 is set or not ; toggle tail hook or toggle wing fold ; 21=CU(F+0,11)(F+0,10)0,4,C66390,0 22=CU(F+0,11)(F-0,10)0,4,C66391,0 23=CP(F+0,11)0,5,C66224,0 ; ; Here we use flag 12 as the condition ; 24=CP(F+0,12)0,1,C65858,0 25=CR(F+0,12)0,2,C65777,0 26=CR(F+0,12)0,3,C65775,0 27=CP(F+0,12)0,4,K83,8 28=CP(F+0,12)0,5,K83,1 ; ; And here flag 13, until the Keyss entry is solved we have to push ; 5, 6 and 7 to toggle flag 10 ; 29=CP(F+0,13)0,1,C66293,0 30=CP(F+0,13)0,5,C1005,10 Thats all :roll: Hugo
  17. Pete, Thanks for your patience and reactions. Now I am at home and can test the discussion of above. My first question however was related to this solution with the flags because at first I wanted to use two different fsuipc.ini's, one for the Mig and another one for the F 104. But :wink: In any case thanks again. Going back now to some "PLC programming" in fsuipc.ini :) Hugo
  18. HI Pete, Sorry but it isn't complicated at all, I want to eliminate keyboard entries as much as possible. I have a MS joystick with 8 buttons; I use buttons 6 and 7 to give, depending on their combined state, up to 4 different functions to the each of the other 6 buttons. Thats easy to program thanks to the compound button programming. Untill a few days back all was allright but I purchased the CS F104. I had allready the CS MIG21. I programmed for the MIG that the combination of 7 down, 6 up and 5 going down toggles the Airbrake and when 5 goes up also the dragshute was activated. The last command is by the Mig21 coupled to "toggle tail hook", with the F104, however, the command toggles indeed the tailhook and the drag shute is coupled to "toggle wing fold". Therefore I use a flag which I programmed with TAB-F1, to make a difference between The Mig and the Starfighter. In that case however I should program something like this for the drag shute: 20=CU(-0,6)(+0,7)(-F0,10)0,5,C66391,0 21=CU(-0,6)(+0,7)(+F0,10)0,5,C66390,0 That's invalid, so I decided to use a flag to follow the button combination: 0=CP(-0,7)0,6,C1003,11 1=CU(-0,7)0,6,C1004,11 IMHO this means: is button 7 up and 6 goes down, set flag 11, if button 7 is up and button 6 goes up, reset flag 11. Maybe it is better to change this to: 0=CP(-0,7)0,6,C1003,11 1=CU(+F0,11)0,6,C1004,11 Now I have coupled the condition of both buttons to 1 flag and can I change this: 20=CU(-0,6)(+0,7)(-F0,10)0,5,C66391,0 21=CU(-0,6)(+0,7)(+F0,10)0,5,C66390,0 to: 20=CU(+F0,11)(-F0,10)0,5,C66391,0 21=CU(+F0,11)(+F0,10)0,5,C66390,0 which seems to me valid, or ...not? Why then? hm
  19. Hi Pete, Sorry to bother you again. But I tried your advise with something like this {Keyss} ;TAB-F1 toggles flag 10 (0 = Mig21, 1 = F104) 0=112,16,C1005,10 {Buttons} ; -7, +6 sets Flag 0,11 0=CP(-0,7)0,6,C1003,11 ; reset flag 1=CU(-0,7)0,6,C1004,11 ; -6, +7 sets Flag 0,12 2=CP(-0,6)0,7,C1003,12 ; reset flag 3=CU(-0,6)0,7,C1004,12 . . ; +5, +6 , -7 toggle airbrake; 19=CP(+F0,11)0,5,C65589,0 ; toggle drag chute when 5 comes up again ; = tail hook on Mig21, wing fold on F104 20=CU(-F0,10)(+F0,11)0,5,C66391,0 21=CU(+F0,10)(+F0,11)0,5,C66390,0 It didn't work :cry: but while I am typing this I see a possible problem. I should place rules 1 and 3 last in the definition, isn't it :oops: ? But in any case it does not declare why rule 19 wouldn't work. Can you point me to the problem? hm
  20. Hi Peter, If I could make AND functions between 3 or more buttons/flagsI think it is now limited to 2. Or maybe an Button definitions IF (flag) Button definitions . . ELSE Button definitions . . ENDIF Button Definitions . . in FSUIPC.INI ? BTW My sincere congratulations with your award. Hugo
  21. Hi, I have some problems when I want to use more than one fsuipc.ini (fsuipc_1.ini and fsuipc_2.ini, the files are containing a small difference in button programming). Therefore I have two shortcuts created to FS9, one is containing ...fs9.exe /CFG:FS9_1.CFG the other one ...fs9.exe /CFG:FS9_2.CFG. Both containing fs9x.cfg's are containing a section: {FSUIPC} <-- brackets of course ControlName=fsuipc_x where x is "1" or "2" I have two problems: First of all there is no FSUIPC button programming anymore when running fs9 (the fsuipc_x.ini isn't read?) and secondly the section {FSUIPC} is disapeared from the fs9_x.cfg when FS9 is closed. BTW something weird: the fs9x.cfg's have to be in the FS9 main folder or are created in the fs9 main folder; I had an error in the fs9.cfg name of the shortcut and FS9 started like a fresh installation and created the fs9xx.cfg file in the FS9 "root". What is wrong or what am I doing wrong ? hugo
  22. Hi Tony, First: What you need is the "FSUIPC for Advanced Users" manual and "FS2004controls", the first can you find in the "modules" folder of fs2004, the latter you have to download it here: http://www.schiratti.com/dowson.html The rest I will explain with the configuration I am using with the sidewinder: First you have to open the FSUIPC.INI file with notepad. This file is also located in the Modules folder. I hope you can handle the most common commands of notepad like "copy" and "paste" etc. ? To start copy the next rows at the end of the FSUIPC.INI file, so you have already something to do tests with: [buttons] 0=CR(-0,6)(-0,7)0,0,C65588,0 1=CP(-0,6)(-0,7)0,1,C65570,0 2=CR(-0,6)(-0,7)0,2,C65607,0 3=CR(-0,6)(-0,7)0,3,C65615,0 4=CP(-0,6)(-0,7)0,4,C65758,0 5=CP(-0,6)(-0,7)0,5,C65759,0 6=CP(+0,6)(-0,7)0,0,K192,1 7=CP(+0,6)(-0,7)0,1,C65751,0 8=CR(+0,6)(-0,7)0,2,C65771,0 9=CR(+0,6)(-0,7)0,3,C65769,0 10=CP(+0,6)(-0,7)0,4,C65589,0 11=CU(+0,6)(-0,7)0,4,C66391,0 12=CP(+0,6)(-0,7)0,5,C66224,0 13=CP(-0,6)(+0,7)0,1,C65858,0 14=CR(-0,6)(+0,7)0,2,C65777,0 15=CR(-0,6)(+0,7)0,3,C65775,0 16=CP(-0,6)(+0,7)0,4,K83,8 17=CP(-0,6)(+0,7)0,5,K83,1 First of all each row is numbered in increasing order. I am using compound commands, and as such I can assign to button 1 to 6 up to 4 functions and with a little trick even more. I am using a combination of button 7 and 8 (both buttons off, 8 on and 7 off, 7 on and 8 off, 7 and 8 on, but not used yet in my configuration) to select which of the four commands is executed for the rest of the buttons at a certain moment. One remark, however: the buttons on the joystick are numbered from 1 to 8, in FSUIPC.INI from 0 to 7, so button 0 in FSUIPC.INI is button 1 on the joystick and so on. Let us start with my configuration on row 16 and 17: 16=CP(-0,6)(+0,7)0,4,K83,8 17=CP(-0,6)(+0,7)0,5,K83,1 We use the command "CP" for "compound" and "pulse", which means that the command is only executed once, when the button goes down. Between the parentheses is the first button of the compound combination, here (-0,6), button 6 (7 on the joystick) from joystick 0 (you can attach more than one joystick at your computer, so your second will be numbered 1, your third 2 and so on). The minus sign defines that this button must be up. The next button definition between parentheses (+0,7) defines that button 7 (8 on the joystick) of joystick must be down or pushed. After the closing parenthesis is the button defined that activates the command, namely on row 16, button 4 (5 on the joystick) and in row 17, button 5 (6), both of joystick 0). The next value "K83" defines that the button combination simulates a key hit on the keyboard and you can find in the "FSUIPC for Advanced Users"manual a table with the numbers, in this case key "S", the command used to change to the next view. You can also find in the manual that the next value in the row defines which key combination is used together with the "S" and the value "8" in row defines that it is only "S", so in this case if I push key 8 and key 5, the flight simulator shows me the next view, example from 2D-cockpit to VC. In row 17, the last value 1 defines that the command simulates "shift-S", so to switch to the previous view (from VC to 2D-cockpit by example) I hold button 8 down and push button 6. Let us take now row 10 and 11: 10=CP(+0,6)(-0,7)0,4,C65589,0 11=CU(+0,6)(-0,7)0,4,C66391,0 Well, first of all you see here that it is a combination of button 6(7) down and button 7(8) up). Now Peter has made a fine job here: I am also a fan of the CS MIG21 which has a air break (spoiler) and a dragshute. I have used both commands on a single key. Now if you look to the FS2004controls you can find that command 65589 is "SPOILERS_TOGGLE", and command 66391 is "TOGGLE_TAIL_HOOK_HANDLE". We use both commands and like before CP is executed when button 4(5) goes down (the Spoiler activates) and CU is executed when button 4(5) goes up again. This command activates on the CS Mig21 the dragshute. So when I hold button 6(7) down and I push button 4(5), the spoiler activates. I wait until the speed is decreased a bit and I release button 4(5) again and the dragshute opens. When the speed is as low as the taxi speed, I do this again and the spoiler deactivates and when button 4(5) goes up again, the dragshute is released. Another plane I love to fly with is the Marchetti SF260 from RealAirSimulations: 2=CR(-0,6)(-0,7)0,2,C65607,0 3=CR(-0,6)(-0,7)0,3,C65615,0 8=CR(+0,6)(-0,7)0,2,C65771,0 9=CR(+0,6)(-0,7)0,3,C65769,0 14=CR(-0,6)(+0,7)0,2,C65777,0 15=CR(-0,6)(+0,7)0,3,C65775,0 If you look at the previous rows, you see that I use the command "CR", which means that the command will be repeated until the command button is released. If you check the command list, you will find that 65607 is ELEV_TRIM_DN, 65615 is ELEV_TRIM_UP, 65771 is PROP_PITCH_DECR and 65769 PROP_PITCH_INCR, 65777 is MIXTURE_DECR and 65775 is MIXTURE_INCR. Now as long as I push button 2(3), without 6(7) or 7(8), I am trimming down, with button 3(4) I am trimming up, If I hold button 6(7) down then as long as I push button 2(3), I am decreasing the propeller pitch but with button 3(4), I am increasing it. (You can nicely watch the handles in the VC :-) ). The same is thrue for the mixture in combination of button 7(8). Of course this is a small part of the combinations that are possible. I hope this "small explanation" makes "button programming" more comprehensible for you. The manual shows you a lot more details. Oh yeh, I forgott: you have to dissable in FS2004 the joystick button assignements of the buttons programmed in FSUIPC.INI to avoid double commands. I have deleted all assignements except the ones of the hat switch. My excuses for my bad english. Regards, hm
  23. Hi Pete, It does! Thank you very much for this new feature. I think that the powerfull joystick button programming is not well known by the every day user (Maybe because it is described in the "FSUIPC for Advanced Users" :roll: ), but in my opinion that alone (with the many other features) makes FSUIPC the BEST addon for FS2004 :D . Thanks again. hm
×
×
  • 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.