Sat, 11 Feb 2023 15:48:02 +0100
Monitor iSpindels: use global variables instead of repeated expensive MySQL calls. Use the yeast temperature ranges for the colors on the thermometer scale. Don't show SVG and ABV if the OG is not yet known. Turn statusfield red if offline. Extra mon_ispindles fields yeast_lo and yeast_hi. Need at least bmsd version 0.3.42. If a websocket message is received that cannot be parsed, show the whole received message.
317 | 1 | #ifndef _DETAILFERMENTER_H |
2 | #define _DETAILFERMENTER_H | |
3 | ||
4 | #include <QDialog> | |
323
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
5 | #include <QDoubleSpinBox> |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
6 | #include <QCheckBox> |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
7 | #include <QComboBox> |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
8 | #include <QRadioButton> |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
9 | #include <QLineEdit> |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
10 | #include <QDialogButtonBox> |
317 | 11 | |
12 | ||
13 | namespace Ui { | |
14 | class DetailFermenter; | |
15 | } | |
16 | ||
17 | class DetailFermenter : public QDialog | |
18 | { | |
19 | Q_OBJECT | |
20 | ||
21 | signals: | |
22 | void entry_changed(); | |
23 | ||
24 | public: | |
25 | explicit DetailFermenter(int id, QWidget *parent = 0); | |
26 | ~DetailFermenter(); | |
27 | ||
28 | private slots: | |
29 | void on_quitButton_clicked(); | |
30 | void refreshTable(void); | |
323
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
31 | void lo_changed(double val); |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
32 | void hi_changed(double val); |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
33 | void heat_switched(); |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
34 | void cool_switched(); |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
35 | void fan_switched(); |
324
c1bb6b197763
Implemented profile control. Added stage edit. Added manual control. Added temperature setting.
Michiel Broek <mbroek@mbse.eu>
parents:
323
diff
changeset
|
36 | void button1_pressed(); |
c1bb6b197763
Implemented profile control. Added stage edit. Added manual control. Added temperature setting.
Michiel Broek <mbroek@mbse.eu>
parents:
323
diff
changeset
|
37 | void button2_pressed(); |
323
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
38 | void mode_changed(int val); |
324
c1bb6b197763
Implemented profile control. Added stage edit. Added manual control. Added temperature setting.
Michiel Broek <mbroek@mbse.eu>
parents:
323
diff
changeset
|
39 | void stage_changed(int val); |
c1bb6b197763
Implemented profile control. Added stage edit. Added manual control. Added temperature setting.
Michiel Broek <mbroek@mbse.eu>
parents:
323
diff
changeset
|
40 | void code_changed(int val); |
c1bb6b197763
Implemented profile control. Added stage edit. Added manual control. Added temperature setting.
Michiel Broek <mbroek@mbse.eu>
parents:
323
diff
changeset
|
41 | void profile_changed(int val); |
489
4db768aea3df
Fixed error messages about log and camera buttons. Only show items that are really used.
Michiel Broek <mbroek@mbse.eu>
parents:
391
diff
changeset
|
42 | void on_logButton_clicked(); |
4db768aea3df
Fixed error messages about log and camera buttons. Only show items that are really used.
Michiel Broek <mbroek@mbse.eu>
parents:
391
diff
changeset
|
43 | void on_camButton_clicked(); |
323
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
44 | |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
45 | public slots: |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
46 | void refreshFermenter(QString); |
317 | 47 | |
48 | private: | |
49 | Ui::DetailFermenter *ui; | |
391
42936c86cbac
Initial webcam interface for fermenter view
Michiel Broek <mbroek@mbse.eu>
parents:
333
diff
changeset
|
50 | QString _node, _alias, _uuid, _profile, _beercode, _beername, _webcam_url; |
42936c86cbac
Initial webcam interface for fermenter view
Michiel Broek <mbroek@mbse.eu>
parents:
333
diff
changeset
|
51 | int recno, _webcam_light; |
324
c1bb6b197763
Implemented profile control. Added stage edit. Added manual control. Added temperature setting.
Michiel Broek <mbroek@mbse.eu>
parents:
323
diff
changeset
|
52 | double lo_set = 0, hi_set = 0; |
323
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
53 | bool heat_state = false; |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
54 | bool cool_state = false; |
d053ffbbf3e9
Started with change and signal functions. Implemented mode change for test. The MainWindow webSocket is now global so the Detail screens can send websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
55 | bool fan_state = false; |
324
c1bb6b197763
Implemented profile control. Added stage edit. Added manual control. Added temperature setting.
Michiel Broek <mbroek@mbse.eu>
parents:
323
diff
changeset
|
56 | |
c1bb6b197763
Implemented profile control. Added stage edit. Added manual control. Added temperature setting.
Michiel Broek <mbroek@mbse.eu>
parents:
323
diff
changeset
|
57 | void send_switches(); |
317 | 58 | }; |
59 | ||
60 | #endif |