Can someone provide some help/guidance on how use a simple HSM with multiple instances in QPC?
I've build a HSM to manage a physical button press/hold behavior in a custom PCB board.
The board has four buttons. So I need four instances of the HSM, one for each button. I've designed the HSM as an QActive object and tested it to one button, and worked perfectly.
Now I need to adjust it to accept all buttons. Can someone help?
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please take a look at the standard examples that ship in the QP baseline distros. For example, the DPP (Dining Philosophers Problem) example shows 5 identical "philosopher" active objects, which are all instances of the same class Philo. In the "Fly 'n' Shoot" game example, there are 20 Mines objects: 10 instances of the class Mine1 and 10 of the class Mine2. In this latter case, the Mines are simple state machines, not active objects.
I hope a look at these examples will answer your questions.
--MMS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
Can someone provide some help/guidance on how use a simple HSM with multiple instances in QPC?
I've build a HSM to manage a physical button press/hold behavior in a custom PCB board.
The board has four buttons. So I need four instances of the HSM, one for each button. I've designed the HSM as an QActive object and tested it to one button, and worked perfectly.
Now I need to adjust it to accept all buttons. Can someone help?
Thank you!
Please take a look at the standard examples that ship in the QP baseline distros. For example, the DPP (Dining Philosophers Problem) example shows 5 identical "philosopher" active objects, which are all instances of the same class
Philo. In the "Fly 'n' Shoot" game example, there are 20 Mines objects: 10 instances of the classMine1and 10 of the classMine2. In this latter case, the Mines are simple state machines, not active objects.I hope a look at these examples will answer your questions.
--MMS