Jump to content

Landing gear indicators inverted


BravoYankee4

Recommended Posts

Hi

 

What happens is that the red and green lights are lit at the same time. The green are properly lit when the gear is fully extended. But the gear up indicators are inverted.

 

At first I believed this was a bug in the DCS-Bios software (and it is reported in their bug tracker), but since it is the exact same behavior in HawgTouch it seems that there is a bug in the export from the module.

 

Can it be that the HT and DCS-Bios is using the same export script, and then having the problem in the script, not the actual export data?

Anyone that could have a look at this?

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 year later...

So, here is the solution.

Disclaimer - I have not used this script for a long time, so there is no guarantee that it is still working in the current versions of DCS-Bios or DCS World.

 

First, edit the DCS-Bios "Util.lua" file with the following additions and/or changes in red:

 

function BIOS.util.defineIndicatorLight(msg, arg_number, category, description, negate) --change

--moduleBeingDefined.highFrequencyMap[msg] = function(dev0) return string.format("%.0f", dev0:get_argument_value(arg_number)) end

local value = moduleBeingDefined.memoryMap:allocateInt {

maxValue = 1

}

assert(value.shiftBy ~= nil)

moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(dev0)

negate = negate or false --new

if negate == false then --new

if dev0:get_argument_value(arg_number) < 0.5 then

value:setValue(0)

else

value:setValue(1)

end

else --new

if dev0:get_argument_value(arg_number) > 0.5 then --new

value:setValue(0) --new

else --new

value:setValue(1) --new

end --new

end --new

end --new

document {

identifier = msg,

category = category,

description = description,

control_type = "led",

inputs = {},

outputs = {

{ ["type"] = "integer",

suffix = "",

address = value.address,

mask = value.mask,

shift_by = value.shiftBy,

max_value = 1,

description = "0 if light is off, 1 if light is on"

}

}

}

end

 

 

You also need to do some changes in the "Mig21.lua" file:

 

defineIndicatorLight("GEAR_NOSE_UP", 9, "Landing Gear Control", "Nose Gear Up Light", true)

defineIndicatorLight("GEAR_LEFT_UP", 10, "Landing Gear Control", "Gear Left Up Light", true)

defineIndicatorLight("GEAR_RIGHT_UP", 11, "Landing Gear Control", "Gear Right Up Light", true)

Link to comment
Share on other sites

In the cockpit the landing gear indicator lights are working as expected (red uplocks, green downlocks). Is this only happening in DCS-BIOS?

 

Yes, and also in Ikarus in the beginning before corrected in an update. Not sure how Capt Zeen has handled this in the Helios profile.

Link to comment
Share on other sites

Unfortunately for me it did not help, remained unchanged. There are those who it helped?

 

Sorry it didn't help. I had it working before but as stated above, it was a long time ago, and things might have changed in both DCS and DCS-Bios since then. If I get the time I will try again and see if I can get it working properly.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...