valve.h 398 B

12345678910111213141516171819202122232425262728
  1. #ifndef VALVE_H
  2. #define VALVE_H
  3. #include "serialui.h"
  4. #define VALVE_INTAKE (0)
  5. #define VALVE_VACUUM (1)
  6. #define VALVE_VENT (2)
  7. #define ALL_VALVE (99)
  8. class Valve
  9. {
  10. public:
  11. Valve(SerialUi* pSerial, int id);
  12. bool Open();
  13. bool Close();
  14. bool ReadStatus();
  15. private:
  16. SerialUi* m_pSerial;
  17. int m_id;
  18. bool check_crc(QByteArray data);
  19. };
  20. #endif // VALVE_H