Im trying to calibrate an altimeter barameter knob to change the QNH in FSX using a pot. Below is the script Im trying to use. I have the pot assigned to custom offset $66C4 in FSUIPC. My problem is that I get only get a small amout of turn in the pot and the barometer in FSX makes all of its revolutions. Which values do I change so I can calibrate the pot to turn its full range in synch with the barometer knob in FSX?

This is my setting in FSUIPC
[Axes]
0=0Y,32,F,x030066C4,0,0,0,*0.313,+512

SIOC

Var 2002, name QNHAd_C, static, Link FSUIPC_IN, Offset $66C4, Length 4
{
CALL &QNHScale_C
}
Var 9033, name QNHScale_C, Link SUBRUTINE
{
L0 = &QNHAd_C
L2 = L0
IF L0 < 2800 // 2800
{
L1 = 15168 // 15168
}
ELSE
{
L2 = L0 - 699 // 2800
C0 = &QNHAd_C >= 699 // 2800
C1 = &QNHAd_C <= 3983 // 3938
IF C0 AND C1
{
L1 = L2 * 5.71831
L1 = ROUND L1
L1 = L1 + 15152 // 15152
}
ELSE
{
IF L0 > 983 // 3938
{
L1 = 16792 // 16792
}
}
}
&QNHset_Offst = L1
}


thanks,
Justin