Jocman Posted June 27, 2018 Posted June 27, 2018 I start this (little) new topic just to have a clarification about the SwitchMultiPos function. As it will be used to manage rotary switches or similar, I'd need to understand this: i.e. the NavLight have 4 sets: 10/30/100/OFF, so I expect 4 position (4 pins), but the reference reports 5 position (5 pins). Same issue for all the SwitchMultiPos in the reference. Can you explain the issue? why there's always 1 pin more than the switch positions? Thanks Jocman "For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return" (L. Da Vinci) Prev. Projects: https://forums.eagle.ru/showthread.php?t=50071
Jocman Posted July 4, 2018 Author Posted July 4, 2018 I give myself the answer. After some test (I tried all the rotary - or multi - switches in the Ka50 cockpit), I can say the following: In the overhead panel, the 2 switches NavLights and WindshieldWiper can be wired to 4 pins instead of 5 (as reported in the reference), saving this way 2 pins. In fact, the 5th position is such a "ghost" one: if you click the cockpit switch, it will works only in left, center, right, down position. Using a physical switch (a rotary), the first 4 positions drive correctly the 4 values (off,10,30,100), but the 5th moves the lever upward (there's nothing functional in the sim about this 5th position). Same issue about the windshield wiper. So, I can say this 5th one can be deleted without any problem; I also modified the code [font=Times New Roman][size=3][font=Courier New]constbyte opWindshieldWiperPins[5] = {[i][color=red]PIN_0, PIN_1,PIN_2, PIN_3, PIN_4[/color][/i]};[/font][font=Courier New] [/font][font=Courier New]DcsBios::SwitchMultiPosopWindshieldWiper("OP_WINDSHIELD_WIPER", opWindshieldWiperPins, 5);[/font] [/size][/font] to [font=Times New Roman][size=3][font=Courier New]const byte opWindshieldWiperPins[4] = {[i][color=red]PIN_0, PIN_1, PIN_2, PIN_3[/color][/i]};[/font][font=Courier New] [/font][font=Courier New]DcsBios::SwitchMultiPos opWindshieldWiper("OP_WINDSHIELD_WIPER", opWindshieldWiperPins, 4);[/font] [/size][/font] I don't know if is correct, but it works fine Same thing for the windshield wiper No such issue for the rest of the rotaries (no need of change and, unfortunately, no pins to save) If I wrote/made/told something wrong, please correct me Jocman "For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return" (L. Da Vinci) Prev. Projects: https://forums.eagle.ru/showthread.php?t=50071
Recommended Posts