Something else that been bugging me for a long time. My Barometric Pressure encoder changes the QNH in increments of .03 rather than .01. Is there a way to correct that in my SIOC code?



Var 0053, name E_BARO, Link IOCARD_ENCODER, Input 65, Aceleration 1, Type 2
{
L0 = &E_BARO * -1
&SUB_BAR = &SUB_BAR + L0
}

Var 0054, name E_MIN, Link IOCARD_ENCODER, Input 63, Aceleration 1, Type 2
{
L0 = &E_MIN * 100
&SUB_DH = &SUB_DH + L0
}

Var 0055, name SUB_DH, Link SUBRUTINE
{
IF &SUB_DH > 20000
{
&SUB_DH = 20000
}
IF &SUB_DH < 0
{
&SUB_DH = 0
}
L0 = DIV &SUB_DH ,100
&PM_DH = L0
}

Var 0056, name SUB_BAR, Link SUBRUTINE
{
L0 = &SUB_BAR * 16
&FS_QNH = L0
}

Var 0057, name SUB2_DH, Link SUBRUTINE
{
IF &SUB2_DH > 20000
{
&SUB2_DH = 20000
}
IF &SUB2_DH < 0
{
&SUB2_DH = 0
}
L0 = DIV &SUB2_DH ,100
&PM2_DH = L0
}

Var 0058, name SUB2_BAR, Link SUBRUTINE
{
L0 = &SUB2_BAR * 16
&FS2_QNH = L0
}

Var 0059, name COD_ELAN, Link FSUIPC_INOUT, Offset $04F2, Length 2

Var 0060, name PM_MODO, Link FSUIPC_INOUT, Offset $04F4, Length 2 // PM_EFIS_MODO

Var 0061, name PM_RANG, Link FSUIPC_OUT, Offset $04F8, Length 2 // PM_EFIS_RANG

Var 0062, name PM_DH, Link FSUIPC_OUT, Offset $04FA, Length 2 // PM_EFIS_DH

Var 0063, name FS_QNH, Link FSUIPC_OUT, Offset $0330, Length 2 // FS_QNH_MB

Var 0064, name PM2_RANG, Link FSUIPC_OUT, Offset $5524, Length 2 // PM_EFIS_RANG FO

Var 0065, name PM2_DH, Link FSUIPC_OUT, Offset $5532, Length 2 // PM_EFIS_DH FO

Var 0066, name FS2_QNH, Link FSUIPC_OUT, Offset $552E, Length 2 // FS_QNH_MB FO


Var 0094, name E2_BARO, Link IOCARD_ENCODER, Device 12, Input 20, Aceleration 1, Type 2
{
L0 = &E2_BARO * 1
&SUB2_BAR = &SUB2_BAR + L0
}

Var 0095, name E2_MIN, Link IOCARD_ENCODER, Device 12, Input 23, Aceleration 1, Type 2
{
L0 = &E2_MIN * 100
&SUB2_DH = &SUB2_DH + L0
}

Jerry