Typica is a free program for professional coffee roasters. https://typica.us
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

scale.h 608B

1234567891011121314151617181920212223242526272829303132
  1. /*1059:*/
  2. #line 103 "./scales.w"
  3. #ifndef TypicaScaleInclude
  4. #define TypicaScaleInclude
  5. #include "3rdparty/qextserialport/src/qextserialport.h"
  6. #include "units.h"
  7. class SerialScale:public QextSerialPort
  8. {
  9. Q_OBJECT
  10. public:
  11. SerialScale(const QString&port);
  12. public slots:
  13. void tare();
  14. void weigh();
  15. void setWeighCommand(const QString&command);
  16. void setCommandTerminator(const QString&terminator);
  17. signals:
  18. void newMeasurement(double weight,Units::Unit unit);
  19. private slots:
  20. void dataAvailable();
  21. private:
  22. QByteArray responseBuffer;
  23. QByteArray weighCommand;
  24. QByteArray commandTerminator;
  25. };
  26. #endif
  27. /*:1059*/