bmsd/ispindels.h

Tue, 31 Aug 2021 20:48:37 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 31 Aug 2021 20:48:37 +0200
changeset 774
92e1e8f175a2
parent 680
0bb48333d133
permissions
-rw-r--r--

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.

567
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /**
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 * @file ispindels.h
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 */
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 #ifndef _ISPINDEL_H
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 #define _ISPINDEL_H
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 void ispindel_dump(sys_ispindel_list *ispindel);
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 /**
680
0bb48333d133 Fixed missing co2meters websocket data. Added websockets and removed polling for the mon-ispindel screen. The iSpindel SG gauge adjusts the resolution to the highest detected OG.
Michiel Broek <mbroek@mbse.eu>
parents: 578
diff changeset
11 * @brief Process received command from a websocket.
0bb48333d133 Fixed missing co2meters websocket data. Added websockets and removed polling for the mon-ispindel screen. The iSpindel SG gauge adjusts the resolution to the highest detected OG.
Michiel Broek <mbroek@mbse.eu>
parents: 578
diff changeset
12 * @param payload The received data in JSON format.
0bb48333d133 Fixed missing co2meters websocket data. Added websockets and removed polling for the mon-ispindel screen. The iSpindel SG gauge adjusts the resolution to the highest detected OG.
Michiel Broek <mbroek@mbse.eu>
parents: 578
diff changeset
13 */
0bb48333d133 Fixed missing co2meters websocket data. Added websockets and removed polling for the mon-ispindel screen. The iSpindel SG gauge adjusts the resolution to the highest detected OG.
Michiel Broek <mbroek@mbse.eu>
parents: 578
diff changeset
14 void ispindel_ws_receive(char *payload);
0bb48333d133 Fixed missing co2meters websocket data. Added websockets and removed polling for the mon-ispindel screen. The iSpindel SG gauge adjusts the resolution to the highest detected OG.
Michiel Broek <mbroek@mbse.eu>
parents: 578
diff changeset
15
0bb48333d133 Fixed missing co2meters websocket data. Added websockets and removed polling for the mon-ispindel screen. The iSpindel SG gauge adjusts the resolution to the highest detected OG.
Michiel Broek <mbroek@mbse.eu>
parents: 578
diff changeset
16 /**
568
6f3c24e21deb Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 567
diff changeset
17 * @brief Messages received from a iSpindel using the MQTT sender.
6f3c24e21deb Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 567
diff changeset
18 * A new node is created if this is the first message of the
6f3c24e21deb Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 567
diff changeset
19 * iSpindel, else the last seen time is updated. Then the last
6f3c24e21deb Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 567
diff changeset
20 * actual state is recorded. A log line is written when a beer
6f3c24e21deb Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 567
diff changeset
21 * is assigned.
578
e75ce5bbda73 Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.
Michiel Broek <mbroek@mbse.eu>
parents: 568
diff changeset
22 * @param topic The MQTT topic string, contains the ispindel type and name
568
6f3c24e21deb Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 567
diff changeset
23 * @param payload The value for the selected keyword.
567
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 */
578
e75ce5bbda73 Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.
Michiel Broek <mbroek@mbse.eu>
parents: 568
diff changeset
25 void ispindel_birth_data(char *topic, char *payload);
567
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27
6bf0afc33e70 Initial code for iSpindel support in the daemon
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 #endif

mercurial