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.
/** * @file fermenters.h */ #ifndef _FERMENTERS_H #define _FERMENTERS_H void fermenter_dump(sys_fermenter_list *fermenter); /** * @brief Process received command from a websocket. * @param payload The received data in JSON format. */ void fermenter_ws_receive(char *payload); /** * @brief Birth of a fermenter or data update. Create it in the database if * never seen before, else just update the database entry. * @param topic The MQTT topic string, contains the fermenter type and name. * @param payload The JSON formatted payload with the fermenter details. */ void fermenter_birth_data(char *topic, char *payload); /** * @brief Death of a fermenter. Mark it offline in the database. * @param topic The MQTT topic string, contains the fermenter type and name. */ void fermenter_death(char *topic); /** * @brief Data logging from fermenters. * @param topic The MQTT topic string, contains the fermenter type and name. * @param payload The JSON formatted payload with the fermenter details. */ void fermenter_log(char *topic, char *payload); #endif