Knobster button command in knobXP plugin

Support for KnobXP, share your experience and KnobXP modes.

Moderators: Ralph, russ

Message
Author
Bulva
Posts: 23
Joined: Tue Mar 19, 2019 1:13 am

Knobster button command in knobXP plugin

#1 Post by Bulva » Tue Mar 30, 2021 5:48 am

I would like to assign the VS / ALT mode change function to the button knobster:
1.jpg
The responsible command is:

sim / cockpit2 / autopilot / alt_vvi_is_showing_vvi

How do I make one press of the Knobster button activate VS and pressing the button again activate ALT ???

Will this modes file work correctly ???

"name": "AP_ALT_VS",
"minor_cw_cmd": "sim / autopilot / altitude_up",
"minor_ccw_cmd": "sim / autopilot / altitude_down",
"minor_acceleration": 10,
"major_cw_cmd": "sim / autopilot / vertical_speed_up",
"major_ccw_cmd": "sim / autopilot / vertical_speed_down",
"major_acceleration": 10,
"button_released_cmd": "sim / cockpit2 / autopilot / alt_vvi_is_showing_vvi",
"order": 703000

User avatar
Keith Baxter
Posts: 2893
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Knobster button command in knobXP plugin

#2 Post by Keith Baxter » Tue Mar 30, 2021 7:32 am

Hi,

I would create a button as a counter something like this.

Code: Select all

--Create a button as a counter
vs_alt_mode=0
function callback_pressed()
   vs_alt_mode=vs_alt_mode+1
   if vs_alt_mode >1 then vs_alt_mode =0 end
  print("Mode code is  "..vs_alt_mode)
end
button_id = button_add("a.png", "b.png", 100,100,200,200,callback_pressed)
Then in your dial use <vs_alt_mode> as a filter.

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 

Bulva
Posts: 23
Joined: Tue Mar 19, 2019 1:13 am

Re: Knobster button command in knobXP plugin

#3 Post by Bulva » Tue Mar 30, 2021 2:49 pm

Thank You very, very, very much. :D
I hope to be able to deal with it as soon as the purchased knobster arrives.

PS. Maybe in the next update, you will include this mod. It is found in many aircraft. ;)

User avatar
Ralph
Posts: 5159
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Knobster button command in knobXP plugin

#4 Post by Ralph » Tue Mar 30, 2021 2:52 pm

Your script is for Air Manager Keith, there's no scripting in KnobXP. There's no second press option in KnobXP. You'll have to use two separate modes.

User avatar
Corjan
Posts: 2424
Joined: Thu Nov 19, 2015 9:04 am

Re: Knobster button command in knobXP plugin

#5 Post by Corjan » Tue Mar 30, 2021 2:53 pm

Hi,

To be clear, the script Keith posted cannot be used with the Knobster.
Instead you have to connect your own button/rotary encoder to an Arduino.

Corjan

User avatar
Keith Baxter
Posts: 2893
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Knobster button command in knobXP plugin

#6 Post by Keith Baxter » Tue Mar 30, 2021 2:58 pm

Corjan wrote:
Tue Mar 30, 2021 2:53 pm
Hi,

To be clear, the script Keith posted cannot be used with the Knobster.
Instead you have to connect your own button/rotary encoder to an Arduino.

Corjan
Ok my Bad I did not take in the "knobXP" bit

Now I need some education as some peeps are wanting me to do a entegra overlay bezel for use with Knobster.

A button is not available in Knobster?

And why is AM code inconsistent across features? Should they not be the same?

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 

Bulva
Posts: 23
Joined: Tue Mar 19, 2019 1:13 am

Re: Knobster button command in knobXP plugin

#7 Post by Bulva » Tue Mar 30, 2021 4:28 pm

Ralph wrote:
Tue Mar 30, 2021 2:52 pm
Your script is for Air Manager Keith, there's no scripting in KnobXP. There's no second press option in KnobXP. You'll have to use two separate modes.
Well, my joy lasted very shortly ;)

User avatar
Keith Baxter
Posts: 2893
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Knobster button command in knobXP plugin

#8 Post by Keith Baxter » Tue Mar 30, 2021 4:32 pm

Bulva wrote:
Tue Mar 30, 2021 4:28 pm
Ralph wrote:
Tue Mar 30, 2021 2:52 pm
Your script is for Air Manager Keith, there's no scripting in KnobXP. There's no second press option in KnobXP. You'll have to use two separate modes.
Well, my joy lasted very shortly ;)
Hi,

I am Sorry to mislead. Not my intention. I Speed read and did not take into account the kbobXP.

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 

Bulva
Posts: 23
Joined: Tue Mar 19, 2019 1:13 am

Re: Knobster button command in knobXP plugin

#9 Post by Bulva » Tue Mar 30, 2021 4:55 pm

No problem ;-). Willingness is what counts and I thank you very much for that ;-)
Then I have another stupid question.
If I could create a simple lua script with my own command that would switch ALT to VS and vice versa, with a single key, is it possible to assign this command to a Knobster button in knobXP ???

User avatar
Keith Baxter
Posts: 2893
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Knobster button command in knobXP plugin

#10 Post by Keith Baxter » Tue Mar 30, 2021 5:33 pm

Bulva wrote:
Tue Mar 30, 2021 4:55 pm
No problem ;-). Willingness is what counts and I thank you very much for that ;-)
Then I have another stupid question.
If I could create a simple lua script with my own command that would switch ALT to VS and vice versa, with a single key, is it possible to assign this command to a Knobster button in knobXP ???
Hi,

That one is for @Corjan or @Ralph

It is possible via Air Manager not using knobXP plugin.

That is the code I posted.

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 

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest