Jump to content
The simFlight Network Forums

PMDG B777X Offset 65B8 (COMM_ReceiverSwitches[3])


Recommended Posts

Hi Pete,

I am having a problem with reading bit flags for certain COMM receivers on the Audio Control Panel. They are described in the Offset Mapping for PMDG777X document:
 

Comm Systems: 0=VHFL 1=VHFC 2=VHFR 3=FLT 4=CAB 5=PA 6=HFL 7=HFR 8=SAT1 9=SAT2 10=SPKR 11=VOR/ADF 12=APP

65B8 (3) (BYTE x 3): COMM_ReceiverSwitches[3]: 0=capt, 1=F/O, 2=observer
values: Bit flags for selector receivers 0...12 (VHFL..APP) as listed above
 
65BB (1) (BYTE): COMM_OBSAudio_Selector: 0 CAPT 1 NORMAL 2 F/O

 

 

Okay, so I understand that 65B8 is reserved for Capt, 65B9 for F/O and 65BA for Observer.
But each of these offset (bytes) contain only 8 bits, so how could I read bits 9 through 13 (flags for receivers 8 through 12)?

In fact, if I try to read one of these, as for example bit flag 9 below, I do not get any return (as I would expect, since UB can only go as far as 255 :???: ):

function COMM_Rcvr_Switch_FO_SAT1(offset, value)
    if logic.And(ipc.readUB("65B9"), 256) ~= 0 then
        ipc.writeLvar("L:COMM_Rcvr_Switch_FO_SAT1", 1)
    else ipc.writeLvar("L:COMM_Rcvr_Switch_FO_SAT1", 0)
    end
end

event.offset("65B9", "UB", "COMM_Rcvr_Switch_FO_SAT1")

I should mention that I can read the first 8 bit flags with this method.

 

Would you please clarify this for me? My understanding is that a particular offset (byte) can contain a maximum of 8 bit flags, but the documentation indicates 13 within each.

Thanks for your help.

Chakko.

Link to comment
Share on other sites

  • 4 weeks later...

Hi Pete,

I am having a problem with reading bit flags for certain COMM receivers on the Audio Control Panel. They are described in the Offset Mapping for PMDG777X document:

 

 

 

Okay, so I understand that 65B8 is reserved for Capt, 65B9 for F/O and 65BA for Observer.

But each of these offset (bytes) contain only 8 bits, so how could I read bits 9 through 13 (flags for receivers 8 through 12)?

In fact, if I try to read one of these, as for example bit flag 9 below, I do not get any return (as I would expect, since UB can only go as far as 255 :???: ):

function COMM_Rcvr_Switch_FO_SAT1(offset, value)
    if logic.And(ipc.readUB("65B9"), 256) ~= 0 then
        ipc.writeLvar("L:COMM_Rcvr_Switch_FO_SAT1", 1)
    else ipc.writeLvar("L:COMM_Rcvr_Switch_FO_SAT1", 0)
    end
end

event.offset("65B9", "UB", "COMM_Rcvr_Switch_FO_SAT1")

I should mention that I can read the first 8 bit flags with this method.

 

Would you please clarify this for me? My understanding is that a particular offset (byte) can contain a maximum of 8 bit flags, but the documentation indicates 13 within each.

Thanks for your help.

Chakko.

 

 

Good catch! Please ask PMDG 777X support this very good question. Their documentation definitely shows:

 

unsigned char COMM_ReceiverSwitches[3]; // array: 0=capt, 1=F/O, 2=observer  values: Bit flags for selector receivers 0...12 (VHFL..APP) as listed above
 
The unsigned char value is 1 byte (8 bits).
 
Pete
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.