Hardware/Software Synergy
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Hardware/Software Synergy
Just as a side. I started to code the Zibo overhead panels for hardware. With our new set of MIP projects I started to draw the panel in canvas_draw so that my work could also be of benifit to others that might not have the funds to go the full sim hardware rout.
I quickly changed my mind with the reality that I would have to double code some 120 odd rotary and toggle switches. Maybe some day in the future I will pick up the project again.
Here is the start of what I intended. You can see that I have already drawn the panel outlines in RED.
Keith
I quickly changed my mind with the reality that I would have to double code some 120 odd rotary and toggle switches. Maybe some day in the future I will pick up the project again.
Here is the start of what I intended. You can see that I have already drawn the panel outlines in RED.
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
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Hardware/Software Synergy
All that I can hope for is that Corjan sees the benefit and finds a way to implement.
Looking forward to his comments.
Keith
Looking forward to his comments.
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
-
- Posts: 5336
- Joined: Thu Jul 27, 2017 12:22 am
Re: Hardware/Software Synergy
Sorry Keith, this time I've missed something, as I don't see the same callback in both situations : software vs hardwareKeith Baxter wrote: ↑Mon Jul 15, 2019 6:25 pmGilles,SimPassion wrote: ↑Mon Jul 15, 2019 6:01 pm Another idea, perhaps something like this ?
cpt_main_du = switch_add(nil,nil,nil,nil,nil,25, 25, 50,50,hw_enable,software_callback,hardware_callback)
Gilles
You don't need hw_enabled and the different callback's. The hardware is enabled by assigning the pins in the console. The callbacks are the same for both soft and hardware devices. Just like they are now.
Keith
How do we manage the position with a single function ?
viewtopic.php?p=18585#p18585
Gilles
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Hardware/Software Synergy
Gilles,SimPassion wrote: ↑Mon Jul 15, 2019 7:09 pmSorry Keith, this time I've missed something, as I don't see the same callback in both situations : software vs hardwareKeith Baxter wrote: ↑Mon Jul 15, 2019 6:25 pmGilles,SimPassion wrote: ↑Mon Jul 15, 2019 6:01 pm Another idea, perhaps something like this ?
cpt_main_du = switch_add(nil,nil,nil,nil,nil,25, 25, 50,50,hw_enable,software_callback,hardware_callback)
Gilles
You don't need hw_enabled and the different callback's. The hardware is enabled by assigning the pins in the console. The callbacks are the same for both soft and hardware devices. Just like they are now.
Keith
How do we manage the position with a single function ?
viewtopic.php?p=18585#p18585
Gilles
You will not require another callback because the "virtual switch" is assigned a pin. Just as it is in "NAMED HARDWARE" . There is no need to tell the switch what position it is in. The switch is in a position. All you need to do is tell the sim to go to that position. Not the sim to tell the switch to go to that position.
It must work exactly the same as the hardware switch which has no need for multi callbacks.
It is exactly this point that makes the coding of hardware devices far simpler.
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
-
- Posts: 5336
- Joined: Thu Jul 27, 2017 12:22 am
Re: Hardware/Software Synergy
There's indeed something I have to re read and figure out, this is surely due to my English reading which reached its limits
I will try to translate and try to understand further
Thanks for the answer Keith
Gilles
I will try to translate and try to understand further
Thanks for the answer Keith
Gilles
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Hardware/Software Synergy
I think the point that peeps are missing is that there is ONE switch in TWO different forms.
Just like 20 euros.
You have a physical bank note and you have an electronic fund transfer. Both are 20 euros.
So you have a physical switch and you have a "virtual" switch. Both do exactly the same and have the exact same function.
Keith
Just like 20 euros.
You have a physical bank note and you have an electronic fund transfer. Both are 20 euros.
So you have a physical switch and you have a "virtual" switch. Both do exactly the same and have the exact same function.
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: Hardware/Software Synergy
Keith,Keith Baxter wrote: ↑Mon Jul 15, 2019 7:30 pm Gilles,
You will not require another callback because the "virtual switch" is assigned a pin. Just as it is in "NAMED HARDWARE" . There is no need to tell the switch what position it is in. The switch is in a position. All you need to do is tell the sim to go to that position. Not the sim to tell the switch to go to that position.
It must work exactly the same as the hardware switch which has no need for multi callbacks.
It is exactly this point that makes the coding of hardware devices far simpler.
Keith
Sorry but you are still missing the fundamental differences. You absolutely need the soft switch to be able to receive input from the sim to keep them in sync. That is the preferred wiki method. You need to understand this to see why it’s required. You said I had valid comments but you did not address how they can be incorporated into your proposed new function. I may suggest possibly with an argument to select open or closed loop.
IMHO I think adding arguments to a function that are not used as you suggest for the x,y,w,h etc is even more confusing for a newbie. I also need the hardware functions to retain support for direct hardware assingment. I.e not named hardware. How will this be handled?
You don’t need to code soft and hard switches twice. You code for the soft and then add in hardware often using no or very little additional callback code. Simple. Remember soft first then hardware.
Sorry to rain on your parade but there are some flaws in your thinking. I’m all for simplification if it makes things better but I’m not convinced this does.
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: Hardware/Software Synergy
The analogy is left field but using it I would say it’s more like 20 Euro’s and 20 dollars. They are sort of the same but different. So you need some different steps to deal with the alternative.Keith Baxter wrote: ↑Mon Jul 15, 2019 7:45 pm I think the point that peeps are missing is that there is ONE switch in TWO different forms.
Just like 20 euros.
You have a physical bank note and you have an electronic fund transfer. Both are 20 euros.
So you have a physical switch and you have a "virtual" switch. Both do exactly the same and have the exact same function.
Keith
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
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Hardware/Software Synergy
Tony,Sling wrote: ↑Mon Jul 15, 2019 8:14 pmKeith,Keith Baxter wrote: ↑Mon Jul 15, 2019 7:30 pm Gilles,
You will not require another callback because the "virtual switch" is assigned a pin. Just as it is in "NAMED HARDWARE" . There is no need to tell the switch what position it is in. The switch is in a position. All you need to do is tell the sim to go to that position. Not the sim to tell the switch to go to that position.
It must work exactly the same as the hardware switch which has no need for multi callbacks.
It is exactly this point that makes the coding of hardware devices far simpler.
Keith
Sorry but you are still missing the fundamental differences. You absolutely need the soft switch to be able to receive input from the sim to keep them in sync. That is the preferred wiki method. You need to understand this to see why it’s required. You said I had valid comments but you did not address how they can be incorporated into your proposed new function. I may suggest possibly with an argument to select open or closed loop.
IMHO I think adding arguments to a function that are not used as you suggest for the x,y,w,h etc is even more confusing for a newbie. I also need the hardware functions to retain support for direct hardware assingment. I.e not named hardware. How will this be handled?
You don’t need to code soft and hard switches twice. You code for the soft and then add in hardware often using no or very little additional callback code. Simple. Remember soft first then hardware.
Sorry to rain on your parade but there are some flaws in your thinking. I’m all for simplification if it makes things better but I’m not convinced this does.
Tony
I will do a video that will explain what I am talking about.
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
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Hardware/Software Synergy
I hope this explains what I suggest.
Remember, from AM 3.5 Corjan added the NAMED hardware function.
I want the same for soft switches. Lets call it NAMED devices.
Keith
Remember, from AM 3.5 Corjan added the NAMED hardware function.
I want the same for soft switches. Lets call it NAMED devices.
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