take over some code from mainwindow
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#define SERIAL_PORT "ttyUSB0"
|
||||
#endif
|
||||
|
||||
class QSerialPort;
|
||||
class Update : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
@@ -46,6 +47,12 @@ class Update : public QObject {
|
||||
return QStringLiteral("+%1s").arg(secs, 7, 'f', 2, QChar('0'));
|
||||
}
|
||||
|
||||
|
||||
bool openSerialPort();
|
||||
bool closeSerialPort();
|
||||
|
||||
QSerialPort *m_serial;
|
||||
|
||||
public:
|
||||
enum class DownloadResult {OK, ERROR, TIMEOUT, NOP};
|
||||
enum class FileTypeJson {CONFIG=1, DEVICE=2, CASH=3, SERIAL=4, TIME=5, PRINTER=6};
|
||||
|
Reference in New Issue
Block a user