Ah ok
Now my memory is bad so I am not sure the best way to explain without getting really into the swing of things again but if memory serves this is "bitwise operations"
The state of the 8 bits held in the offset determine which lights are on/off...my description might be bad but this code works. clips from my CPP file
So taking you example of 9402 .
The remarked out (//) ones are entries ready for the correct CID/RID's where I have change my boards around
at the top where you declare stuff
// fwdoverhead.by John with masses of help from Ciccio
#define ZERO 0x01
#define ONE 0x02
#define TWO 0x04
#define THREE 0x08
#define FOUR 0x10
#define FIVE 0x20
#define SIX 0x40
#define SEVEN 0x80
#include "stdafx.h"
//Annunciators
//Offset9402
//MkFsbusObject (BTP_D_OUT, ANNUN_DUCT_OVEHEAT_1, "", EventHandlerFwdOverhead,X,XX,0); //CHANGE CID X AND XX CONNECTOR TO SUIT PANEL
// MkFsbusObject (BTP_D_OUT, ANNUN_DUCT_OVEHEAT_2, "", EventHandlerFwdOverhead,X,XX,0); //CHANGE CID X AND XX CONNECTOR TO SUIT PANEL
// MkFsbusObject (BTP_D_OUT, ANNUN_DUCT_OVEHEAT_2, "", EventHandlerFwdOverhead,X,XX,0); //CHANGE CID X AND XX CONNECTOR TO SUIT PANEL
MkFsbusObject (BTP_D_OUT, ANNUN_RAM_DOOR_FUEL_DOOR_1, "", EventHandlerFwdOverhead,8,32,0);
MkFsbusObject (BTP_D_OUT, ANNUN_RAM_DOOR_FUEL_DOOR_2, "", EventHandlerFwdOverhead,8,33,0);
MkFsbusObject (BTP_D_OUT, ANNUN_PACK_TRIP_OFF_1, "", EventHandlerFwdOverhead,8,55,0);
// MkFsbusObject (BTP_D_OUT, ANNUN_PACK_TRIP_OFF_2, "", EventHandlerFwdOverhead,X,XX,0); //CHANGE CID X AND XX CONNECTOR TO SUIT PANEL
MkFsbusObject (BTP_D_OUT, ANNUN_WING_BODY_OHEAT_1, "", EventHandlerFwdOverhead,8,52,0);
then further down the script the case statement to handle it
case FS_9402_ANNUNS:
// printf(" OFFSET 9402 READS ( %d )", Value);
// if (Value & ZERO ){ FsbusWrite(ANNUN_DUCT_OVEHEAT_1, 1);} //next board
// else if (Value | ZERO){FsbusWrite(ANNUN_DUCT_OVEHEAT_1, 0);} //next board
// if (Value & ONE ){ FsbusWrite(ANNUN_DUCT_OVEHEAT_2, 1);} //next board
// else if (Value | ONE){ FsbusWrite(ANNUN_DUCT_OVEHEAT_2, 0);} //next board
// if (Value & TWO ){ FsbusWrite(ANNUN_DUAL_BLEED,, 1);} //next board
// else if (Value | TWO){ FsbusWrite(ANNUN_DUAL_BLEED,, 0);} //next board
if (Value & THREE){FsbusWrite(ANNUN_RAM_DOOR_FUEL_DOOR_1, 1);} //CID 8
else if (Value | THREE){ FsbusWrite(ANNUN_RAM_DOOR_FUEL_DOOR_1, 0);} //CID 8
if (Value & FOUR ){ FsbusWrite(ANNUN_RAM_DOOR_FUEL_DOOR_2, 1);} //CID 8
else if (Value | FOUR){FsbusWrite(ANNUN_RAM_DOOR_FUEL_DOOR_2, 0);} //CID 8
if (Value & FIVE ){ FsbusWrite(ANNUN_PACK_TRIP_OFF_1, 1);}
else if (Value | FIVE){ FsbusWrite(ANNUN_PACK_TRIP_OFF_1, 0);}
// if (Value & SIX ){ FsbusWrite(ANNUN_PACK_TRIP_OFF_2, 1);} //NEXT PCB
// else if (Value | SIX){ FsbusWrite(ANNUN_PACK_TRIP_OFF_2, 0);} // NEXT PCB
if (Value & SEVEN ){FsbusWrite(ANNUN_WING_BODY_OHEAT_1, 1);} //CID 8
else if (Value | SEVEN){ FsbusWrite(ANNUN_WING_BODY_OHEAT_1, 0);} //CID 8
As I say I am a year out of practice (long story) so I may not be describing this very well hope to be in the swing of things over the next few months or so. (sorry If I am worsening things...)
Private me or contact me via the Ifly forum if you want any of my scripts.
John