I just got the Knobster and I don't think the push button is working. I've tried mapping it as a push button, then as a push-and-release button, neither works. I've mapped the command to a button and the command works, only with the button and not with the Knobster's push button. Air Plugin is 3.2, Air Manager is 3.7. Is there any other way to test the Knobster? I've tried disconnecting then reconnecting the device, I've restarted both XP and Air Manager multiple times, still nothing.
Thanks!
Push button not working?
Re: Push button not working?
The Knobster does not work with buttons, only if they're on a dial. Only switches and dials. A button wouldn't make sense for the Knobster, because you have to select the button anyway.
Re: Push button not working?
As Ralph says it’s not designed to work with individual buttons. To test it you need a rotary control that has a button co-located such as a heading bug knob with push to sync or one of the GPS knobs with a button on the end of the shaft.
Tony
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
-
- Posts: 256
- Joined: Wed May 30, 2018 8:47 pm
Re: Push button not working?
Sorry, what I mean is that I am mapping the push button on the Knobster to a command and it does not work. I tried it on the Garmin 530 on the Cessna 172 and it's working so at least it's not a defective unit which was my initial worry.
When I said push and push-and-release, I was referring to these formats:
dial_id = dial_add(image, x, y, width, height, direction_callback, pressed_callback)
dial_id = dial_add(image, x, y, width, height, direction_callback, pressed_callback, released_callback)
I tried that as well because I noticed on some aircraft, a command would not be recognized if it was just a quick press and needed a slight pause between the push and the release of the button.
Here is my actual code:
In the sim, when I press the spd dial, it changes readout from knots to mach. Using the push button on the Knobster to do the same doesn't work. There's a similar function for the heading dial where pressing the button would sync the heading bug to the current heading, that doesn't work either.
I mapped the same command to a button and it works no issues.
When I said push and push-and-release, I was referring to these formats:
dial_id = dial_add(image, x, y, width, height, direction_callback, pressed_callback)
dial_id = dial_add(image, x, y, width, height, direction_callback, pressed_callback, released_callback)
I tried that as well because I noticed on some aircraft, a command would not be recognized if it was just a quick press and needed a slight pause between the push and the release of the button.
Here is my actual code:
Code: Select all
function spd_sync_press()
xpl_command("sim/autopilot/knots_mach_toggle")
end
dial_spd = dial_add("red.png", 490, 73, 101, 101, 5, spd_dir, spd_sync_press)
Code: Select all
function hdg_sync_press()
xpl_command("sim/autopilot/heading_sync")
end
dial_hdg = dial_add("red.png", 187, 73, 101, 101, 5, hdg_dir, hdg_sync_press)
I mapped the same command to a button and it works no issues.
Code: Select all
function hdg_press()
xpl_command("sim/autopilot/heading_sync")
end
btn_hdg = button_add("red.png", "red.png", 187, 0, 101, 72, hdg_press)
Re: Push button not working?
You are not understanding how the knobster works.
You cannot write code specifically for the knobster. The knobster will automatically provide a hardware control for corresponding soft controls. The dial pressed and released callbacks are related to the operation of the dial and does not refer to a button. These will get called as the dial is rotated. If you want a button on the end of a dial shaft think about how you would need to code that as a soft control. Check the GNS dials that have end buttons if you can’t picture what’s needed. Essentially it means you need to locate a button on top of a dial. The co-located button callback is where the command for the knobster button operation needs to go.
Tony
You cannot write code specifically for the knobster. The knobster will automatically provide a hardware control for corresponding soft controls. The dial pressed and released callbacks are related to the operation of the dial and does not refer to a button. These will get called as the dial is rotated. If you want a button on the end of a dial shaft think about how you would need to code that as a soft control. Check the GNS dials that have end buttons if you can’t picture what’s needed. Essentially it means you need to locate a button on top of a dial. The co-located button callback is where the command for the knobster button operation needs to go.
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
-
- Posts: 256
- Joined: Wed May 30, 2018 8:47 pm
Re: Push button not working?
Thanks! I took a look at the GNS dials and it made more sense.