Greeting Master. Is it possible to have a 120 degree switch in FS4. IE a switch in the shape of a Y.
120 Degree switch
-
larrylynx -
April 23, 2024 at 8:49 PM -
Thread is Resolved
-
-
- Official Post
I haven't seen that before but it could be implemented just like a selector knob. You probably won't be able to see the switch being rotated so it won't be apparent that it's rotated along an axis perpendicular to the panel.
-
A fine thought master but there is one problem, the switch also needs to be in the centre position for when the flaps are fixed. In a nut shell there are 3 inputs needed with the fourth being the fixed. So what we have are two manual operations (open and closed) and auto option and a fixed setting where ever the manual settings has positioned it and it is then de-energised (a safety lock I guess)
With the logic you suggest the fixed could effectively be written out using the knob but the animation is the sticking point. The manuals are also spring loaded to reset back to the fixed position.
-
- Official Post
Ok so the primary function is auto or fixed (center), right? Then I would implement that first as an input switch. Then you can add a rocker switch function which uses the Direction2 property in the controls.tmd (check out the flight stick and/or hat switch of the F18 for example).
Whenever the rocker switch is moved you can then reset the normal auto/fixed switch using the Events of the switch.
The more difficult part will be the animation and the VR compatibility.
If you send me the files I can take a look at it and post an example.
-
In my other sim I had a CH Throttle Quad, which has six 'rocker buttons' spring loaded to a centred position. I mapped one to Mags Both in the defaut/centred position. Up (while held) was Mags Off, and down was Start Engine (in case I held it up for too long.) This was for flying rotary engined craft, like the Camel.
Now in my AFS4, I have a Logitec yoke with the elevator trim button/slider mapped Up or Down, while held, and holding the new setting when returned to the spring-loaded centred position for neutral.
My coding skills are pretty rusty these days, but it seems to me the coding for those switches must be very similar to what Larry is looking for.
ATB
MikeW
-
- Official Post
Rocker switches are easy and so are two-position switches. What he is asking for is the combination of the two merged into one switch which he have not had in any aircraft yet.
-
Afternoon Master and apologies for the delay, Doctors appointments.
I have not yet done the coding for this as I was initially stumped as we basically have three switches into one. From what I understand above, a basic input switch and single rocker should enable the logic. As you say the animation is problematic.
Can we use 3 axis's on a single graphical switch ? ie change the axis of rotation of the switch for each output from the logic. For VR the rocker could be positioned higher and between the open/close and the auto point positioned lower than the actual switch to give them separation.
From memory, which I admit is rather suspect most of the time these days
, I believe the KA50 (Blackshark) has similar switches.
-
Yes, you are right, the KA50 has such switches.
-
- Official Post
Afternoon Master and apologies for the delay, Doctors appointments.
I have not yet done the coding for this as I was initially stumped as we basically have three switches into one. From what I understand above, a basic input switch and single rocker should enable the logic. As you say the animation is problematic.
Can we use 3 axis's on a single graphical switch ? ie change the axis of rotation of the switch for each output from the logic. For VR the rocker could be positioned higher and between the open/close and the auto point positioned lower than the actual switch to give them separation.
From memory, which I admit is rather suspect most of the time these days
, I believe the KA50 (Blackshark) has similar switches.
Yes, you can link any combination of graphics transformations (rotation and translation) in a chain, including three different rotations. It's just a matter of sending the right input angle to each rotation and making the angles mutually exclusive (only one can be non zero).
-
This is next on the panels list so I guess my brain may well explode
-
Hi Master
I have included a simple test switch for your guidance, no addon outputs for the oil cooler itself as yet.. The switch will do everything I need in the way of outputs and at the right angles but with a single problem regarding the animation. It will only work on one animation at a time, the last in the queue is the one animated and the other two before it are ignored. If I comment any two out, the remaining one will work no problems.
Is there a way to combine these inputs to a single animated switch. A graphical multiplexer I guess.
Steve
-
- Official Post
OK, I have it working in the Q400 as my taxi light switch. You'll need to integrate it into your own aircraft somehow
For now I have it set up that you can click the switch to toggle auto/off and use the mouse wheel for manual open/close.Please check the pivots, R0 and axes, as I may have accidentally changed them for testing.
Hint: to chain graphics transformations the transformation needs an "InputTransform" from the previous step. If you add the same property "InputTransform" 3x then only the last one is used. Think of the properties of having just one valid state. If you write the same parameter twice the second value just overwrites what ever came before it. So the first two lines for "InputTransform" in your code did nothing.
controls.tmd:
Code
Display More// Oil Cooler Panel <[control_cylinder][FlapEngine1Manual][] <[string8][Type][ switch rocker toggle ]> <[tmvector3d][R0][ 12.162 0.0451 0.8119 ]> <[tmmatrix3d][B0][ -0.7605 -0.0 -0.6493 -0.6493 0.0 0.7605 -0.0 1.0 -0.0 ]> <[tmvector3d][Direction][ 1.0 0.0 0.0 ]> <[tmvector3d][Direction2][ 0.0 1.0 0.0 ]> <[float64][StepDistance][0.005]> <[control_message][OnPush][] <[string8][Message][Oil.Cooler.FlapEngine1Auto]> <[string8][Qualifiers][ toggle ]> <[float64][Value][1.0]> > <[control_message][OnStep][] <[string8][Message][Engine.Cooler.FlapEngine1Manual]> <[string8][Qualifiers][ step ]> <[float64][Value][1.0]> > <[float64][Radius][0.004]> <[float64][Length][0.023]> >
tmd physics:
Code
Display More// Oil Cooler Panel <[input_switch][SwitchOilCoolerFlapsEngine1Auto][] <[string8][Message][Oil.Cooler.FlapEngine1Auto]> <[float64][Value][1.0]> > <[output_free][SwitchOilCoolerFlapsEngine1AutoOutput][] <[string8][Input][SwitchOilCoolerFlapsEngine1Auto.Output]> > <[logic_invert][SwitchOilCoolerFlapsEngine1Manual][] <[string8][Input][SwitchOilCoolerFlapsEngine1Auto.Output]> > <[input_switch_rocker][SwitchFlapEngine1Manual][] <[string8][Message][Engine.Cooler.FlapEngine1Manual]> <[string8][EventsUp] [ SwitchOilCoolerFlapsEngine1Auto.Reset ]> <[string8][EventsDown] [ SwitchOilCoolerFlapsEngine1Auto.Reset ]> <[string8][EventsUpRelease] [ SwitchOilCoolerFlapsEngine1Auto.Reset ]> <[string8][EventsDownRelease][ SwitchOilCoolerFlapsEngine1Auto.Reset ]> > <[logic_greater][FlapEngine1Open][] <[string8][Input0][SwitchFlapEngine1Manual.Output]> <[string8][Input1][0.5]> > <[logic_greater][FlapEngine1Close][] <[string8][Input0][-0.5]> <[string8][Input1][SwitchFlapEngine1Manual.Output]> > <[output_free][FlapEngine1OpenOutput][] <[string8][Input][FlapEngine1Open.Output]> > <[output_free][FlapEngine1CloseOutput][] <[string8][Input][FlapEngine1Close.Output]> >
and tmd graphics:
Code
Display More// Oil Cooler Panel <[graphics_input][FlapEngine1Open][] <[uint32][InputID][FlapEngine1Open.Output]> <[float64][Scaling][0.3]> > <[graphics_input][FlapEngine1Close][] <[uint32][InputID][FlapEngine1Close.Output]> <[float64][Scaling][0.3]> > <[graphics_input][SwitchOilCoolerFlapsEngine1Auto][] <[uint32][InputID][SwitchOilCoolerFlapsEngine1Auto.Output]> <[float64][Scaling][0.3]> > <[graphics_rotation][SwitchOilCoolerFlapsEngine1RotationOpen][] <[string8][Input][FlapEngine1Open.Output]> <[tmvector3d][Axis][ 0.5623 0.5 -0.6586 ]> <[tmvector3d][Pivot][ 10.9560 -0.1654 1.2413 ]> > <[graphics_rotation][SwitchOilCoolerFlapsEngine1RotationClose][] <[string8][Input][FlapEngine1Close.Output]> <[tmvector3d][Axis][ -0.5623 0.5 0.6586 ]> <[tmvector3d][Pivot][ 10.9560 -0.1654 1.2413 ]> <[string8][InputTransform][SwitchOilCoolerFlapsEngine1RotationOpen.Output]> > <[graphics_rotation][SwitchOilCoolerFlapsEngine1Transform][] <[string8][Input][SwitchOilCoolerFlapsEngine1Auto.Output]> <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]> <[tmvector3d][Pivot][ 10.9560 -0.1654 1.2413 ]> <[string8][InputTransform][SwitchOilCoolerFlapsEngine1RotationClose.Output]> > <[rigidbodygraphics][SwitchOilCoolerFlapsEngine1Graphic][] <[uint32][PositionID][Fuselage.R]> <[uint32][OrientationID][Fuselage.Q]> <[string8][GeometryList][ SwitchOilCoolerFlapsEngine1 ]> <[string8][InputTransform][SwitchOilCoolerFlapsEngine1Transform.Output]> // <[string8][InputIllumination0][PilotWanderLighting.Output]> >
-
Once again thanks Master
My logic does work with your graphics entries, nearly, it just doesn't re-centre and we can push on the open and close parts of the panel rather than on the button.
Just tallied up the switches in the aircraft (so far) a small number of 186, only 88 to go, no wonder its taking FOREVER
and still more to add when I do the side panels. GROAN. Lets not mention buttons, knobs and instruments. Gauges are done.
-
- Official Post
Before you had four control click spot, I only used one, check if the others are commented out for testing.
Also make sure that the switch is exported in the center position, otherwise it will already be deflected by the exported position...