PDA

View Full Version : Visual Basic Express and Simconnect



DarylL
11-26-2007, 02:02 PM
Good day all;

I recently had problems with my fs2phidgets and as a result decided to 'get rid of' the middleman. I have begun writing my own interface program using VB Express.

Essentially, I have created a panel page which on an experimental basis, works fairly well. (further 'tweaking needed'). From the panel page I open a flight controls page which is populated by a throttle trackbar, an elevator trackbar, an aileron trackbar, and a rudder trackbar. The controls page works at this point, however I am only getting half values. For example... ailerons will only go to the left and the throttle will inly register from 50% to full. (Rudders are the only item that do not work - it doesn't seem to recognize "AXIS_RUDDER_SET"

Simconnect Aileron offset values are 16383 to -16383 however, when I perform calculations to go into the negative side... I get an error message "overwright - not divisible by 0"

Are there any VB programmers out there who might know how to resolve this, I am comfortable in VB but by no means an expert? My form and its code are attached below.

Eventually, Phidgets will be programed in to sync with the trackbars and switches on the main panel screen.


code attached.

Thanks in advance;
Daryl
Living Sky Aerobatics (http://www.livingskyaerobatics.com)