diff -r 1082183cd6bb -r c0184362d48c main/task_ds18b20.h --- a/main/task_ds18b20.h Tue Oct 08 12:55:23 2019 +0200 +++ b/main/task_ds18b20.h Tue Oct 08 15:47:34 2019 +0200 @@ -14,19 +14,29 @@ * Error codes in this task */ #define DS18B20_ERR_NONE 0 ///< No errors -#define DS18B20_ERR_NOSENSOR 1 ///< No sensor detected -#define DS18B20_ERR_TOOMANY 2 ///< Too many sensors -#define DS18B20_ERR_CRC 3 ///< CRC read error -#define DS18B20_ERR_READ 4 ///< Generic read error +#define DS18B20_ERR_CRC 1 ///< CRC read error +#define DS18B20_ERR_READ 2 ///< Generic read error + +#define DS18B20_MAX 4 + +/** + * @brief Structure for a temperature sensor. + */ +typedef struct strTempsensor { + double temperature; ///< Current temperature. + char rom_code[17]; ///< ROM code of this device. + int error; ///< Error number. +} tempsensor_t; + /** * @brief Structure containing the variables for the DS18B20 task. */ typedef struct { - bool bottle_valid; ///< Bottle sensor valid reading. - double bottle_temperature; ///< Current bottle temperature. - int bottle_error; ///< Bottle error number. + bool valid; ///< Sensor valid reading. + int num_sensors; ///< Number of sensors + tempsensor_t sensor[DS18B20_MAX]; ///< Temperature sensors } DS18B20_State;