//
// Created by kirillius on 09.04.2022.
//

#ifndef COOLER_CONTROLLER_CONFIGURATION_H
#define COOLER_CONTROLLER_CONFIGURATION_H
#define CONFIG_EEPROM_ADDR 0x42

struct Configuration {
    uint8_t startTemp;
    uint8_t maxTemp;
    uint8_t minLevel;
    uint8_t maxLevel;
    uint8_t signature;
    uint8_t stopTemp;

    bool isValid() {
        return signature == 0x42;
    }

    void validate() {
        signature = 0x42;
    }

    void invalidate() {
        signature = 0x00;
    }
};

#endif //COOLER_CONTROLLER_CONFIGURATION_H
