Changes for the DCS Version 1.5.2

This is the last version for HT.
This commit is contained in:
mcmicha
2016-01-24 17:06:15 +01:00
parent 0924db9b57
commit 3e545e6c53
15 changed files with 1040 additions and 507 deletions
+274 -83
View File
@@ -14,42 +14,41 @@ gES_GlassCockpitConfigEveryFrameArguments =
[19] = "%0.1f", <- floating-point number with 1 digit after point
[129] = "%1d", <- decimal number
]]
-- Flight Instruments
[11] = "%.2f", -- AirspeedNeedle
[29] = "%.1f", -- Variometer
[11] = "%.4f", -- AirspeedNeedle {0,50,100,150,200,250,300,350,400,450,500,550,600,650,700} {0.0,0.05,0.10,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7}
[29] = "%.4f", -- Variometer {-6000,-4000,-2000,2000,4000,6000} {-0.6,-0.4,-0.2,0.2,0.4,0.6}
-- Altimeter
[97] = "%.1f", -- Altimeter_Pressure
[96] = "%.1f", -- Altimeter_10000_footPtr
[24] = "%.1f", -- Altimeter_1000_footPtr
[25] = "%.1f", -- Altimeter_100_footPtr
[97] = "%.4f", -- Altimeter_Pressure {28.1, 31.0}{0.0, 1.0}
[96] = "%.41f", -- Altimeter_10000_footPtr {0.0, 100000.0}{0.0, 1.0}
[24] = "%.4f", -- Altimeter_1000_footPtr {0.0, 10000.0}{0.0, 1.0}
[25] = "%.4f", -- Altimeter_100_footPtr{0.0, 1000.0}{0.0, 1.0}
-- Artificial horizon
[15] = "%.1f", -- AHorizon_Pitch
[14] = "%.1f", -- AHorizon_Bank
[16] = "%.1f", -- AHorizon_PitchShift
[20] = "%.1f", -- AHorizon_Caged
[15] = "%.4f", -- AHorizon_Pitch {1.0, -1.0}
[14] = "%.4f", -- AHorizon_Bank {1.0, -1.0}
[16] = "%.1f", -- AHorizon_PitchShift {-1.0, 1.0}
[20] = "%.1f", -- AHorizon_Caged {0.0, 1.0}
-- directional gyro
[12] = "%.1f", -- GyroHeading
[12] = "%.4f", -- GyroHeading
-- turn indicator
[27] = "%.1f", -- TurnNeedle
[28] = "%.1f", -- Slipball
[27] = "%.4f", -- TurnNeedle {-1.0, 1.0}
[28] = "%.4f", -- Slipball {-1.0, 1.0}
-- oxygen pressure indicator
[34] = "%.1f", -- Oxygen_Pressure
[33] = "%.1f", -- Oxygen_Flow_Blinker
[34] = "%.4f", -- Oxygen_Pressure {0.0, 500.0} {0.0, 1.0}
[33] = "%.4f", -- Oxygen_Flow_Blinker
-- fuel system
[155] = "%.2f", -- Fuel_Tank_Left
[156] = "%.2f", -- Fuel_Tank_Right
[32] = "%.1f", -- Fuel_Pressure
[155] = "%.4f", -- Fuel_Tank_Left {0.0,5.0,15.0,30.0,45.0,60.0,75.0,92.0} {0.0,0.2,0.36,0.52,0.65,0.77,0.92,1.0}
[156] = "%.4f", -- Fuel_Tank_Right {0.0,5.0,15.0,30.0,45.0,60.0,75.0,92.0} {0.0,0.2,0.36,0.52,0.65,0.77,0.92,1.0}
[32] = "%.4f", -- Fuel_Pressure {0.0, 25.0} {0.0, 1.0}
-- A-11 clock
[4] = "%.4f", -- CLOCK_currtime_hours
[5] = "%.4f", -- CLOCK_currtime_minutes
[6] = "%.4f", -- CLOCK_currtime_seconds
[4] = "%.4f", -- CLOCK_currtime_hours {0.0, 12.0}{0.0, 1.0}
[5] = "%.4f", -- CLOCK_currtime_minutes {0.0, 60.0}{0.0, 1.0}
[6] = "%.4f", -- CLOCK_currtime_seconds {0.0, 60.0}{0.0, 1.0}
-- AN5730 remote compass
[1] = "%.4f", -- CompassHeading
[2] = "%.4f", -- CommandedCourse
[3] = "%.4f", -- CommandedCourseKnob
-- TailRadarWarning
[161] = "%.1f", -- TailRadarWarning
[161] = "%.1f", -- Lamp TailRadarWarning
-- SCR-522A Control panel
[122] = "%.1f", -- A_channel_light
[123] = "%.1f", -- B_channel_light
@@ -57,44 +56,44 @@ gES_GlassCockpitConfigEveryFrameArguments =
[125] = "%.1f", -- D_channel_light
[126] = "%.1f", -- Transmit_light
-- hydraulic pressure
[78] = "%.4f", -- Hydraulic_Pressure
[78] = "%.4f", -- Hydraulic_Pressure {0.0, 2000.0} {0.0, 1.0}
-- Landing gears handle
[150] = "%.4f", -- Landing_Gear_Handle
[151] = "%.4f", -- Landing_Gear_Handle_Indoor
[80] = "%.1f", -- LandingGearGreenLight
[82] = "%.1f", -- LandingGearRedLight
-- gauges
[10] = "%.4f", -- Manifold_Pressure
[23] = "%.4f", -- Engine_RPM
[9] = "%.4f", -- Vacuum_Suction
[21] = "%.4f", -- Carb_Temperature
[22] = "%.4f", -- Coolant_Temperature
[30] = "%.4f", -- Oil_Temperature
[31] = "%.4f", -- Oil_Pressure
[10] = "%.4f", -- Manifold_Pressure {10.0, 75.0} {0.0, 1.0}
[23] = "%.4f", -- Engine_RPM {0.0, 4500.0} {0.0, 1.0}
[9] = "%.4f", -- Vacuum_Suction {0.0, 10.0} {0.0, 1.0}
[21] = "%.4f", -- Carb_Temperature {-80, 150} {-0, 1}
[22] = "%.4f", -- Coolant_Temperature {-80, 150} {-0, 1}
[30] = "%.4f", -- Oil_Temperature {0.0, 100.0} {0, 1.0}
[31] = "%.4f", -- Oil_Pressure {0.0, 200.0} {0, 1.0}
[164] = "%.1f", -- Left_Fluor_Light
[165] = "%.1f", -- Right_Fluor_Light
[59] = "%.1f", -- Hight_Blower_Lamp
-- Trimmer
[170] = "%.4f", -- Aileron_Trimmer
[172] = "%.4f", -- Rudder_Trimmer
[171] = "%.4f", -- Elevator_Trimmer
[170] = "%.4f", -- Aileron_Trimmer {-1.0, 1.0}
[172] = "%.4f", -- Rudder_Trimmer {-1.0, 1.0}
[171] = "%.4f", -- Elevator_Trimmer {-1.0, 1.0}
[174] = "%.4f", -- Control_Lock_Bracket
[175] = "%.4f", -- Accelerometer_main
[177] = "%.4f", -- Accelerometer_min
[178] = "%.4f", -- Accelerometer_max
[101] = "%.4f", -- Ammeter
[175] = "%.4f", -- Accelerometer_main {-5.0, 12.0} {0.0, 1.0}
[177] = "%.4f", -- Accelerometer_min {-5.0, 12.0} {0.0, 1.0}
[178] = "%.4f", -- Accelerometer_max {-5.0, 12.0} {0.0, 1.0}
[101] = "%.4f", -- Ammeter {0.0, 150.0} {0.0, 1.0}
-- light
[185] = "%.1f", -- Left_cockpit_light
[186] = "%.1f", -- Right_cockpit_light
[190] = "%.4f" -- warEmergencyPowerLimWire
[190] = "%.4f", -- warEmergencyPowerLimWire
}
gES_GlassCockpitConfigArguments =
{
--[[
arguments for export in low tick interval
based on "clickabledata.lua"
]]
-- Right Swich Panel
[102] = "%d", -- Generator Connect/Disconnect
[103] = "%d", -- Battery Connect/Disconnect
@@ -107,31 +106,31 @@ gES_GlassCockpitConfigArguments =
[110] = "%d", -- Amber Recognition Light Key/Off/Steady
[111] = "%d", -- Recognition Lights Key
[112] = "%d", -- Circuit Protectors Reset
[100] = "%d", -- Right Fluorescent Light
[90] = "%d", -- Left Fluorescent Light
[100] = "%.4f", -- Right Fluorescent Light (rotary)
[90] = "%.4f", -- Left Fluorescent Light (rotary)
-- Flight Instrument panel
[3] = "%.4f", -- Course Set
[179] = "%.4f", -- Heading Set/Cage
[13] = "%d", -- Heading Set/Cage Button
[17] = "%.4f", -- Pitch Adjustment
[19] = "%.4f", -- Cage
[18] = "%d", -- Cage Button
[8] = "%d", -- Winding/Adjustment Clock ??
[7] = "%d", -- Winding/Adjustment Clock ??
[26] = "%.4f", -- Set Pressure
[3] = "%.4f", -- Course Set (rotary)
[13] = "%.4f", -- Heading Set/Cage (rotary)
[179] = "%d", -- Heading Set/Cage Button
[17] = "%.4f", -- Pitch Adjustment (rotary)
[18] = "%.4f", -- Cage (rotary)
[19] = "%d", -- Cage Button
[8] = "%d", -- Winding/Adjustment Clock Button
[7] = "%.4f", -- Winding/Adjustment Clock (rotary)
[26] = "%.4f", -- Set Pressure (rotary)
-- SCR-522A Control panel
[117] = "%d", -- Radio ON/OFF
[118] = "%d", -- A Channel Activate
[119] = "%d", -- B Channel Activate
[120] = "%d", -- C Channel Activate
[121] = "%d", -- D Channel Activate
[127] = "%.4f", -- Radio Lights Dimmer
[116] = "%.4f", -- Radio Audio Volume
[127] = "%.4f", -- Radio Lights Dimmer (rotary)
[116] = "%.4f", -- Radio Audio Volume (rotary)
[44] = "%d", -- Microphone On
[129] = "%d", -- Switch Locking Lever
[128] = "%.4f", -- Radio Mode Transmit/Receive/Remote
[128] = "%d", -- Radio Mode Transmit/Receive/Remote
-------------
[71] = "%.4f", -- Cockpit Lights
[71] = "%.4f", -- Cockpit Lights (rotary)
[66] = "%0.1f", -- Ignition Off/Right/Left/Both
[67] = "%d", -- Gun control Gun And Camera On/Gun And Camera OFF/Camera On
[72] = "%d", -- Silence Landing Gear Warning Horn Cut Off
@@ -158,18 +157,18 @@ gES_GlassCockpitConfigArguments =
-- AN/APS-13
[114] = "%d", -- ail Warning Radar Power ON/OFF
[115] = "%d", -- Tail Warning Radar Test
[113] = "%.4f", -- Tail Warning Radar Light Control
[113] = "%.4f", -- Tail Warning Radar Light Control (rotary)
-------------
[79] = "%.4f", -- Hydraulic Release Knob
[94] = "%.4f", -- Flaps Control Handle
[79] = "%d", -- Hydraulic Release Knob
[94] = "%.4f", -- Flaps Control Handle (rotary)
[84] = "%d", -- Parking Brake Handle
[81] = "%d", -- Safe Landing Gear Light Test
[83] = "%d", -- Unsafe Landing Gear Light Test
-- Detrola receiver
[137] = "%0.4f", -- Detrola Frequency Selector
[138] = "%0.4f", -- Detrola Volume
[137] = "%.4f", -- Detrola Frequency Selector (rotary)
[138] = "%.4f", -- Detrola Volume (rotary)
-- canopy
[147] = "%.4f", -- Canopy Hand Crank
[147] = "%.4f", -- Canopy Hand Crank (rotary)
[149] = "%d", -- Canopy Emergency Release Handle
-- AN/ARA-8
[152] = "%0.1f", -- Homing Adapter Mode TRANSMIT/COMM./HOMING
@@ -184,29 +183,38 @@ gES_GlassCockpitConfigArguments =
[145] = "%d", -- IFF Detonator Left
[146] = "%d", -- IFF Detonator Right
-- Trimmers
[91] = "%.4f", -- Aileron Trim
[92] = "%.4f", -- Elevator Trim
[93] = "%.4f", -- Rudder Trim
[91] = "%.4f", -- Aileron Trim (rotary)
[92] = "%.4f", -- Elevator Trim (rotary)
[93] = "%.4f", -- Rudder Trim (rotary)
-------------
[157] = "%.4f", -- Defroster
[158] = "%.4f", -- Cold Air
[159] = "%.4f", -- Hot Air
[157] = "%.4f", -- Defroster (rotary)
[158] = "%.4f", -- Cold Air (rotary)
[159] = "%.4f", -- Hot Air (rotary)
-------------
[89] = "%d", -- Landing Light On/Off
[168] = "%d", -- Coolant Control Cover
[87] = "%0.1f", -- Close Coolant Control/Automatic Coolant Control/Open Coolant Control
[169] = "%d", -- Oil Control Cover
[88] = "%0.1f", -- Close Oil Control/Automatic Oil Control/Open Oil Control
[134] = "%0.1f", -- Carburetor Cold Air Control
[135] = "%0.1f", -- Carburetor Warm Air Control
[134] = "%0.1f", -- Carburetor Cold Air Control (rotary)
[135] = "%0.1f", -- Carburetor Warm Air Control (rotary)
[47] = "%0.1f", -- Mixture Control Select IDLE CUT OFF/RUN/EMERGENCY FULL RICH
[43] = "%.4f", -- Throttle
[46] = "%.4f", -- Propeller RPM
[173] = "%.4f", -- Surface Control Lock Plunger. Left Button - Lock Stick in the Forward Position', Right Button - Lock Stick in the Neutral Position
[48] = "%.4f", -- Lock Throttle
[49] = "%.4f", -- Lock Propeller & Mixture
[176] = "%.4f", -- G-meter reset
[183] = "%.4f" -- Mirror
[43] = "%.4f", -- Throttle (rotary)
[46] = "%.4f", -- Propeller RPM (rotary)
[173] = "%d", -- Surface Control Lock Plunger. Left Button - Lock Stick in the Forward Position', Right Button - Lock Stick in the Neutral Position
[48] = "%.4f", -- Lock Throttle (rotary)
[49] = "%.4f", -- Lock Propeller & Mixture (rotary)
[176] = "%d", -- G-meter reset
[183] = "%d", -- Mirror
--Gunsight Selector
[41] = "%d", -- Sight On/Off
[39] = "%d", -- Fixed Reticle Mask Lever
[40] = "%0.1f", -- Sight Mode, Fixed Sight/Fixed-Gyro Sight/Gyro Sight
[42] = "%.1f", -- Gun Sight Brightness
[35] = "%.1f", -- Wing Span Selector
-------------
[132] = "%.4f", -- Left Payload Salvo
[133] = "%.4f" -- Right Payload Salvo
}
-----------------------------
@@ -224,6 +232,190 @@ function ProcessGlassCockpitDCSConfigHighImportance(mainPanelDevice)
SendData("ExportID", "Format")
SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data
]]
if gES_GlassCockpitType == 1 then
-- HELIOS Version 1.3
-- WriteToLog('in ProcessGlassCockpitDCSConfigHighImportance - HELIOS: '..t)
local MainPanel = GetDevice(0)
local AirspeedNeedle = MainPanel:get_argument_value(11)*1000
local Altimeter_10000_footPtr = MainPanel:get_argument_value(96)*100000
local Variometer = MainPanel:get_argument_value(29)
local TurnNeedle = MainPanel:get_argument_value(27)
local Slipball = MainPanel:get_argument_value(28)
local CompassHeading = MainPanel:get_argument_value(1)
local CommandedCourse = MainPanel:get_argument_value(2)
local Manifold_Pressure = MainPanel:get_argument_value(10)
local Engine_RPM = MainPanel:get_argument_value(23)
local AHorizon_Pitch = MainPanel:get_argument_value(15)
local AHorizon_Bank = MainPanel:get_argument_value(14)
local AHorizon_PitchShift = MainPanel:get_argument_value(16) * 10.0 * math.pi/180.0
local AHorizon_Caged = MainPanel:get_argument_value(20)
local GyroHeading = MainPanel:get_argument_value(12)
local vaccum_suction = MainPanel:get_argument_value(9)
local carburator_temp = MainPanel:get_argument_value(21)
local coolant_temp = MainPanel:get_argument_value(22)
local Acelerometer = MainPanel:get_argument_value(175)
local OilTemperature = MainPanel:get_argument_value(30)
local OilPressure = MainPanel:get_argument_value(31)
local FuelPressure = MainPanel:get_argument_value(32)
local Clock_hours = MainPanel:get_argument_value(4)
local Clock_minutes = MainPanel:get_argument_value(5)
local Clock_seconds = MainPanel:get_argument_value(6)
local LandingGearGreenLight = MainPanel:get_argument_value(80)
local LandingGearRedLight = MainPanel:get_argument_value(82)
local Hight_Blower_Lamp = MainPanel:get_argument_value(59)
local Acelerometer_Min = MainPanel:get_argument_value(177)
local Acelerometer_Max = MainPanel:get_argument_value(178)
local Ammeter = MainPanel:get_argument_value(101)
local hydraulic_Pressure = MainPanel:get_argument_value(78)
local Oxygen_Flow_Blinker = MainPanel:get_argument_value(33)
local Oxygen_Pressure = MainPanel:get_argument_value(34)
local Fuel_Tank_Left = MainPanel:get_argument_value(155)
local Fuel_Tank_Right = MainPanel:get_argument_value(156)
local Fuel_Tank_Fuselage = MainPanel:get_argument_value(160)
local Tail_radar_warning = MainPanel:get_argument_value(161)
local Channel_A = MainPanel:get_argument_value(122)
local Channel_B = MainPanel:get_argument_value(123)
local Channel_C = MainPanel:get_argument_value(124)
local Channel_D = MainPanel:get_argument_value(125)
local transmit_light = MainPanel:get_argument_value(126)
local RocketCounter = MainPanel:get_argument_value(77)
--- preparing landing gear and High Blower lights, all together, in only one value
local gear_lights = 0
if LandingGearGreenLight > 0 then gear_lights = gear_lights +100 end
if LandingGearRedLight > 0 then gear_lights = gear_lights +10 end
if Hight_Blower_Lamp > 0 then gear_lights = gear_lights +1 end
------------------------------------------------------------
--- preparing radio lights, all together, in only one value
local radio_active = 0
if Channel_A > 0 then radio_active = 1 end
if Channel_B >0 then radio_active= 2 end
if Channel_C >0 then radio_active= 3 end
if Channel_D >0 then radio_active= 4 end
if transmit_light >0 then radio_active = radio_active + 10 end
------------------------------------------------------------
---- sending P51 and tf51 data across fc2 interface
----Please comment out the appropriate entries in the table 'gES_GlassCockpitConfigEveryFrameArguments'.
SendData("1", string.format("%.5f", math.floor((AHorizon_Pitch+1)*1000) + ((AHorizon_Bank+1)/100) ) ) -- pitch
SendData("2", string.format("%.3f", math.floor(Oxygen_Flow_Blinker*100) + (Oxygen_Pressure/100) ) ) -- bank
SendData("3", string.format("%.4f", math.floor(OilTemperature*100) + (vaccum_suction/100) ) ) -- yaw
SendData("4", string.format("%.3f", math.floor(Altimeter_10000_footPtr) + (AHorizon_Caged/100) ) ) -- barometric altitude
SendData("5", string.format("%.5f", math.floor(Clock_hours*1000000) + (Tail_radar_warning/100) ) ) -- radar altitude
SendData("6", string.format("%.5f", math.floor(CompassHeading*1000) + (CommandedCourse/100) ) ) -- adf
SendData("7", string.format("%.4f", math.floor(Clock_seconds*100) + (hydraulic_Pressure/100) ) ) -- rmi
SendData("8", string.format("%.2f", math.floor(GyroHeading*1000) + (radio_active/100) ) ) -- heading
SendData("9", string.format("%.4f", math.floor(Engine_RPM*100) + (Manifold_Pressure/100) ) ) -- left rpm
SendData("10", string.format("%.4f", math.floor(Fuel_Tank_Left*100) + (Fuel_Tank_Right/100) ) ) -- right rpm
SendData("11", string.format("%.4f", math.floor(carburator_temp*100) + (coolant_temp/100) ) ) -- left temp
SendData("12", string.format("%.4f", math.floor(gear_lights) + (Acelerometer_Min/100 ) ) ) -- right temp
SendData("13", string.format("%.2f", Variometer) ) -- vvi
SendData("14", string.format("%.5f", math.floor(AirspeedNeedle)+ (RocketCounter/100) ) ) -- ias
SendData("15", string.format("%.4f", math.floor(OilPressure*100) + (FuelPressure/100) ) ) -- distance to way
SendData("16", string.format("%.3f", math.floor(Acelerometer*1000) + (Acelerometer_Max/100 ) ) ) -- aoa
SendData("17", string.format("%.4f", math.floor((TurnNeedle+1)*100) + ((Slipball+1)/100) ) ) -- glide
SendData("18", string.format("%.4f", math.floor(Fuel_Tank_Fuselage*100) + (Ammeter/100) ) ) -- side
elseif gES_GlassCockpitType == 2 then
-- HawgTouch version 1.6
-- WriteToLog('in ProcessGlassCockpitDCSConfigHighImportance - HawgTouch: '..t)
-- ADI AN5736
-- Artificial horizon
--[15] = "%.4f", -- AHorizon_Pitch {1.0, -1.0}
--[14] = "%.4f", -- AHorizon_Bank {1.0, -1.0}
--[16] = "%.1f", -- AHorizon_PitchShift
--[20] = "%.1f", -- AHorizon_Caged
SendData(2000, string.format("%0.4f;%0.4f",
mainPanelDevice:get_argument_value(15),
mainPanelDevice:get_argument_value(14)))
-- turn indicator AN5820
--[27] = "%.4f", -- TurnNeedle {-1.0, 1.0}
--[28] = "%.4f", -- Slipball {-1.0, 1.0}
SendData(2001, string.format("%0.4f;%0.4f",
mainPanelDevice:get_argument_value(27),
mainPanelDevice:get_argument_value(28)))
-- directional gyro AN5735
--[12] = "%.1f", -- GyroHeading {0.0, 1.0}
-- Vacuum_Suction AN5771-5
--[9] = "%.4f", -- Vacuum_Suction {0.0, 1.0}
-- F-2 Airspeed Indicator
-- [11] = "%.2f", -- AirspeedNeedle {0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700} {0.0, 0.05, 0.10, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7}
-- Altimeter AN5760-2
--[96] = "%.1f", -- Altimeter_10000_footPtr {0.0, 1.0}
--[24] = "%.1f", -- Altimeter_1000_footPtr {0.0, 1.0}
--[25] = "%.1f", -- Altimeter_100_footPtr {0.0, 1.0}
--[97] = "%.1f", -- Altimeter_Pressure {28.1, 31.0} {0.0, 1.0}
SendData(2002, string.format("%0.4f;%0.4f;%0.4f;%0.4f",
mainPanelDevice:get_argument_value(96),
mainPanelDevice:get_argument_value(24),
mainPanelDevice:get_argument_value(25),
mainPanelDevice:get_argument_value(97)))
-- Rate of Climb Indicator AN5825
--[29] = "%.1f", -- Variometer {0.0, 1.0}
-- D-10 Manifold Pressure Indicator
--[10] = "%.4f", -- Manifold_Pressure {10.0, 75.0} {0.0, 1.0}
-- Tachometer
--[23] = "%.4f", -- Engine_RPM {0.0, 4500.0} {0.0, 1.0}
-- AN5790-6 Carburetor Air Temperature Indicator
--[21] = "%.4f", -- Carb_Temperature {-80, 150} {-0, 1}
-- Coolant Temperature Indicator
--[22] = "%.4f", -- Carb_Temperature {-80, 150} {-0, 1}
-- Engine Gauge
--[30] = "%.4f", -- Oil_Temperature {0.0, 100.0} {0.0, 1.0}
--[31] = "%.4f", -- Oil_Pressure {0.0, 200.0} {0.0, 1.0}
--[32] = "%.1f", -- Fuel_Pressure {0.0, 25.0} -- PSI {0.0, 1.0}
SendData(2003, string.format("%0.4f;%0.4f;%0.4f",
mainPanelDevice:get_argument_value(30),
mainPanelDevice:get_argument_value(31),
mainPanelDevice:get_argument_value(32)))
-- Remote Indicator Compass
-- AN5730 remote compass
--[1] = "%.4f", -- CompassHeading {0.0, 1.0}
--[2] = "%.4f", -- CommandedCourse {0.0, 1.0}
SendData(2004, string.format("%0.4f;%0.4f",
mainPanelDevice:get_argument_value(1),
mainPanelDevice:get_argument_value(2)))
-- A-11 clock
--[4] = "%.4f", -- CLOCK_currtime_hours {0.0, 1.0}
--[5] = "%.4f", -- CLOCK_currtime_minutes {0.0, 1.0}
--[6] = "%.4f", -- CLOCK_currtime_seconds {0.0, 1.0}
SendData(2005, string.format("%0.4f;%0.4f;%0.4f",
mainPanelDevice:get_argument_value(4),
mainPanelDevice:get_argument_value(5),
mainPanelDevice:get_argument_value(6)))
-- Oxygen Flow Indicator
--[33] = "%.1f", -- Oxygen_Flow_Blinker {0.0, 1.0}
-- Oxygen Pressure Gauge
--[34] = "%.1f", -- Oxygen_Pressure {0.0, 500.0} {0.0, 1.0}
-- Hydraulic Pressure Gauge
--[78] = "%.4f", -- Hydraulic_Pressure {0.0, 2000.0} -- PSI {0.0, 1.0}
-- Fuel Gauges
-- Left Wing Main Tank
--[155] = "%.2f", -- Fuel_Tank_Left {0.0, 5.0, 15.0, 30.0, 45.0, 60.0, 75.0, 92.0} -- US GAL {0.0, 0.2, 0.36, 0.52, 0.65, 0.77, 0.92, 1.0}
-- Fuselage Tank
--[160] = "%.2f", -- Fuel_Tank_Fuselage {0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 85.0} -- US GAL {0.0, 0.12, 0.28, 0.40, 0.51, 0.62, 0.72, 0.83, 0.96, 1.0}
-- Right Wing Main Tank
--[156] = "%.2f", -- Fuel_Tank_Right {0.0, 5.0, 15.0, 30.0, 45.0, 60.0, 75.0, 92.0} -- US GAL {0.0, 0.2, 0.36, 0.52, 0.65, 0.77, 0.92, 1.0}
-- AN-5745 accelerometer indicator
--[175] = "%.4f", -- Accelerometer_main {-5.0, 12.0} {0.0, 1.0}
--[177] = "%.4f", -- Accelerometer_min {-5.0, 12.0} {0.0, 1.0}
--[178] = "%.4f", -- Accelerometer_max {-5.0, 12.0} {0.0, 1.0}
SendData(2006, string.format("%0.4f;%0.4f;%0.4f",
mainPanelDevice:get_argument_value(175),
mainPanelDevice:get_argument_value(177),
mainPanelDevice:get_argument_value(178)))
-- Landing Gear Warning Lights
--[80] = "%.1f", -- LandingGearGreenLight
--[82] = "%.1f", -- LandingGearRedLight
SendData(2007, string.format("%.1f;%.1f",
mainPanelDevice:get_argument_value(80),
mainPanelDevice:get_argument_value(82)))
-- AMMETER
--[101] = "%.4f", -- Ammeter {0.0, 150.0} {0.0, 1.0}
end
end
function ProcessHARDWAREConfigHighImportance(mainPanelDevice)
@@ -238,7 +430,6 @@ function ProcessHARDWAREConfigHighImportance(mainPanelDevice)
SendDataHW("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
SendDataHW("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000), 2) -- export to Hardware '2' Config
]]
-- no dimming lights
-- TailRadarWarning
SendDataHW("161", mainPanelDevice:get_argument_value(161) > 0.3 and 1 or 0) -- Lamp TailRadarWarning
@@ -302,21 +493,21 @@ function ProcessGlassCockpitDCSConfigLowImportance(mainPanelDevice)
local lDETROLA = GetDevice(24)
WriteToLog('lDETROLA: '..dump(lDETROLA:is_on()))
WriteToLog('lDETROLA: '..dump(lDETROLA:get_frequency()))
--SendData(2000, string.format("%7.3f", lDETROLA:get_frequency()/1000000))
--SendData(2000, string.format("%7.3f", lDETROLA:get_frequency()/1000000))
local lINTERCOM = GetDevice(31)
WriteToLog('lINTERCOM: '..dump(lINTERCOM:is_communicator_available()))
WriteToLog('lINTERCOM: '..dump(lINTERCOM:get_noise_level()))
WriteToLog('lINTERCOM: '..dump(lINTERCOM:get_signal_level()))
]]
--[[
--[[
local ltmp1 = 0
for ltmp2 = 1, 32, 1 do
for ltmp2 = 1, 35, 1 do
ltmp1 = GetDevice(ltmp2)
WriteToLog(ltmp2..': '..dump(ltmp1))
WriteToLog(ltmp2..' (metatable): '..dump(getmetatable(ltmp1)))
end
]]
]]
end
function ProcessHARDWAREConfigLowImportance(mainPanelDevice)
@@ -340,4 +531,4 @@ function ProcessHARDWAREConfigLowImportance(mainPanelDevice)
--WriteToLog(ltmp2..' (metatable): '..dump(getmetatable(ltmp1)))
end
]]
end
end