Results 1 to 1 of 1
-
12-10-2007, 07:10 PM #1
- Join Date
- Jan 2007
- Location
- Italy
- Posts
- 204
ALT , FLT LDG, Displays and ENC SIOC code
OPENCOCKPITS SIOC CODE for PMsystems
Hi guys, after a lot of effort, trial and error i got the Flight Altitude and Landing Altitude Displays and encoder knobs working as i like it!
The difficult part for me and a nice FEATURE was get the LDG Display recursively blank or light up the single Digits! For example when 0(zero) is selected only one digit must show it all other balnk not multiple zeros, same thing for 50, 100, 1000 and back, only the needed digits works.
The way OpenCockpits Display cards and Sioc work is to put zeros before the last digit.
So after a lot of trial got it working try it and let me know what you think.
Note: I have implemented the routine for Flight Altitude in steps of 500ft instead of PMsystem own logic 1000ft and for the Landing steps of 50ft.
I did this 'cause i had read those was the correct steps, can someone confirm this? I will modify it if it is wrong.
I can add also a dimming control if you want it!
Here is the code 'cause the attachements doesn't work admin?
Code:// SIOC code for: // Landing, Flight Altitude Displays and Knobs For PMSystems // Vers. 1.0 by Davide Cutugno // email: willycutu@hotmail.com Var 0000, Value 0 Var 0005, name MLightTest, Link FSUIPC_IN, Offset $560D, Length 1 // Master Light Test { If V0005 = 1 { V0603 = 8888 } Else { V0603 = &LandAlt } } Var 0006, name FltAlt, Link FSUIPC_INOUT, Offset $56AC, Length 2 // FltAlt { V0601 = &FltAlt * 10 } Var 0009, name LandAlt, Link FSUIPC_INOUT, Offset $56AA, Length 2 // LandAlt { L0 = &LandAlt * 10 If L0 = 0 { V0604 = -999999 V0605 = L0 } If L0 > 0 { If L0 < 100 { V0605 = -999999 V0602 = -999999 V0604 = L0 } } If L0 > 99 { If L0 < 999 { V0604 = -999999 V0603 = -999999 V0602 = L0 } } If L0 > 999 { V0602 = -999999 V0603 = L0 } } // Encoder Knobs Var 0100, name FLTENC, Link IOCARD_ENCODER, Input 3, Aceleration 2, Type 2 // FLT ALT Enc { L0 = &FLTENC * 50 &FltAlt = LIMIT 1000, 4500, L0 } Var 0110, name LDGENC, Link IOCARD_ENCODER, Input 0, Aceleration 2, Type 2 // LDG ALT Enc { L0 = &LDGENC * 5 &LandAlt = LIMIT 0, 900, L0 } // Displays Flight and Landing Altitude Var 0601, Link IOCARD_DISPLAY, Digit 5, Numbers 5 // D_FLT ALT Var 0602, Link IOCARD_DISPLAY, Digit 0, Numbers 3 // D_LDG ALT Var 0603, Link IOCARD_DISPLAY, Digit 0, Numbers 4 // D_LDG ALT Digit 4 Var 0604, Link IOCARD_DISPLAY, Digit 0, Numbers 2 // D_LDG ALT Digit 2 Var 0605, Link IOCARD_DISPLAY, Digit 0, Numbers 1 // D_LDG ALT Digit 1
Similar Threads
-
SIOC Elevator Pot Code
By tomenglish2000 in forum OpenCockpits General DiscussionReplies: 0Last Post: 09-28-2009, 06:26 AM -
SIOC code issues - Can someone take a look?
By XOrionFE in forum I/O Interfacing Hardware and SoftwareReplies: 8Last Post: 02-04-2009, 08:43 AM -
What's going wrong in my SIOC code?
By MicroHellas in forum I/O Interfacing Hardware and SoftwareReplies: 11Last Post: 08-22-2008, 06:55 AM -
SIOC Code for MCP, MIP, and TQ updated
By BoeingNG in forum OpenCockpits General DiscussionReplies: 3Last Post: 08-10-2008, 05:53 PM -
SIOC Code
By Polmer in forum I/O Interfacing Hardware and SoftwareReplies: 6Last Post: 12-28-2006, 10:49 AM
Looking for Fun? Connect with Women Seeking Casual Encounters in Your Town
JH startup on Client PC