McMicha 9c007dd9c4 Change to version 1.2.1
change A-10C
add ID 717 for Standby Attitude Indicator knob arrow
add ID 22 for ADI Pitch Trim Knob
add ID 45 for HSI Heading Set Knob
add ID 44 for HSI Course Set Knob
add ID 67 for SAI Cage Standby Attitude Indicator. Hold Right Mouse Button and rotate Scroll Wheel to uncage
add ID 66 for SAI Cage Standby Attitude Indicator. Hold Right Mouse Button and rotate Scroll Wheel to uncage
add ID 68 for Clock Toggle Clock and Elapsed Time Modes
add ID 69 for Clock Start, Stop and Reset Elapsed Timer
change ID 127 to 128 for PTR-THROTTLE-FRICTION (Throttle Friction Control)
add ID 652 for PTR-TEMS-DATA (TEMS DATA)
add ID 773 for PTR-FLAPS (Flap Setting)
add ID 709 for PTR-ARMGS-COVER (Arm Ground Safety Override Cover)
add ID 710 for PTR-ARMGS-OVERRIDE-SWITCH (Arm Ground Safety Override Switch)
add ID 666 for PTR-CBP-AILERON-DISC-L (AILERON DISC L)
add ID 667 for PTR-CBP-AILERON-DISC-R (AILERON DISC R)
add ID 668 for PTR-CBP-SPS-RUDDER-AUTH-LIM (SPS & RUDDER AUTH LIMIT)
add ID 669 for PTR-CBP-ELEVATION-DISC-L (ELEVATION DISC L)
add ID 670 for PTR-CBP-ELEVATION-DISC-R (ELEVATION DISC R)
add ID 671 for PTR-CBP-AILERON-TAB-L (AILERON TAB L)
add ID 672 for PTR-CBP-AILERON-TAB-R (AILERON TAB R)
add ID 673 for PTR-CBP-EMER-FLAP (EMER FLAP)
add ID 674 for PTR-CBP-EMER-TRIM (EMER TRIM)
add ID 675 for PTR-CBP-LAND-GEAR (LAND GEAR)
add ID 676 for PTR-CBP-ENGINE-START-L (ENGINE START L)
add ID 677 for PTR-CBP-ENGINE-START-R (ENGINE START R)
add ID 678 for PTR-CBP-APU-CONT (APU CONT)
add ID 679 for PTR-CBP-ANG-IGNITOR-1 (ENG IGNITOR L/R-1)
add ID 680 for PTR-CBP-ANG-IGNITOR-2 (ENG IGNITOR L/R-2)
add ID 681 for PTR-CBP-EMER-FUEL-SHUTOFF-ENG-L (EMER FUEL SHUTOFF ENG L)
add ID 682 for PTR-CBP-EMER-FUEL-SHUTOFF-ENG-R (EMER FUEL SHUTOFF ENG R)
add ID 683 for PTR-CBP-DC-FUEL-PUMP (DC FUEL PUMP)
add ID 684 for PTR-CBP-BLEED-AIR-CONT-L (BLEED AIR CONT L)
add ID 685 for PTR-CBP-BLEED-AIR-CONT-R (BLEED AIR CONT R)
add ID 686 for PTR-CBP-EXT-STORES-JETT-1 (EXT STORES JETT 1)
add ID 687 for PTR-CBP-EXT-STORES-JETT-2 (EXT STORES JETT 2)
add ID 688 for PTR-CBP-STBY-ATT-IND (STBY ATT IND)
add ID 689 for PTR-CBP-MASTER-CAUT (MASTER CAUT)
add ID 690 for PTR-CBP-PITOT-HEAT-AC (PITOT HEAT AC)
add ID 691 for PTR-CBP-IFF (IFF)
add ID 692 for PTR-CBP-UHF-COMM (UHF COMM)
add ID 693 for PTR-CBP-INTER-COMM (INTER COMM)
add ID 694 for PTR-CBP-GENERATOR-CONT-L (GENERATOR CONT L)
add ID 695 for PTR-CBP-GENERATOR-CONT-R (GENERATOR CONT R)
add ID 696 for PTR-CBP-CONVERTER-L (CONVERTER L)
add ID 697 for PTR-CBP-AUX-ESS-BUS-0A (AUX ESS BUS 0A)
add ID 698 for PTR-CBP-AUX-ESS-BUS-0B (AUX ESS BUS 0B)
add ID 699 for PTR-CBP-AUX-ESS-BUS-0C (AUX ESS BUS 0C)
add ID 700 for PTR-CBP-BATTERY-BUS-TRANS (BATTERY BUS TRANS)
add ID 701 for PTR-CBP-INVERTER-PWR (INVERTER PWR)
add ID 702 for PTR-CBP-INVERTER-CONT (INVERTER CONT)
add ID 703 for PTR-CBP-AUX-ESS-BUS-TIE (AUX ESS BUS TIE)
add ID 62 for PNT-ALT-LEVR-L (Set Pressure)
add ID 60 for PNT-ALT-LEVR-R (ELECT/PNEU)
add ID 770 for Seat Height Adjustment up/down
add ID 787 for Extend boarding ladder cover
add ID 788 for Extend boarding ladder button
add ID 904 for Accelerometer Push to set
add ID 789 for DVADR - Function control toggle switch
add ID 776 for Anti-G suit valve test button
add ID 777 for Internal canopy actuator disengage lever
add ID 785 for Canopy jettison lever
add ID 786 for Canopy Jettison Lever Unlock Button
add ID 706 for IFF - antenna switch
add ID 707 for UHF - antenna switch
add ID 708 for EGI HQ TOD
add ID 16 for RWR Adjust Display Brightness

