190 * write a new configuration file with sane defaults. |
190 * write a new configuration file with sane defaults. |
191 */ |
191 */ |
192 void read_config(void); |
192 void read_config(void); |
193 |
193 |
194 |
194 |
|
195 #define EQUIPMENT_VERSION 2 ///< Equipment file version |
195 |
196 |
196 /** |
197 /** |
197 * @brief Equipment configuration. File /spiffs/equipments.conf |
198 * @brief Equipment configuration. File /spiffs/equipments.conf |
198 */ |
199 */ |
|
200 struct hdrEquipment { |
|
201 uint32_t version; ///< Structure version. |
|
202 uint32_t hdrsize; ///< Size of this header. |
|
203 uint32_t recsize; ///< Size of a record. |
|
204 } equipment_hdr; |
|
205 |
199 struct strEquipment { |
206 struct strEquipment { |
200 int Version; ///< Record version number for updates. |
207 int MLT_watt; ///< MLT watts. |
201 int Record; ///< Record number. |
208 int HLT_watt; ///< HLT watts. |
202 char Name[32]; ///< Equipment name. |
209 char Name[32]; ///< Equipment name. |
203 int BoilPower; ///< The power percentage needed to keep the wort boiling. |
210 int BoilPower; ///< The power percentage needed to keep the wort boiling. |
204 int MashPower; ///< The power percentage needed to heat during mash. |
211 int MashPower; ///< The power percentage needed to heat during mash. |
205 int PumpCycle; ///< Minutes to run the pump during mash rest. |
212 int PumpCycle; ///< Minutes to run the pump during mash rest. |
206 int PumpRest; ///< Minutes to pause the pump during mash rests. |
213 int PumpRest; ///< Minutes to pause the pump during mash rests. |
301 bool UseHLT; ///< Use HLT during brew. |
308 bool UseHLT; ///< Use HLT during brew. |
302 bool PumpCooling; ///< Pump during cooling. |
309 bool PumpCooling; ///< Pump during cooling. |
303 uint32_t TimeBrewing; ///< Time we are brewing. |
310 uint32_t TimeBrewing; ///< Time we are brewing. |
304 uint8_t MashStep; ///< Current mash step. |
311 uint8_t MashStep; ///< Current mash step. |
305 bool MaltAdded; ///< If malt was added. |
312 bool MaltAdded; ///< If malt was added. |
|
313 TickType_t MLT_usage; ///< MLT usage counter. |
|
314 TickType_t HLT_usage; ///< HLT usage counter. |
306 } runtime; ///< Runtime record. |
315 } runtime; ///< Runtime record. |
307 |
316 |
308 |
317 |
309 /** |
318 /** |
310 * @brief Write runtime information to disk. |
319 * @brief Write runtime information to disk. |