Hardware/Software Synergy

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

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

Re: Hardware/Software Synergy

#11 Post by Keith Baxter »

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.
ice_screenshot_20190715-202657.png

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 

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

Re: Hardware/Software Synergy

#12 Post by Keith Baxter »

All that I can hope for is that Corjan sees the benefit and finds a way to implement.
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 

SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Hardware/Software Synergy

#13 Post by SimPassion »

Keith Baxter wrote: Mon Jul 15, 2019 6:25 pm
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
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
Sorry Keith, this time I've missed something, as I don't see the same callback in both situations : software vs hardware
How do we manage the position with a single function ?

viewtopic.php?p=18585#p18585

Gilles

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

Re: Hardware/Software Synergy

#14 Post by Keith Baxter »

SimPassion wrote: Mon Jul 15, 2019 7:09 pm
Keith Baxter wrote: Mon Jul 15, 2019 6:25 pm
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
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
Sorry Keith, this time I've missed something, as I don't see the same callback in both situations : software vs hardware
How do we manage the position with a single function ?

viewtopic.php?p=18585#p18585

Gilles
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 

SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Hardware/Software Synergy

#15 Post by SimPassion »

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

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

Re: Hardware/Software Synergy

#16 Post by Keith Baxter »

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
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 

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Hardware/Software Synergy

#17 Post by Sling »

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
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

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Hardware/Software Synergy

#18 Post by Sling »

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
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.

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

Re: Hardware/Software Synergy

#19 Post by Keith Baxter »

Sling wrote: Mon Jul 15, 2019 8:14 pm
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
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
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 

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

Re: Hardware/Software Synergy

#20 Post by Keith Baxter »

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
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