change AJS37
add ID 131 for Minute
add ID 133 for Second (Arrow)
add ID 1333 for Second
add ID 135 for Clock Setting

change AV8BNA
add ID 350 for Backup ADI Cage

change F-5E-3
format value for Radio with ID 327, 328, 329, 330 and 331
format value for TACAN XY Wheel ID 266
format value for set air speed knob ID 177

change FA-18C_hornet
add ID 439 for FLIR Switch, ON/STBY/OFF
add id 441 for LTD/R Switch, ARM/SAFE/AFT

change Ka-50
add ID 573 for VM_15PV_BALT_tenths

change M-2000C
format value for ADI standby ID 328
format value for Rada altimeter mimimum knob ID 192
change UHF Radio Preset Chanel values

change Mi-8MT
format value for VD 10K L Press ID 21

change SA342L/SA342;/SA342Mistral
change clock (minute) values for ID 42
change clock (second) values for ID 43
add ID 210 for clock ExtCouronne
formate value Radar Alt lamp for ID 97
2019-05-07 23:09:01 +02:00

268 lines
11 KiB
Lua

-- Spitfire LFMk IX
ExportScript.FoundDCSModule = true
ExportScript.Version.SpitfireLFMkIX = "1.2.1"
ExportScript.ConfigEveryFrameArguments =
{
--[[
every frames arguments
based of "mainpanel_init.lua"
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
[DeviceID] = "Format"
[4] = "%.4f", <- floating-point number with 4 digits after point
[19] = "%0.1f", <- floating-point number with 1 digit after point
[129] = "%1d", <- decimal number
[5] = "%.f", <- floating point number rounded to a decimal number
]]
-- Flight Instruments
[11] = "%.4f", -- OxygenDeliveryGauge {0.0, 0.4}{0.0, 4000.0}
[12] = "%.4f", -- OxygenSupplyGauge
[17] = "%.4f", -- TrimGauge {-1.0, 1.0}
[18] = "%.4f", -- PneumaticPressureGauge {0.0, 1.0}{0.0, 600.0}
[19] = "%.4f", -- Left wheel brake pressure gauge {0.0, 1.0}{0.0, 130.0}
[20] = "%.4f", -- Right wheel brake pressure gauge {0.0, 1.0}{0.0, 130.0}
[21] = "%.4f", -- Airspeed gauge {0.0, 0.5}{0.0, 500.0}
[23] = "%.4f", -- Attitude Horizon Bank {-1.0, 1.0}
[24] = "%.4f", -- Attitude Horizon Pitch {-1.0, 1.0}
[25] = "%.4f", -- Variometer gauge {-1.0, 1.0}{-4000.0, 4000.0}
[26] = "%.4f", -- Altimeter gauge Hundreds {0.0, 1.0}{0.0, 10.0}
[27] = "%.4f", -- Altimeter gauge Thousands {0.0, 1.0}{0.0, 10.0}
[28] = "%.4f", -- Altimeter gauge Tens Thousabds {0.0, 1.0}{0.0, 10.0}
[29] = "%.4f", -- Altimeter gauge Pressure {0.0, 1.0}{800.0, 1050.0}
[31] = "%.4f", -- DI gauge {0.0, 1.0}{0.0, 2.0 * 3.1415926}
[33] = "%.4f", -- Sideslip gauge {-1.0, 1.0}
[34] = "%.4f", -- Turn gauge {-1.0, 1.0}
[35] = "%.4f", -- Voltmeter {0.0, 1.0}{0.0, 20.0}
[37] = "%.4f", -- Tachometer {0.0, 0.5}{0.0, 5000.0}
[39] = "%.4f", -- Boost gauge {0.0, 1.0}{-7.0, 24.0}
[40] = "%.4f", -- Oil pressure gauge {0.0, 1.0}{0.0, 150.0}
[41] = "%.4f", -- Oil temperature gauge {0.0, 1.0}{0.0, 100.0}
[42] = "%.4f", -- Radiator temperature gauge {0.0, 0.7}{0.0, 140.0}
[43] = "%.4f", -- Fuel contents gauge {0.0, 0.1, 1.0}{-1.0, 0.0, 37.0}
[51] = "%.4f", -- Clock Hour
[52] = "%.4f", -- Clock Minute
[53] = "%.4f", -- Clock Second
[71] = "%.4f", -- Magnetic compass CompassRoseRoll {-1.0, 1.0}{-20.0, 20.0}
[72] = "%.4f", -- Magnetic compass CompassRosePitch {-1.0, 1.0}{-20.0, 20.0}
[73] = "%.4f", -- Magnetic compass CompassHeading{0.0, 1.0}
[120] = "%1d", -- Radio Lamp A
[121] = "%1d", -- Radio Lamp B
[122] = "%1d", -- Radio Lamp C
[123] = "%1d", -- Radio Lamp D
[124] = "%1d", -- Radio Lamp R
--[131] = "%1d", -- UC_DOWN_C ???
[49] = "%1d", -- Gear Lamp Down
[48] = "%1d", -- Gear Lamp Up
--[62] = "%.4f", -- ???
--[63] = "%.4f", -- ???
--[59] = "%.4f", -- ???
--[45] = "%.4f" -- GUNSIGHT_RANGE ???
}
ExportScript.ConfigArguments =
{
--[[
arguments for export in low tick interval
based on "clickabledata.lua"
]]
[13] = "%1d", -- Oxygen Apparatus Controls Valve
-- Main Panel
[30] = "%.1f", -- Altimeter (Axis) {0.0, 1.0} in 0.1 Steps
[32] = "%.1f", -- DI (Axis) {0.0, 1.0} in 0.1 Steps
[44] = "%1d", -- Fuel Gauge Button
[46] = "%1d", -- Nav. Lights Toggle
[47] = "%1d", -- Flaps Lever
[50] = "%1d", -- U/C Indicator Blind
[54] = "%1d", -- Clock Setter Pinion
[55] = "%.1f", -- Clock Setter Pinion (Axis) {0.0, 1.0} in 0.1 Steps
[56] = "%1d", -- Magnetos Toggles 1
[57] = "%1d", -- Magnetos Toggles 2
[58] = "%1d", -- Supercharger Mode Toggle
[60] = "%.1f", -- Illumination Controls Left (Axis) {0.0, 1.0} in 0.1 Steps
[61] = "%.1f", -- Illumination Controls Right (Axis) {0.0, 1.0} in 0.1 Steps
[65] = "%1d", -- Starter Button
[67] = "%1d", -- Booster Coil Button
[69] = "%1d", -- Primer Pump
[68] = "%.2f", -- Primer Pump (Axis) {0.0, 1.0} in 0.04 Steps
[70] = "%1d", -- Tank Pressurizer Lever
[74] = "%.4f", -- Magnetic Compass Ring (Axis) {0.0, 1.0} in 0.0333 Steps
-- Gun Sight and Tertiary Weapons Controls
[77] = "%.2f", -- Gun Sight Setter Rings Range (Axis) {0.0, 1.0} in 0.15 Steps
[78] = "%.2f", -- Gun Sight Setter Rings Base (Axis) {0.0, 1.0} in 0.15 Steps
[79] = "%1d", -- Gun Sight Tint Screen
[80] = "%1d", -- Gun Sight Master Switch
[81] = "%.1f", -- Gun Sight Dimmer (Axis) {0.0, 1.0} in 0.1 Steps
-- Port Wall
[145] = "%.2f", -- Elevator Trim Wheel (Axis) {-1.0, 1.0} in 0.01 Steps
[146] = "%.1f", -- Rudder Trim Wheel (Axis) {-1.0, 1.0} in 0.1 Steps
-- Radio Remote Channel Switcher
[115] = "%1d", -- Off Button
[116] = "%1d", -- A Button
[117] = "%1d", -- B Button
[118] = "%1d", -- C Button
[119] = "%1d", -- D Button
[125] = "%1d", -- Dimmer Toggle
[155] = "%1d", -- Transmit Lock Toggle
[156] = "%1d", -- Mode Selector
-- Throttle Quadrant
[126] = "%.1f", -- Throttle Lever (Axis) {-1.0, 1.0} in 0.1 Steps
[128] = "%1d", -- Bomb Drop Button
[129] = "%.1f", -- Airscrew Lever (Axis) {-1.0, 1.0} in 0.1 Steps
[130] = "%1d", -- Mix Cut-Off Lever
[131] = "%1d", -- U/C Indicator Cut-Off Toggle
--
[133] = "%1d", -- Radiator Control Toggle
[134] = "%1d", -- Pitot Heater Toggle
[135] = "%1d", -- Fuel Pump Toggle
[137] = "%1d", -- Carb. Air Control Lever
[158] = "%1d", -- Oil Diluter Button
[160] = "%1d", -- Supercharger Mode Test Button
[162] = "%1d", -- Radiator Flap Test Button
-- Stbd. Wall
[87] = "%1d", -- De-Icer Lever
[88] = "%1d", -- U/C Emergency Release Lever
[90] = "%1d", -- Wobble Type Fuel Pump
-- Wobble Type Fuel Pump
[92] = "%.1f", -- Upward Lamp Mode Selector {0.0,0.5,1.0}
[93] = "%.1f", -- Downward Lamp Mode Selector {0.0,0.5,1.0}
[94] = "%1d", -- Morse Key
--
[148] = "%1d", -- U/C Lever
-- I.F.F. Control Box
[106] = "%1d", -- I.F.F. Upper Toggle (Type B)
[107] = "%1d", -- I.F.F. Lower Toggle (Type D)
[109] = "%1d", -- I.F.F. Fore Button (0)
[110] = "%1d", -- I.F.F. Aft Button (1)
-- Fuel Cocks & Tertiary
[100] = "%1d", -- Fuel Cock
[98] = "%1d", -- Droptank Cock
[99] = "%1d", -- Droptank Release Handle
-- Canopy Controls
[149] = "%1d", -- Cockpit Open/Close Control
[140] = "%1d", -- Cockpit Jettison Pull Ball
[147] = "%1d" -- Cockpit Side Door Open/Close Control
}
-----------------------------
-- HIGH IMPORTANCE EXPORTS --
-- done every export event --
-----------------------------
-- Pointed to by ProcessIkarusDCSHighImportance
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
--[[
every frame export to Ikarus
Example from A-10C
Get Radio Frequencies
get data from device
local lUHFRadio = GetDevice(54)
ExportScript.Tools.SendData("ExportID", "Format")
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
]]
end
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
--[[
every frame export to DAC
Example from A-10C
Get Radio Frequencies
get data from device
local UHF_RADIO = GetDevice(54)
ExportScript.Tools.SendDataDAC("ExportID", "Format")
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
]]
end
-----------------------------------------------------
-- LOW IMPORTANCE EXPORTS --
-- done every gExportLowTickInterval export events --
-----------------------------------------------------
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
--[[
export in low tick interval to Ikarus
Example from A-10C
Get Radio Frequencies
get data from device
local lUHFRadio = GetDevice(54)
ExportScript.Tools.SendData("ExportID", "Format")
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
]]
-- Cockpit Light
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {163, 62, 63})
-- Gauges light, left panel light, right panel light
end
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
--[[
export in low tick interval to DAC
Example from A-10C
Get Radio Frequencies
get data from device
local UHF_RADIO = GetDevice(54)
ExportScript.Tools.SendDataDAC("ExportID", "Format")
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
]]
--=====================================================================================
--[[
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
-- list_indication get tehe value of cockpit displays
local ltmp1 = 0
for ltmp2 = 0, 20, 1 do
ltmp1 = list_indication(ltmp2)
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
end
]]
--[[
-- getmetatable get function name from devices
local ltmp1 = 0
for ltmp2 = 1, 70, 1 do
ltmp1 = GetDevice(ltmp2)
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
end
]]
-- VHF_Radio
local lVHF_Radio = GetDevice(15)
if lVHF_Radio:is_on() then
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", lVHF_Radio:get_frequency()/1000000))
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy(lVHF_Radio:get_frequency()/1000000))
else
ExportScript.Tools.SendDataDAC("2000", " ")
end
--[[
[115] = "%1d", -- Off Button
[116] = "%1d", -- A Button
[117] = "%1d", -- B Button
[118] = "%1d", -- C Button
[119] = "%1d", -- D Button]]
local lVHF_Radio_PRESET = ""
if mainPanelDevice:get_argument_value(116) > 0.8 then
lVHF_Radio_PRESET = 1
elseif mainPanelDevice:get_argument_value(117) > 0.8 then
lVHF_Radio_PRESET = 2
elseif mainPanelDevice:get_argument_value(118) > 0.8 then
lVHF_Radio_PRESET = 3
elseif mainPanelDevice:get_argument_value(119) > 0.8 then
lVHF_Radio_PRESET = 4
else
lVHF_Radio_PRESET = ""
end
ExportScript.Tools.SendDataDAC("2001", lVHF_Radio_PRESET)
end
-----------------------------
-- Custom functions --
-----------------------------