MatthiasS Posted May 1, 2004 Report Share Posted May 1, 2004 Hello Pete, I want to control Projectmagentas Boeing MCP via FSUIPC with my Epic ISA. After I did not get the wanted results, I reduced my EPL code to the absolute minimum, just to find out what is happening. This is what the code reads now: ------- definemodule(2,0,0,16) #include EPICVXD.INC :head_inc{enque16(BtnToggle,170)} definebutton(242,on,head_inc) ------- In the "Options and settings" dialog of FSUIPC I defined this button to increment the PM MCP heading by 1. I would await that EVERY press of the button would result in an increase of the heading value. But what I see is an increase of the value with exactly EVERY SECOND button press (also when there is a long time between these button presses). Later I found that already FSUIPC does only recognize every 2nd button press. With test128.exe all is ok. Do you have any idea of what could be the problem? Btw: It is nice to read that you and other flight simmers are also interested in steam railways, like me. I am also interested in steam engines in general. Hope I can visit the Dorset Steam Festival one time. It must be impressive! Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 1, 2004 Report Share Posted May 1, 2004 I would await that EVERY press of the button would result in an increase of the heading value. But what I see is an increase of the value with exactly EVERY SECOND button press (also when there is a long time between these button presses). Later I found that already FSUIPC does only recognize every 2nd button press. I have EPIC buttons here which work okay, but on a USBEPIC. FSUIPC only recognises the change from the button state being zero (off) and non-zero (on). For normal buttons this should be okay. I see you are using "BtnToggle" for the Enque action. Why? Please read my Epic documentation. For "BtnToggle" it reads: Sometimes you may want one press of a real button on your cockpit to set one of the Windows-detectable buttons ‘on’, and the next press to turn it ‘off’. which explains EXACTLY what you are seeing. Please consider how you want to use your buttons and select the more appropriate action. Just a simple BtnPulse might be okay for this sort of use, but if you want to be able to hold it pressed for repeat actions you program the On and Off for press and release separately. With test128.exe all is ok. That doesn't access the buttons through the VXD at all. You should check things with my own utility, IsEpic or something like that. (Sorry, I've not used an ISA EPIC for many years -- I have no computers left with ISA slots!). Also check the buttons with the Windows Game Controller. Regards, Pete Link to comment Share on other sites More sharing options...
MatthiasS Posted May 1, 2004 Author Report Share Posted May 1, 2004 Hello Pete, Thank you very much for your quick and very detailed answer. I am now using separate BtnOn and BtnOff commands which works fantastic. I am sorry to ask a question that is answered already from your manual but I think my English is not the best. So I thought I should avoid BtnPulse but BtnToggle would be OK... Thank you again! Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 1, 2004 Report Share Posted May 1, 2004 I am sorry to ask a question that is answered already from your manual but I think my English is not the best. No problem, don't worry about it! Good flying, 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