View Full Version : Rotary input for AUTOPILOT_ALTITUDE
jollyswagman
06-24-2005, 06:45 PM
Has anyone here got this working? I'm an experienced programmer but new to FS2Phidgets.
I can control the throttle with a slider but the autopilot altitude won't work when I assign a rotary to it.
Any ideas?
Thanks
Dave
alandyer
06-25-2005, 08:46 AM
Dave,
Try the following - works on my setup - Supplied FS2004 B747-400.
Set autopilot Altitude to 100
(also happens to be the value that MCP Autopilot increments/decrements)
Go into FS Edit Screen.
Write down the Raw value (should be 1997537).
This will be your Step value for calibration of Encoder.
Set low value to 0.
Set Autopilot Altitude in FS2004 to highest value you want to see for your particular aircraft. (You're still on FS Edit screen, right ?)
Set High Value (using Transfer button).
Save settings.
Exit FS Edit screen.
Unassign and reasign Autopilot Heading to encoder.
This will ensure your new settings will now be used.
Press "Calibrate" to set encoder step value to value you wrote down.
Enable component. Start Output.
PRESS SAVE - Save your settings.
This should get you out of the billabong.
Regards,
Alan.
jollyswagman
06-27-2005, 03:34 AM
Thanks Alan,
That worked a treat and has got me out of the (drought-parched) billabong!
It's a great little app - I see you're using VB6, are you looking at a .Net version? You might find that a lot of the support issues go away once your code runs on the .Net Framework (installation issues especially since .Net languages are sandboxed like Java - 'Managed' in MS-speak).
If so and you'd like a hand let me know. I'm a VB.Net developer, have been into FS since the subLOGIC days and having bought some Phidgets I'd like to get all three ideas together!
cheers
Dave
alandyer
06-27-2005, 12:35 PM
Dave,
You're not from Oz are you ?
I am in process of converting code to VB.NET.
(Not a trivial exercise)
Came to same conclusion you did regarding support.
Quick question - will everybody need to install DotNetRuntime or Framework ?
Is that now standard with XP ?
Regards,
Alan.
alandyer
06-27-2005, 12:37 PM
Dave,
Other reason I want to move to .net is improved memory managment.
Alan.
jollyswagman
06-27-2005, 02:56 PM
Hi Alan,
Yes from Oz - Newtown, Sinney, to be precise.. you?
.Net is a major leap for reliability, memory management, support, exception handling, you name it.
Your users need only to install the Framework runtime (~20Mb) not the Framework SDK (~250Mb).
The runtime's not standard on XP (but is on Windows Server 2003 and all new versions from now on). A lot of people would have it installed by now if they've installed apps like SharpReader.
If I could recommend one thing - set OPTION STRICT on (either in each class up the top or better still globally for your project(s). It makes you write better code e.g. no implicit conversions (e.g. double to int) - it's a pain at first BUT you will thank me later!
N.B. Scott's VB.Net wrapper won't compile with Option Strict on but you can put it in a separate class file (each class should be in its own file anyway) with OPTION STRICT OFF at the top. I'm going to try and tighten it up so it's strict but that will take a week or two.
cheers
Dave
alandyer
06-27-2005, 03:24 PM
Let me give you a clue where I'm from.
We're going to kick Wallabie's, All Black's and Lion's arse next Rugby World Cup.
Already played with Scott's .NET example.
Biggest advantage for my app is object inheritance.
By now we've got the whole FS2Phidget forum rolling their eyes.
I'll shoot you an email.
jollyswagman
06-27-2005, 11:17 PM
Hmmmm could you be a Springboks supporter?
I don't know much about rugby but the green and gold are not to be trifled with!
(unless you're a Bangledeshi cricket fan....)
I've enabled private email in my profile
cheers
Dave
imported_MattO
06-28-2005, 04:18 AM
Interesting reading......
Please don't stop here:)
Matt O.