JG14_Smil Posted December 5, 2012 Posted December 5, 2012 (edited) Hello, I figure I would post this here instead of the Helios website. When using output bindings for BS2 lights with the Phidgets controller, using the "toggle" binding will always result in a reversed output from the switch as Helios counts the initial entry to the sim as a toggle state. The toggle binding is needed for any LEDs that require " set brightness" binding to change it's output. Another issue I see is I can get the Phidget's NV cockpit LED binding to bind to the Helios NV lights switch binding, but my blue cockpit LED's are always toggled on at mission start and therefore opposite of my hardware switch. There is no output binding for any lighting in Helios (BS2). There is no way to get the hardware switch to sync by using the "set" binding. Is there a lua code argument that can be added to stop or change this initial unwanted "toggle" at the mission start? Edited December 24, 2012 by JG14_Smil
Gadroc Posted December 5, 2012 Posted December 5, 2012 99% of the time you shouldn't need/use toggle. Can you explain how you have your lighting switches hooked up and bound to the sim? If using hardware switches how are they connected to the PC (joystick emulator, open cockpits, etc...)?
JG14_Smil Posted December 5, 2012 Author Posted December 5, 2012 (edited) sure. I create virtual buttons that I send to Helios as HID controllers. I say my hardware = my virtual buttons in code and the buttons light up in Helios for use with bindings. That is not the issue. Some LED's are too bight when initialized when using the "Set Power" binding. The "Set Brightness" binding does not work when using the "Set Power" binding. The "Set Brightness" binding works as it should with the "Toggle Power" binding. All is great here until you have a LED that changes state at mission start, then it will be out of sync due to the toggle binding, which you must use to control the brightness of the LED. That is issue #1. Issue #2 is there are no bindings for "Lighting" outputs from Helios to bind to my LED that is for night vision cockpit lighting. (high-intensity blue LED's) The only bindings for "Lighting" are for switches. I do not normally bind LEDs to switches, but I am trying it as a work-around of not having output bindings to bind to. As a work around, it almost works, but the same issue as #1 arrises. The toggle binding flips at the mission start (as it should, but it would be great if I could make it stop doing it on command). so, you see I must use the toggle binding. Edited December 5, 2012 by JG14_Smil
JG14_Smil Posted December 5, 2012 Author Posted December 5, 2012 I just wanted to add... If I use a cold start, there are no issues at all as the lights are always off at mission start. I do not have to bind my NV LED's through Helios, was just trying it for the sake of syncronisation. Perhaps the easiest fix is to have the "Set Power" binding have an argument that starts the LED at a brightness level percentage(?). Really just making note of this for further development of Helios and not in any hurry for you to do work. Thank you, all the best.
Gadroc Posted December 5, 2012 Posted December 5, 2012 Some LED's are too bight when initialized when using the "Set Power" binding. The "Set Brightness" binding does not work when using the "Set Power" binding. In the Phidgets setup screen you can set the default brightness for a LED group (slider above check boxes). Set power should just turn power on / off and not change the brightness. There usually is a brightness knob in the cockpit, which would negate the need to do that even. Bind it's output value from the sim to the "Set Brightness" in Helios using a lua script multiplier to get the right range. (Ex: Sim outputs 0-1 and Phidgets expects 0-100 - "return TriggerValue * 100"). I do not normally bind LEDs to switches, but I am trying it as a work-around of not having output bindings to bind to. Why? Setting the lights based on the position of the switch is the right way to do it. Bind switch entering on position to "Set Power" with a value of true and switch entering exit position to "Set Power" with a value of false. If you do this binding from the outputs of the BS2 switches it will always sync your lighting to the state of the cockpit at mission start (although your physical switches may be out of sync). If you think about it this is how the actual cockpit works, toggle switch completes the circuit to allow power to flow to cockpit lights.
JG14_Smil Posted December 5, 2012 Author Posted December 5, 2012 (edited) In the Phidgets setup screen you can set the default brightness for a LED group (slider above check boxes). Set power should just turn power on / off and not change the brightness. There usually is a brightness knob in the cockpit, which would negate the need to do that even. Bind it's output value from the sim to the "Set Brightness" in Helios using a lua script multiplier to get the right range. (Ex: Sim outputs 0-1 and Phidgets expects 0-100 - "return TriggerValue * 100"). That slider does not affect any binding output. First thing I tried. I will look into the script multiplier.. that is what I need. TY! Why? Setting the lights based on the position of the switch is the right way to do it. Bind switch entering on position to "Set Power" with a value of true and switch entering exit position to "Set Power" with a value of false. If you do this binding from the outputs of the BS2 switches it will always sync your lighting to the state of the cockpit at mission start (although your physical switches may be out of sync). If you think about it this is how the actual cockpit works, toggle switch completes the circuit to allow power to flow to cockpit lights. Nope. Tried setting it to false and it did not change anything. The output bindings for "Lighting" are for GUI switches. I do not use those. No. A LED is meant to be bound to an output, not a switch binding. The LED is supposed to follow the sim first and foremost, without touching any of my real life switches. It is the whole point of using exported bindings. I can turn lights on and off all day long if I wanted that. LED on or off at mission start, the switch is always in sync when using bindings. Again, thanks for what you have given me. It is all I need, hopefully. Edited December 5, 2012 by JG14_Smil
JG14_Smil Posted December 5, 2012 Author Posted December 5, 2012 While we are at it... The switch bindings for the NV cockpitlights do not work in Helios, among others.
Gadroc Posted December 5, 2012 Posted December 5, 2012 Send me a PM with specific switches that are not working and I'll look into them. Some of them where bugs in DCS which I could not fix. As for the correct bindings there are three output bindings from DCS BS in. Panel Lights changed -> Bind this to "Set Power" on your backlight groups with the following lua script value "return TriggerValue==1". This translates a panel lights switch position of on to true and other values would be false. This output comes form the sim and will follow whatever you do in the virtual cockpit or real switches that send commands to DCS. Night Vision Lighting changed -> Bind this to your night vision LED groups with the same lua trigger value. ADI & SAI Lights -> same thing with the ADI & SAI groups. It's been a while since I've flown the Shark I'll have to look to see where/if the dimming knob is for internal lighting.
Gadroc Posted December 5, 2012 Posted December 5, 2012 There is a lighting brightness panel, but it doesn't look like Helios exposes it. I'll get that put in.
JG14_Smil Posted December 25, 2012 Author Posted December 25, 2012 Hello, I found the source of my problem and it is resolved. Sorry for any confusion it caused. I can use both the Set Brightness and Set Power bindings together. My problem was (I think), my Set Power binding was using "Static Value". I learned that if I use "Trigger Value" in the Set Power binding, all works as it should, with the LED initialsed at the lower brightness. I also found that editing the original Set Power binding did nothing; I had to delete it and use a new one with the Trigger Value setting. In a nuthsell, I deleted the old bindings, Set Brightness to xx, then Set Power. whatever it was, all is well now.
Recommended Posts