My panel is using Knobster. But I dont want to use Knobster for any of my 3-way switches (or rocker switches, are they called ?).
Is there a way to do that ?
I'm using button_add(nil,nil) just above and just below the switch for me to switch up/down without Knobster.
I guess I could create a small panel that is not Knobster aware and put the instrument in that panel and place it above the other panel ?
Seems more awkward tho than using button_add() tho
3-way switch without Knobster
Re: 3-way switch without Knobster
Hi,
By default AM will not apply the knobster focus to anything less than a 3 way switch so normal up/dn or left/right toggle switches do not need to use knobster. Note that you can force these to give knobster focus in code. Dials and switches of 3 ways or more will always take knobster focus. The solution if you don’t want knobster to operate the control is to use something else as the control and manage the graphics in code just as you have done with using buttons.
By default AM will not apply the knobster focus to anything less than a 3 way switch so normal up/dn or left/right toggle switches do not need to use knobster. Note that you can force these to give knobster focus in code. Dials and switches of 3 ways or more will always take knobster focus. The solution if you don’t want knobster to operate the control is to use something else as the control and manage the graphics in code just as you have done with using buttons.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: 3-way switch without Knobster
I'm also not sure why the 3 position switch becomes a knobster region. Doesn't seem to work well, if at all. My 3 position works great as a touch, but with knobster it highlights and the knobster doesn't even move it. Shouldn't the knobster should be for knobs and not switches?
Re: 3-way switch without Knobster
I've never heard that it doesn't do 3 positions. Do you have an example of an instrument?
Re: 3-way switch without Knobster
Sure here is an example of the 3 way C90 inverter switch for x-plane. If you run the instrument, you'll see it works great in the instrument running tool... but if you put it on a knobster panel it work work at all.
Re: 3-way switch without Knobster
What do you mean with a Knobster panel?
Re: 3-way switch without Knobster
doog,
Your instrument has coding errors that is why it doesn't work. if you try to click the switch before the subscribe is running errors are reported. A few of notes to help you out.
When posting instruments to the forum its best to use the Air Manager export function to generate a .siff file so others can easily import to help you. .zip requires extra work and may put some off.
The switch_add() function should not use a subscribe callback as its callback and unless you are intending on specifically using the optional press and release callbacks the switch_add function should only have one callback.
The knobster not working may be related to the fact you are not using the switch positions sequencially. Try making up position 0, off position 1 and down position 2 and try it again. The Knobster is just a dial that increments or decrements the position by one with each click so lt needs sequential positions I think. Sorry don't have time to check it myself.
Tony
Your instrument has coding errors that is why it doesn't work. if you try to click the switch before the subscribe is running errors are reported. A few of notes to help you out.
When posting instruments to the forum its best to use the Air Manager export function to generate a .siff file so others can easily import to help you. .zip requires extra work and may put some off.
The switch_add() function should not use a subscribe callback as its callback and unless you are intending on specifically using the optional press and release callbacks the switch_add function should only have one callback.
The knobster not working may be related to the fact you are not using the switch positions sequencially. Try making up position 0, off position 1 and down position 2 and try it again. The Knobster is just a dial that increments or decrements the position by one with each click so lt needs sequential positions I think. Sorry don't have time to check it myself.
Tony
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: 3-way switch without Knobster
The console error is just a missing sound file, cause i threwit together quick but it's not relevant to the discussion. Same issue without that line. The subscribe is needed to put the switch in the correct position if it’s moved in the sim and not the panel. The sequence order doesn't matter. I also think in general it’s weird to force knobster focus on a switch… it’s not how switches should move in my opinion.Sling wrote: ↑Fri Sep 03, 2021 7:26 am
The switch_add() function should not use a subscribe callback as its callback and unless you are intending on specifically using the optional press and release callbacks the switch_add function should only have one callback.
The knobster not working may be related to the fact you are not using the switch positions sequencially. Try making up position 0, off position 1 and down position 2 and try it again. The Knobster is just a dial that increments or decrements the position by one with each click so lt needs sequential positions I think. Sorry don't have time to check it myself.
Tony
Last edited by doog on Sat Sep 04, 2021 10:28 pm, edited 2 times in total.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: 3-way switch without Knobster
Hi,
IMHO only switches assigned <mode> 'CIRCULAR' should attract knobster functionality,
I don't use knobster so this is just my perception.
Keith
IMHO only switches assigned <mode> 'CIRCULAR' should attract knobster functionality,
I don't use knobster so this is just my perception.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card