Tue, 31 Aug 2021 20:48:37 +0200
Split batch, adjust mash step volume. In the duplicated log_brew handle the missing values. In save product, round the mash step sg to 4 decimals. In prod_edit, ingredients are stored as strings, not arrays. This triggered a memory corruption that only happened in rare circumstances. Don't fix mash step fields in the javascript, it is already done during load from the database. Calculation of the mash volume is rounded to 6 decimals. Enter mash step Brix/Plato value, the SG result is rounded to 4 decimals.
502
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | /** |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | * @file co2meters.h |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | */ |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | #ifndef _CO2METERS_H |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | #define _CO2METERS_H |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | void co2meter_dump(sys_co2meter_list *co2meter); |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | /** |
678
14322825cb3d
The co2meters monitor screen rebuild to use websockets instead of data polling.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
11 | * @brief Process received command from a websocket. |
14322825cb3d
The co2meters monitor screen rebuild to use websockets instead of data polling.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
12 | * @param payload The received data in JSON format. |
14322825cb3d
The co2meters monitor screen rebuild to use websockets instead of data polling.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
13 | */ |
14322825cb3d
The co2meters monitor screen rebuild to use websockets instead of data polling.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
14 | void co2meter_ws_receive(char *payload); |
14322825cb3d
The co2meters monitor screen rebuild to use websockets instead of data polling.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
15 | |
14322825cb3d
The co2meters monitor screen rebuild to use websockets instead of data polling.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
16 | /** |
502
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | * @brief Birth of a co2meter or data update. Create it in the database if |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | * never seen before, else just update the database entry. |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | * @param topic The MQTT topic string, contains the co2meter type and name. |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | * @param payload The JSON formatted payload with the co2meter details. |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | */ |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | void co2meter_birth_data(char *topic, char *payload); |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | /** |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | * @brief Data logging from co2meters. |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
26 | * @param topic The MQTT topic string, contains the co2meter type and name. |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
27 | * @param payload The JSON formatted payload with the co2meter details. |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
28 | */ |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
29 | void co2meter_log(char *topic, char *payload); |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
30 | |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | #endif |