half comment done

This commit is contained in:
Siwat Sirichai 2024-01-01 01:38:25 +07:00
parent d62ffa3606
commit 039e65e6df
12 changed files with 736 additions and 38 deletions

View file

@ -18,22 +18,38 @@
#define AC_SENSOR_READ_INTERVAL 5000
#define AC_SENSOR_READ_TIMEOUT 250
/**
* @brief The struct is used to store the state of the air conditioner
*
* @note This struct is stored in FRAM if it is used
* @note This struct is 3 bytes long
*/
struct ClimateCardData {
uint8_t ac_temperature;
uint8_t ac_mode;
uint8_t ac_fan_speed;
uint8_t ac_temperature; ///< Temperature of the air conditioner
uint8_t ac_mode; ///< Mode of the air conditioner
uint8_t ac_fan_speed;///< Fan speed of the air conditioner
};
/**
* @brief This struct is used to store information about an air conditioner
*/
struct AirConditioner {
uint8_t max_temperature;
uint8_t min_temperature;
uint8_t modes;
const char **mode_names;
uint8_t fan_speeds;
const char **fan_speed_names;
// function to get IR code
// takes 3 arguments: mode, fan speed, temperature, all uint8_t
// return size of IR code array
uint8_t max_temperature; ///< Maximum temperature
uint8_t min_temperature; ///< Minimum temperature
uint8_t modes; ///< Number of modes
const char **mode_names; ///< Names of modes in the form of an array of strings
uint8_t fan_speeds; ///< Number of fan speeds
const char **fan_speed_names; ///< Names of fan speeds in the form of an array of strings
/**
* @brief Function to get IR code
*
* @param mode Mode of the air conditioner
* @param fan_speed Fan speed of the air conditioner
* @param temperature Temperature of the air conditioner
* @param code Pointer to the IR code array
*
* @return Size of the IR code array
*/
size_t (*getInfraredCode)(uint8_t, uint8_t, uint8_t, const uint16_t**);
};
// This requires 3 bytes of FRAM