skino Posted June 10, 2015 Report Posted June 10, 2015 I'm trying the status of the LEDs on PM MCP read. Programming language is VB-2013. I have the offset declared as SHORT because it has 2 bytes. Public LED As Offset(Of Short) = New FSUIPC.Offset(Of Short)(&H4F0) How do I get the status of each LED in VB? 04F0 2 MCP/FCU Lights (Read Only) Bit Light 0 A/P Master L (1) 1 A/P Master C (2) 2 VS 3 ALT HLD 4 APP 5 LOC 6 LNAV 7 HDG 8 FLCH 9 SPD 10 THR 11 A/T 12 F/D 13 A/P Master R 14 VNAV I am grateful for any help :)
Paul Henty Posted June 10, 2015 Report Posted June 10, 2015 The easiest way is to set the type as a BitArray: (You also need to add the offset length as the second parameter.) Public LED As Offset(Of BitArray) = New FSUIPC.Offset(Of BitArray)(&H4F0, 2) To read the state of a particular light just use an array index with the bit number you need. For example this is how you know if the LNAV light is on or off: FSUIPCConnection.Process() Dim lnav As Boolean = LED.Value(6) Paul
skino Posted June 10, 2015 Author Report Posted June 10, 2015 Thank you for the quick help. That sounds logical. I will try it. :)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now