MortenHa Posted August 8, 2005 Report Posted August 8, 2005 Hi Peter! Have a question that I'm not sure where to post as it involves three different software developers. They are: 1. your FSUIPC/WideFS package 2. opencockpits.com 3. Florian Praxmarer's SA_WXR So I'll post this on all three associated forums: First of all, an overview: We want to use the FSUIPC offsets 0x6D00 and 0x6D02 provided by SA_WXR for controlling the radar. We use IOCard from http://www.opencockpits.com to manipulate and read status of FSUIPC offsets. Our setup is as follows: PC1: FS2004 (thus the FSUIPC and WideServer modules) IOCard software interface (IOCard driver) PC2: WideClient.exe SA_WXR software (simulating Collins weather radar) We have tried to programme the following switches: WX ON/OFF (setting/clearing Bit0 at 0x6D00 in control mode) WX+T ON/OFF (setting/clearing Bit1 at 0x6D00 in control mode) GCS ON/OFF (setting/clearing Bit2 at 0x6D00 in control mode) OFP ON/OFF (setting/clearing Bit3 at 0x6D00 in control mode) But it doesn't seem to work! Peter: Do I need to add something to wideserver.ini and wideclient.ini? So that SA_WXR on PC2 sees that these offsets have been manipulated on PC1? ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- We also want to programme the tilt angle using a rotary switch (we know that a rotary encoder would be more efficient, but we don't have it): The rotary switch has been set to give us 9 detents (It is 12 detents switch, but because if IOCard common ground limitations, we are forced to use only 9) We use the following spacing: -15deg, -10deg, -5deg, -2.5deg, 0deg, 2.5deg, 5deg, 10deg, 15deg (Please comment on the spacing Florian, is it efficient?) But we have a problem defining this in the IOCard programming software. It allows us to define variables associated to different FSUIPC offsets, and then use switches/encoders to manipulate them. To manipultate the tilt angle, we need to control the upper byte of 0x6D00. and this is not possible in IOCard programming software. Not at first glance at least. But is the following tweak possible: Define an byte offset at 0x6D01 and manipulate this? Peter, Florian, Manolo? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Bit7 at 0x6D00 needs to be set for the control mode to work. with IOCard variables one can set an initial startup value for any given offset. So by setting offset 0x6D00 to 64 (decimal) at startup will set the controlmode? Florian? Peter? Manolo? I hope this is an understandable post, and that any of you can answer it in part.
Pete Dowson Posted August 8, 2005 Report Posted August 8, 2005 Have a question that I'm not sure where to post as it involves three different software developers. ... We have tried to programme the following switches: WX ON/OFF (setting/clearing Bit0 at 0x6D00 in control mode) WX+T ON/OFF (setting/clearing Bit1 at 0x6D00 in control mode) GCS ON/OFF (setting/clearing Bit2 at 0x6D00 in control mode) OFP ON/OFF (setting/clearing Bit3 at 0x6D00 in control mode) What does "control mode" mean? But it doesn't seem to work! What doesn't? The bits don't change or SA_WXR doesn't see the change? Try using FSUIPC's logging, or even the real-time on-screen Monitoring -- with the latter you can display the value in 6D02 on the FS screen and see if it does actually change when you press your switches or buttons. Do I need to add something to wideserver.ini and wideclient.ini? So that SA_WXR on PC2 sees that these offsets have been manipulated on PC1? No. The offsets are actually in FSUIPC and any client connected will see any changes made by anything on the FS PC or any client. That's the whole point really. Bit7 at 0x6D00 needs to be set for the control mode to work. with IOCard variables one can set an initial startup value for any given offset.So by setting offset 0x6D00 to 64 (decimal) at startup will set the controlmode? Florian? Peter? Manolo? I doubt it. Bit 7's value is 128 not 64. Bits are counted from 0 normally. Does it stay in control mode from then on? When you change the other bits are you "OR'ind" them in and "AND'ing them out? If you are simply writing a fixed number you'd lost bit 7, so you may need to add 128 first. Only the other two can answer this last bit I'm afraid. I don't know what they have implemented. Regards, Pete
MortenHa Posted August 8, 2005 Author Report Posted August 8, 2005 AAAH! 128 of course! You have been most helpful Peter! How about the "bogus" offset at 0x6D01, in your opinion could it work? The offset 0x6D00 is defined as word. but I only need to control the upper byte (Bit8 through Bit15).
Pete Dowson Posted August 8, 2005 Report Posted August 8, 2005 How about the "bogus" offset at 0x6D01, in your opinion could it work? Well, I don't really understand what the problem was in the first place, but I presume your proposal would depend on the programming of Mr. Praxmarer. I'm afraid I don't know the capabilities and restrictions of your switch interface control program -- it seems to have some odd restrictions (like only being able to have one reference to any offset or bit?) I wonder why there's such a restriction. It must make a lot of things difficult. Wouldn't it be better, for the longer term, to get the author of that program to make the change, instead? Regards, Pete
MortenHa Posted August 8, 2005 Author Report Posted August 8, 2005 I've found the problem. The initial value should have been 128 not 64 to set bit7. (goes to tell that my knowledge on binary numberbase is not good) Everything else has fallen into place. And yes you can define the offset byte at 0x6D01 to control the tilt We are happy men :D And you're right, the programming interface is bad. They have a better one called SIOC. We will soon move to that interface... :wink: Thank you Peter for your patience!
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