GlobalVent / wiki

central place organize jamvent
GNU General Public License v3.0
3 stars 0 forks source link

Proposal API for GUI/Controller Interface #158

Closed carlyjb closed 4 years ago

carlyjb commented 4 years ago

Make the interface serial/i2c agnostic for the GUI?

Alan to write out an API to propose to @jwildhome and @ralphBellofattoSTX

Part of a question about is it worth using the Photon as a quick patch.

ralphBellofattoSTX commented 4 years ago

This has already been done and an abstract base class has already been created to do this.

Please refer to the interface defined here: https://github.com/GlobalVent/prototypes/tree/master/jamventProto/jamhwlib

To use it, it needs to be filled out and then connected to a control library: https://github.com/GlobalVent/prototypes/tree/master/jamventProto/jamctrllib

and as for an overall design that also calls out for this abstraction is also articulated here. https://github.com/GlobalVent/wiki/issues/31#issuecomment-616689746

So, before people ask for more work on this, please review the information already provided.

jwildhome commented 4 years ago

I am in the process of restructuring the GUI so that the data communication is separated from a specific screen. For convenience now, we have the JamCtrlMgr connected to the Treatment screen. I want to uncouple to make the communication available to other screens as I add them.

I got a little over my head doing this all at once, so am breaking down into smaller steps.

  1. Move use of JamCtrlMgr out of main.cpp to a CommMgr instance. This step is mostly done.
  2. Make CommMgr data available to screens.
  3. Add the Powerup screen.
  4. Make the GUI communication interface general enough to work with the JamCtrlMgr and the serial interface.

I would like to point out that the "shape" of the 2 interfaces is different and I am trying to see if I can abstract that away. JamCtrlMgr using polling, and the serial interface is driven as the data arrives.

alcohen commented 4 years ago

Joe, can you also use the serial in polling mode? That's what I'm doing now on Windows/photon to keep things simple.

On Wed, Jun 10, 2020 at 7:37 AM jwild notifications@github.com wrote:

I am in the process of restructuring the GUI so that the data communication is separated from a specific screen. For convenience now, we have the JamCtrlMgr connected to the Treatment screen. I want to uncouple to make the communication available to other screens as I add them.

I got a little over my head doing this all at once, so am breaking down into smaller steps.

  1. Move use of JamCtrlMgr out of main.cpp to a CommMgr instance. This step is mostly done.
  2. Make CommMgr data available to screens.
  3. Add the Powerup screen.
  4. Make the GUI communication interface general enough to work with the JamCtrlMgr and the serial interface.

I would like to point out that the "shape" of the 2 interfaces is different and I am trying to see if I can abstract that away. JamCtrlMgr using polling, and the serial interface is driven as the data arrives.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/GlobalVent/wiki/issues/158#issuecomment-641944688, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOIMXBBAHZP7KEFB4PK4TRV5WA3ANCNFSM4NY2V6SA .

alcohen commented 4 years ago

Pressure from Photon: same as before Commands to Photon: Start ventilation, End ventilation – triggered by a button press Stretch:

jwildhome commented 4 years ago

Al, Let me investigate what would be involved in reading the serial port by polling. If that works, it will make the 2 interfaces more similar and easier to switch between.

For the current serial port implementation I used Qt's QSerialPort in the most obvious way I've seen in the examples. May not have been the best way in the long run.