The generic DME Bendix/King instrument does not have any 'hardware' option available that can be used to externally control its on/off/nav1/nav2 options. Is there a way to create a hardware option for it, so an encoder or rotary switch can be used to control its operation via an Arduino board?
Doing a 'create/edit' gives access to the logic code for the DME instrument, but I am not sure what needs to be changed in the LUA code to allow an encoder to be used to control the selector knob. Can anyone help?
DME generic selector knob control
Re: DME generic selector knob control
Also got this by email, so it's a bit scattered across different channels. Are you sure that you want to use an encoder with a switch, seems a bit odd.
Re: DME generic selector knob control
Ralph - I have an extra encoder laying around, but can use a rotary switch too. No problem.
I am looking at the LUA API functions currently. Is there an example I could follow to change from mouse control to a hardware switch control?
Thanks.
I am looking at the LUA API functions currently. Is there an example I could follow to change from mouse control to a hardware switch control?
Thanks.
Re: DME generic selector knob control
You can go with both options, but they will require different code. So it depends on what you want.
Re: DME generic selector knob control
Ralph - I will communicate with you via email, so I'm not cluttering up the forum.
Pete
Pete
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: DME generic selector knob control
Hi Pete,
Welcome to the forum. Can I suggest not bothering Ralph with emails. He is a very busy and what you ask is quite easy to do.
Take out a few moments and brows through the tutorials Tony has done to assist new peeps to AM. You will find most answers and set you on the road to creating many amazing instruments.
https://www.forums.siminnovations.com/v ... 0fc76abfc2
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
Re: DME generic selector knob control
The forum is meant for cluttering, so don't worry.
Re: DME generic selector knob control
Well said. - The videos by Sling are really good but please post anything you like to the forums at any time. There are always guys here to help.
Joe. CISSP, MSc.
Re: DME generic selector knob control
Ralph and Keith - watched the videos. Whew! I have an Arduino Leonardo coming tomorrow and will work on getting a rotary switch to control the generic DME this weekend.
Thank you guys!
Pete
Thank you guys!
Pete
Re: DME generic selector knob control
Update: I edited the generic Bendix/King DME display to include a 3 way rotary switch. It works great (I had to do some trouble shooting with the callback, since 'switch_add' uses a second optional argument - 'direction' - and hw_switch_add' does not support more than one callback argument. I ended up just hard-coding 'direction = -1' in the callback function body).
However, as soon as I press 'stop' and exit from 'create/edit' and go back to 'home', the external rotary switch is not operating. It does not activate when out of running it in 'create/edit'.
As a side note, if I keep the instrument in the 'run' mode within 'create/edit', and go to 'home', then the rotary switch works. That is ok, but as soon as I added an encoder to the VOR1/ILS instrument, I can't 'run' both simultaneously, so I have to choose between the two instruments (to use an external hardware device) and 'run' only one of them. I can't use both simultaneously back 'home'.
Help!! Thanks. And yes, the DME and VOR1/ILS instruments are included in the panel I am using (C172 SP).
Pete
However, as soon as I press 'stop' and exit from 'create/edit' and go back to 'home', the external rotary switch is not operating. It does not activate when out of running it in 'create/edit'.
As a side note, if I keep the instrument in the 'run' mode within 'create/edit', and go to 'home', then the rotary switch works. That is ok, but as soon as I added an encoder to the VOR1/ILS instrument, I can't 'run' both simultaneously, so I have to choose between the two instruments (to use an external hardware device) and 'run' only one of them. I can't use both simultaneously back 'home'.
Help!! Thanks. And yes, the DME and VOR1/ILS instruments are included in the panel I am using (C172 SP).
Pete