737SimGuy
-
Posts
40 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by 737SimGuy
-
-
Hi Pete,
I am investigating the simplest way to trigger a FSUIPC button event from Epic USB *without using a traditional joystick interface with Game Controllers*. I am experimenting with offset 3340 also, but I have a question regarding how you get the switch data from Epic.
Does FSUIPC or EPICINFO.DLL get switch data from the Epic event queue (i.e. - Enque16(BtnOn,0x0100) etc) or do they require a joystick device to be recognized in Game Controllers, either HID or other?
Thanks,
James
-
Hi Pete,
I am happy to say that it appears the scaling is working properly now! Thank you very much for the repair. If I find any other anamolies I will post them for you.
If there is any way I can help in the future please let me know...
Thanks again,
James
-
Pete,
OkayI'd obviously forgotten a *lot* about EPICINFO.
You and me both!
... and it definitely means I can see a future for it, or an equivalent facility possibly built into FSUIPC, for FSX and beyond. I'll just need someone around like your good self to test it on real EPICs for me! .
Excellent! I'll do what I can! ;-)
As far as I can see this error has ALWAYS been there, it is an integral part of the way it was coded way back when. I don't know what you did originally to get around this nor why you remember it differently -- what HAS happened in between, for you?
I have no idea how I got it to work before! The more I look at it, the more I am stumped!
Anyway, I've fixed it (one line) and I am attaching 4.23 -- the first update for nearly 3 years as far as I can tell! Please confirm it's okay for you now.
Wonderful! Thank you for the speedy fix! I will report my progress.
Oh, one minor thing. I think the correct SCALE lines you want should be:
PLANE_PITCH_DEGREES=Scale 360,-179,181
PLANE_BANK_DEGREES=Scale 360,-179,181
The RANGE you want is 360 (0-359), and the upper limit of the input is 181 (this is exclusive, as documented, making the max acceptable 180).
Ok, perfect, thank you, will give it a go!
-
Hi Pete,
Well, I made a log from FS2002 and I'm afraid the data appears identical to FS2004. I'm not quite sure why my old EPIC D code ever worked before! The only change would be possibly FSUIPC. Both EPIC's get the same data in the PH's. I suppose I could try an old version of FSUIPC to see if the data is different?
One thing that is obvious though is that the scaling values appear correct in bytes 0&1 but not in bytes 2&3. Bytes 2&3 still have the 32767 added when the number is negative. For the time being I will use bytes 0&1 and convert to 16 bit.
Any ideas on how to proceed from here? I am a poor troubleshooter. The goal for me is to get the scaled value in bytes 2&3. I will ask Ralph to look at it also.
Thank you,
James
-
Pete,
I will try to get some FS2002 data for you. If you prefer not to fiddle with this, since EPIC seems almost extinct in the ever expanding world of flight simulation, I am willing to modify your source code for my purposes.
Thanks for your time,
James
-
Pete,
Maybe we could have been more productive here if you'd pointed out where your concern lay initially?Yes, I imagine we could have. I have never been good at troubleshooting.
Anyway, I'm not sure how you work out that you are getting negative numbers.Your docs for Epicinfo state that PLANE_BANK_DEGREES will return a value range of -179 to 180 (without scaling), and that if the number is negative then 32767 will be added.
Somehow you seem to be asking for a value, returned by FS, which is in the range 0-359 already to be scaled to a range of 0-360not sure why.Maybe FS2002 returned the vaues -179 to +180, not 0-359? You seem to forget that I haven't changed EPICINFO between version 4.22 which you say was okay, and version 4.22 which you say is not? So why point at EpicInfo?
Maybe that is the key? Is FS2004 returning 0-359 instead of what your docs say for Epicinfo of -179 to 180? I don't know. Is your "original value" showing what is actually being returned from FS? Even without any scaling I still get one side of the range with 32767 added.
Maybe FS2002 returned the vaues -179 to +180, not 0-359? You seem to forget that I haven't changed EPICINFO between version 4.22 which you say was okay, and version 4.22 which you say is not? So why point at EpicInfo?The reason I point at Epicinfo is because from what I can tell in the logs it is not returning the documented value for PLANE_BANK_DEGREES of -179 to 180 with the only change being FS2002 to FS2004 and a later version of FSUIPC.
James
-
Pete,
The problem lies when roll exceeds 180 degrees and and is presumably a negative number. The "original value" shows correct, but the PH13 bytes 2&3 value still has the 32767 added. It is my understanding that the scaling would return a PH value from 0 through 359 in bytes 2&3 if scaled to 360.
James[/code]
-
Hi Pete,
I'm not sure if you still support EPICINFO 4.22, but here is my issue:
It *appears* that scaling is not functioning correctly on at least
pitch and bank, I have not researched others as of yet.
Previous setup that seemed to work perfectly:
FS2002 w/patch
EPIC D card
EPICINFO 4.22
FSUIPC (older version, don't recall exact version)
New setup that does not work correctly:
FS2004 w/patch
EPIC USB firmware ver: 7.01
EPICINFO 4.22 (same Epicinfo.cfg as before)
FSUIPC 3.65
I have scaled roll thusly:
PLANE_BANK_DEGREES=Scale 361,-179,180
I am hoping for a number 0-360 but EPICINFO.LOG shows otherwise.
Ultimately I would like to scale it as PLANE_BANK_DEGREES=Scale 65536,-179,180 for a return of 0-65535, but that doesn't work either.
Here are the pertinate snippets of Epicinfo.log with the airplane in a roll to the left and samplings of data through the roll.
Am I doing something wrong???
Thanks,
James
********* EPICINFO Module, Version 4.22 (9DEC03) by Pete Dowson *********
Panel=AIRCRAFT\FA18\panel\panel.cfg
Epic Ref= Default
CFG: Reading C:\FS2004\EPICINFO.CFG
************************************************
CFG: Processing section [Default]
CFG: AxisReads=both
CFG: Log=2
CFG: SMCP=0
CFG: LogButtons=0
CFG: RESEND=511
CFG: Sets=MCP GPS
CFG: PLANE_PITCH_DEGREES=Scale 361,-179,180
CFG: PLANE_BANK_DEGREES=Scale 361,-179,180
EPICIO.DLL found: linking to it now ...
EPIC device USB0 Opened
453 SendQP(1, 100)
453 QP100 = Install Done
************************************************
453 SendQP(1, 103)
453 QP103 = Initialisation Done
453 PH013 = 079 001, 00179 [Hex 4F 01, B3 00], orig val=0 [0x0000000000000000] PLANE_BANK_DEGREES
453 PH014 = 079 001, 00179 [Hex 4F 01, B3 00], orig val=0.00203789 [0x3F60B1C500000000] PLANE_PITCH_DEGREES
1110 PH013 = 079 001, 00179 [Hex 4F 01, B3 00], orig val=0 [0x0000000000000000] PLANE_BANK_DEGREES
65500 PH013 = 088 001, 00188 [Hex 58 01, BC 00], orig val=7.57709 [0x401E4EEF63400000] PLANE_BANK_DEGREES
65641 PH013 = 090 001, 00190 [Hex 5A 01, BE 00], orig val=10.006 [0x40240311D9D00000] PLANE_BANK_DEGREES
66141 PH013 = 011 002, 00211 [Hex 0B 02, D3 00], orig val=30.8197 [0x403ED1D58FC80000] PLANE_BANK_DEGREES
66688 PH013 = 075 002, 00275 [Hex 4B 02, 13 01], orig val=95.0512 [0x4057C34645120000] PLANE_BANK_DEGREES
67141 PH013 = 050 003, 00350 [Hex 32 03, 5E 01], orig val=170.312 [0x406549F908540000] PLANE_BANK_DEGREES
67188 PH013 = 057 003, 00357 [Hex 39 03, 65 01], orig val=176.824 [0x40661A5E7DD50000] PLANE_BANK_DEGREES
67313 PH013 = 016 000, 32784 [Hex 10 00, 10 80], orig val=197.431 [0x4068ADC8E38D0000] PLANE_BANK_DEGREES
67407 PH013 = 030 000, 32798 [Hex 1E 00, 1E 80], orig val=211.348 [0x406A6B2689250000] PLANE_BANK_DEGREES
67813 PH013 = 097 000, 32865 [Hex 61 00, 61 80], orig val=278.26 [0x407164271F800000] PLANE_BANK_DEGREES
68282 PH013 = 071 001, 32939 [Hex 47 01, AB 80], orig val=351.631 [0x4075FA1791C68000] PLANE_BANK_DEGREES
68328 PH013 = 077 001, 32945 [Hex 4D 01, B1 80], orig val=358.417 [0x407666AB1EFC8000] PLANE_BANK_DEGREES
-
Try renaming the saved flight so when you load it it looks like a different one. You'll need to rename the WX file too to match.
Or you could try clearing all weather AFTER saving the flight and before reloading it.
With the right timing, and some experimentation, these two ideas working together solves the problem! Thank you very much for the ideas!
James
-
Hi Pete,
First the short version of my question ;-):
Is there a way to force the weather engine in FS2004 to refresh?
Now the long version of my question:
In my instructor station I have programmed the ability to apply an existing FS Weather Theme to the active flight by:
1. Save the current flight
2. Re-write the FLT file "Weather" section to reflect the weahter mode and theme desired.
3. Then re-load the newly written FLT file.
This all works perfectly. Problem being that FS2004 weather does not update to new theme. If I select the weather menu in FS it shows the correct theme selected. I have tried a flight reload via FS menu, scenery refresh via hotkey, and even selecting a new A/C, but nothing causes an update of the weather. If I select a different flight and then select my custom flight again, the weather updates to the correct theme.
Any suggestions on how I can force FS to recognise the theme specified in the FLT file?
Thank you,
James
-
Hi Pete!
I'll do some further investigation into all this and get back to you sometime, maybe this week, possibly with a test version. Okay?
Yes! That would be fantastic!!! I'll be here, no hurry! :D
James
-
Hi Pete,
Yes, ok, no problem. I'll write a stub for FS or use the shared name approach or something. Thanks for all the info!
-
Pete,
Ah, you won't be able to do that across a Network...Ah, rats. I was hoping that wasn't the case. You are no doubt dreading the next question , any chance you could add that path to a readable offset in a future release of FSUIPC? I'll make it user configurable for now.
Thanks Pete!
-
Thanks Pete, I'll give it a go. Do you forsee any problems doing this across a network using the FS path to SHFolder.DLL? I'll start experimenting...
-
Hi Pete,
With regard to FS2004. Can you suggest a way of determining the current user default .flt path (i.e. current user "My Documents...")? I realize I can save and load a FS .flt without specifying the path and FSUIPC will use the default .flt path automatically, and that works great. What I need is the current user's default path so I can use SendMessage to populate a listbox for selection of existing flights. This works quite well with a specified path, but I need to determine the user path automatically. I see I can get the path of the currently loaded flight, but I have no way of being sure that the flight was loaded from the default .flt folder.
Any suggestions?
Thank you,
James (Trying very hard not to confuse or frustrate you )
-
Pete,
Yes, but if these are merely static weather sets, as WX files would be, what is the difference, the advantage of themes over any savesd set of FLT+WX files?Well, other than being able to apply a theme to any flight in progress, I guess nothing. There obviously must be much more to all this than I will ever know. Maybe when more data about Themes is available we can then re-visit this.
Thanks Pete,
-
Hi Pete,
What's the point of themes if they are just static weather? Isn't that the same as defining static weather? I though themes had moving fronts, developing storms, stuff like that. A sort of "weather script".If not, what is the point of them?
The way I understand it they are there so that you can apply a pre-defined set of weather to any flight quickly, instead of building it through the weather dialogs. I was also under the impression that the weather would change based on the settings used for wind, season, etc, not from a script. Anyone else here know for sure?
It baffles me even further why you should need to develop weather in one form and convert it to another, especially if there's no programmatic element to it, like development over time.Colour me confused!
Well, if there is one thing I am good at, it is confusing you! :-) The whole point in doing this would be to allow the *end user*, not the programmer, to either download Themes or build them himself, then be able to select and load one via the Instructor Station without interupting a flight session in progress. That's all.
-
Pete,
I thought the scenarios included data about how things are to develop. Is this not the case?I don't recall there being any of that when I used the beta theme generator, but not sure.
When you've programmed a scenerio, where do you put it.../weather/themes
...and how do you load it? Is this all via the Themes list in the ALT W W dialogue?Yes. Quite clumsy. Was hoping for a more elegant solution but it is not a critical issue. Maybe someone down the line will develop a 'Theme-To-Text' converter or something, and then I could read the text and load the resulting weather via your NWI.
You know me, always looking for something to add! ;-)
Have a Happy New Year!
James
-
Hi Pete,
What sort of use would you see of such a facility?For our (and soon to be PFC) Instructor Station preset weather selection. I can of course program different scenarios myself, but this would allow a bit of flexibility for the end user. Just a thought.
I have been trying to figure out how to convert the binary wx theme to a flight wx file for loading with a flight, but no luck so far.
Santa did bring me a Hoverfly helo thoughHey, that looks like a lot of fun! Is there a helipad on your railway setup? ;-)
James
-
Hi Pete,
Any plans to incorporate FS9 Weather Scheme Selection via FSUIPC, similar to selecting and loading a saved flight?
Hope Santa was kind to you. Did he bring a PFC jet cockpit? ;-)
-
Hi Pete,
Exactly what I needed, thank you!
-
Hi Pete,
Was wondering if you could recommend the maximum amount of data to attempt to Write and then Process, in one pass. IOW:
FSUIPC_Write SomeData...
FSUIPC_Write SomeMoreData...
FSUIPC_Write SomeMoreData...
FSUIPC_Write SomeMoreData...
etc, and then
FSUIPC_Process
Trying to speed up Writing my analog values to FS. Right now I do a Process after each Write for each control value, but I am going to experiment with Writing all the control values first, then doing a Process.
Thanks!
James
-
Oopsy, sent you the wrong code, this is the correct one:
Public Sub MessageToFS(MessageString As String)
'send visible message to FS!
Dim dwResult as Long
Dim sString As String
Dim sDelayTime as Long 'will display for 20 seconds
sString = MessageString & vbNullString
If FSUIPC_WriteS(&H3380, 128, VarPtr(sString), dwResult) and FSUIPC_Write(&H32FA, 2, VarPtr(sDelayTime), dwResult) Then FSUIPC_Process (dwResult)
End Sub
-
This works here, just plop it in and use it...
Public Sub MessageToFS(MessageString As String)
'send visible message to FS!
Dim sString As String
sString = MessageString & vbNullString
FSUIPC_WriteS &H3380, 128, sString
FSUIPC_Write &H32FA, 2, 20 'will display for 20 seconds
End Sub
FSUIPC, EPIC button scanning
in FSUIPC Support Pete Dowson Modules
Posted
Hi Pete,
Yes, I guess we go back a long way ;-) And some of us still use it!
I am indeed using AxisReads=Enques in EpicInfo to read axis values through EPICIO.DLL, and I guess I was hoping the Epic switch events were captured also. Apparently not :-(
Ok, I will continue the offset 3340 route.
On another topic, I'm sorry I have not had a chance to test the new Epicinfo4, as I do not use FSX yet. But hopefully in the future...
Thanks Pete!
James