Follow-up question on the values I should expect for each engine pump. It was my understanding from documentation that a value of 1=on and 0=off should be expected for each but I'm getting the following
Pump1 - 0=off and 1=on
Pump2 - 0=off and 2=on
Pump3 - 0=off and 4=on
Pump4 - 0=off and 8=on
The On value seems wrong since we are dealing with one bit, so I must have an error again in my understanding and my logic for displaying the value after switch is on
I'm using the following display code to see the value for each pump before and after flipping switch in FSX using the earlier ipc.read and logic.and code, the full function is listed below.
ipc.display(Pump2,3)
Full Function
function Eng2_Fuel_Pump_On()
Pump2=ipc.readUB(0x3125)
Pump2x=logic.And(Pump2, 0x2)
ipc.display(Pump2x,1)
ipc.sleep(3000)
ipc.control(66341)
ipc.sleep(3000)
Pump2a=ipc.readUB(0x3125)
Pump2z=logic.And(Pump2a, 0x2)
ipc.display(Pump2z,5)
end
As I shared earlier, I'm new in thinking on binary terms and I was trying to understand the highlighted example to better understand this logic routine, but I'm not understanding why the below holds true and may be where my error lies in thinking I can display this value. Are you able to explain why those two binary values = 0010? I'm I somehow adding bits when I am displayng the value for each pump?