PDA

View Full Version : Help with little (?) Sioc-Problem



skino
07-13-2011, 08:05 AM
I want to insert into this sioc code (compass), a key inquiry. "+" Key rotates one position to the right, "-" key on to the left. So I would like to adjust the USB-compass after power on with the position of the compass on the simulator


// *****************************************************************************
// * Config_SIOC ver 3.7B1 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
// * FileName : 360.txt
// * Date : 13.07.2011



Var 0000 // Motor 1 Data

Var 0015, Link FSUIPC_IN, Offset $02CC, Length 8, Numbers 1 // FSimulator Compass
{
L0 = V0015 + 1460 // Add 146 degree for my gauge center
IF L0 > 3600 // If is > 360 degree discount a full turn
{
L0 = L0 - 3600
}
V0000 = L0 // send degrees to steper motor"

*****************************************************************************

aVaTar
08-05-2011, 12:37 AM
So would you like to do "key inquiry" or initialize position of the hardware after power-on?