diff -r b74b0e4902c3 -r ad2c8b13eb88 main/automation.c --- a/main/automation.c Sat Oct 20 13:23:15 2018 +0200 +++ b/main/automation.c Sat Oct 20 17:09:48 2018 +0200 @@ -5,48 +5,48 @@ #include "config.h" -int BoilPower = 100; -int LastMashStep = 0; -char temp_buf[64]; -char logline[128]; -char strftime_buf[64]; -bool loop; -bool CoolBeep = false; -bool Resume = false; -bool pumpRest = false; -bool updateRuntime = false; -bool NewMinute = false; -bool TempReached = false; -uint8_t MashState = MASH_NONE; -float temp_MLT; -float MinMash = 38.0; -float MaxMash = 80.0; -uint32_t power_MLT = 0; -uint32_t power_HLT = 0; -uint32_t counts = 0; -float stageTemp = 0.0; -uint16_t stageTime = 0; -uint16_t TimeWhirlPool = 0; -uint32_t TimeLeft = 0; -uint32_t TimeSpent = 0; -uint32_t SecsCount = 0; -uint32_t pumpTime = 0; -uint32_t TimeBrewing = 0; -uint16_t Steady = 0; -bool _NewMinute = false; -bool _UseHLT = false; -bool _Prompt = false; +int BoilPower = 100; ///< Boil power 0..100% +int LastMashStep = 0; ///< Last valid mash step +char temp_buf[64]; ///< Temporary buffer +char logline[128]; ///< Log line buffer +char strftime_buf[64]; ///< Time buffer +bool loop; ///< Loop flag +bool CoolBeep = false; ///< Did beep during cooling +bool Resume = false; ///< Resume brew flag +bool pumpRest = false; ///< Pump is resting +bool updateRuntime = false; ///< Update runtime record +bool NewMinute = false; ///< We have a new minute +bool TempReached = false; ///< Temperature is reached +uint8_t MashState = MASH_NONE; ///< Mash states +float temp_MLT; ///< MLT temperature +float MinMash = 38.0; ///< Minimum edit value +float MaxMash = 80.0; ///< Maximum edit value +uint32_t power_MLT = 0; ///< MLT power +uint32_t power_HLT = 0; ///< HLT power +uint32_t counts = 0; ///< Counter for power average +float stageTemp = 0.0; ///< Current stage temperature +uint16_t stageTime = 0; ///< Current stage timer +uint16_t TimeWhirlPool = 0; ///< Whirlpool timer +uint32_t TimeLeft = 0; ///< Tie left in this stage +uint32_t TimeSpent = 0; ///< Tota time spent +uint32_t SecsCount = 0; ///< Seconds counter +uint32_t pumpTime = 0; ///< Pump running time +uint32_t TimeBrewing = 0; ///< Brewing time elapsed +uint16_t Steady = 0; ///< Temperature is steady +bool _NewMinute = false; ///< New minute slave flag +bool _UseHLT = false; ///< Use HLT slave flag +bool _Prompt = false; ///< Prompt display flag -extern bool System_TimeOk; -extern sButton Buttons[MAXBUTTONS]; -extern int Main_Screen; -extern DS18B20_State *ds18b20_state; -extern DRIVER_State *driver_state; -extern SemaphoreHandle_t xSemaphoreDS18B20; -extern SemaphoreHandle_t xSemaphoreDriver; -extern double Output; -extern time_t now; -extern struct tm timeinfo; +extern bool System_TimeOk; ///< System time is valid +extern sButton Buttons[MAXBUTTONS]; ///< Buttons definitions +extern int Main_Screen; ///< Current screen +extern DS18B20_State *ds18b20_state; ///< DS18B20 state +extern DRIVER_State *driver_state; ///< Relays driver state +extern SemaphoreHandle_t xSemaphoreDS18B20; ///< DS18B20 lock semaphore +extern SemaphoreHandle_t xSemaphoreDriver; ///< Relays driver lock semaphore +extern double Output; ///< Cakculated outpout power +extern time_t now; ///< Current time +extern struct tm timeinfo; ///< Current time structure #ifdef CONFIG_TEMP_SENSORS_SIMULATOR extern float Fake_MLT;