change ac type naming

This commit is contained in:
Siwat Sirichai 2024-04-23 14:15:58 +07:00
parent 810b65d0b9
commit 0a0c8fe2aa
5 changed files with 10 additions and 10 deletions

View File

@ -8,7 +8,7 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:wt32-eth01]
[env:satitm]
platform = espressif32
board = wt32-eth01
framework = arduino

View File

@ -5,7 +5,7 @@
* Variants *
***********************************************/
// @note You can use -D flag to define the variant and comment out the line below
#define AC_TYPE AC_TYPE_M1M2
#define AC_TYPE AC_TYPE_CEILING
/***********************************************
* Pin Definitions *
@ -32,7 +32,7 @@
// @note The infrared codes are defined in ir_codes.hpp and ir_codes.cpp
// Air Conditioner Type for First and Second Year Classrooms
#if AC_TYPE == AC_TYPE_M1M2
#if AC_TYPE == AC_TYPE_DUCTED
#define AC_MIN_TEMP 15
#define AC_MAX_TEMP 30
#define AC_MODES 3
@ -42,7 +42,7 @@
#endif
// Air Conditioner Type for Third, Fourth, Fifth, and Sixth Year Classrooms
#if AC_TYPE == AC_TYPE_M3M4M5M6
#if AC_TYPE == AC_TYPE_CEILING
#define AC_MIN_TEMP 16
#define AC_MAX_TEMP 32
#define AC_MODES 3

View File

@ -1,4 +1,4 @@
#pragma once
#define AC_TYPE_M1M2 0
#define AC_TYPE_M3M4M5M6 1
#define AC_TYPE_DUCTED 0
#define AC_TYPE_CEILING 1

View File

@ -1,5 +1,5 @@
#include "ir_codes.hpp"
#if AC_TYPE == AC_TYPE_M1M2
#if AC_TYPE == AC_TYPE_DUCTED
const uint16_t ir_code_cool[4][16][91] = {
// Fan Speed Auto
{
@ -106,7 +106,7 @@ size_t getInfraredCode(uint8_t mode, uint8_t fan_speed, uint8_t temperature_inde
}
#endif
#if AC_TYPE == AC_TYPE_M3M4M5M6
#if AC_TYPE == AC_TYPE_CEILING
const uint16_t ir_code_cool_low[17][359] = {
{5125, 2082, 439, 1723, 440, 641, 439, 641, 440, 642, 439, 1722, 440, 640, 440, 642, 439, 641, 440, 641, 440, 1722, 440, 641, 439, 1723, 440, 1721, 440, 641, 440, 1722, 439, 1722, 440, 1722, 439, 1723, 440, 1721, 440, 642, 439, 1722, 440, 641, 439, 642, 440, 641, 439, 642, 440, 640, 441, 640, 440, 1722, 440, 1721, 441, 641, 439, 641, 440, 642, 439, 641, 440, 641, 440, 1722, 439, 641, 440, 641, 440, 641, 440, 641, 440, 641, 440, 641, 440, 641, 440, 640, 441, 640, 440, 642, 440, 641, 440, 640, 440, 641, 440, 641, 440, 1722, 439, 1722, 440, 1722, 440, 1721, 441, 640, 440, 641, 441, 640, 440, 29354, 5144, 2081, 441, 1721, 440, 642, 439, 641, 440, 641, 440, 1722, 439, 641, 440, 641, 440, 641, 440, 640, 441, 1722, 439, 641, 440, 1722, 439, 1723, 440, 641, 440, 1721, 440, 1722, 440, 1722, 439, 1723, 438, 1723, 441, 640, 440, 1722, 439, 642, 439, 642, 439, 642, 439, 642, 439, 641, 440, 641, 439, 1722, 440, 1722, 440, 642, 439, 642, 438, 642, 439, 642, 439, 642, 439, 642, 439, 642, 439, 641, 440, 641, 439, 642, 439, 642, 439, 1722, 416, 1746, 439, 642, 440, 641, 439, 1723, 439, 1722, 440, 1722, 439, 641, 440, 642, 439, 642, 439, 641, 440, 642, 438, 642, 439, 642, 439, 642, 439, 641, 440, 1722, 438, 643, 439, 643, 466, 614, 439, 642, 439, 1722, 440, 641, 415, 666, 439, 642, 439, 642, 439, 642, 438, 642, 439, 643, 426, 654, 439, 643, 414, 666, 438, 643, 466, 615, 467, 613, 439, 642, 416, 666, 415, 665, 416, 665, 438, 643, 439, 641, 417, 1745, 440, 1722, 439, 1723, 415, 666, 415, 666, 415, 665, 415, 666, 440, 1722, 416, 665, 438, 1723, 416, 665, 467, 1695, 415, 666, 416, 665, 416, 665, 415, 666, 415, 666, 465, 615, 416, 666, 414, 666, 416, 665, 415, 666, 415, 665, 415, 667, 414, 666, 415, 666, 415, 666, 439, 642, 415, 1747, 415, 665, 416, 665, 466, 1696, 415, 666, 466, 615, 466, 614, 416, 1747, 438, 1723, 415, 1747, 415, 1746, 416},
{5125, 2083, 440, 1721, 440, 641, 440, 641, 440, 641, 440, 1722, 440, 641, 439, 642, 439, 642, 439, 642, 439, 1722, 440, 641, 439, 1723, 439, 1723, 439, 642, 438, 1722, 441, 1721, 440, 1722, 439, 1723, 440, 1721, 440, 642, 439, 1723, 439, 641, 439, 642, 440, 641, 439, 642, 439, 642, 439, 641, 440, 1721, 441, 1722, 439, 642, 439, 642, 439, 641, 440, 641, 440, 641, 439, 1723, 440, 641, 439, 642, 439, 642, 439, 642, 439, 645, 436, 641, 439, 642, 440, 641, 439, 642, 439, 642, 440, 640, 440, 641, 440, 641, 439, 641, 440, 1723, 439, 1722, 439, 1723, 440, 1722, 439, 642, 439, 641, 440, 641, 440, 29356, 5142, 2082, 439, 1722, 440, 641, 440, 641, 440, 641, 440, 1721, 440, 641, 440, 641, 440, 642, 439, 641, 440, 1722, 440, 641, 439, 1722, 440, 1721, 441, 641, 440, 1722, 440, 1722, 439, 1722, 440, 1721, 441, 1721, 440, 642, 439, 1722, 440, 641, 439, 642, 439, 641, 440, 642, 439, 641, 440, 641, 440, 1722, 439, 1723, 439, 642, 439, 641, 440, 641, 440, 641, 440, 641, 440, 641, 440, 640, 440, 642, 440, 640, 440, 641, 440, 641, 440, 1721, 441, 1721, 440, 641, 440, 641, 440, 1722, 440, 1722, 439, 1722, 440, 641, 440, 641, 440, 641, 440, 640, 441, 641, 439, 641, 440, 641, 440, 642, 439, 641, 440, 1722, 440, 641, 439, 642, 440, 640, 440, 641, 440, 1722, 439, 642, 439, 641, 439, 643, 439, 641, 440, 641, 440, 641, 440, 641, 440, 640, 440, 642, 439, 641, 440, 642, 439, 641, 440, 641, 439, 642, 440, 641, 440, 640, 444, 638, 439, 641, 440, 641, 440, 641, 440, 641, 440, 641, 440, 1721, 440, 642, 439, 641, 440, 641, 440, 1721, 440, 642, 439, 1722, 440, 642, 439, 1722, 440, 641, 440, 641, 440, 641, 439, 641, 440, 641, 440, 642, 439, 641, 440, 641, 440, 640, 440, 641, 440, 642, 439, 641, 441, 640, 440, 641, 440, 641, 439, 642, 440, 1722, 440, 640, 440, 641, 440, 1722, 440, 1722, 439, 641, 440, 641, 440, 1721, 441, 1722, 439, 1722, 440, 1722, 440},

View File

@ -7,14 +7,14 @@
// Function to retrieve the IR code for the given mode, fan speed and temperature
size_t getInfraredCode(uint8_t mode, uint8_t fan_speed, uint8_t temperature_index, const uint16_t **codePtr);
#if AC_TYPE == AC_TYPE_M1M2
#if AC_TYPE == AC_TYPE_DUCTED
// IR codes for the remote control
extern const uint16_t ir_code_cool[4][16][91];
extern const uint16_t ir_code_fan[4][91];
extern const uint16_t ir_code_off[91];
#endif
#if AC_TYPE == AC_TYPE_M3M4M5M6
#if AC_TYPE == AC_TYPE_CEILING
extern const uint16_t ir_code_cool_low[17][359];
extern const uint16_t ir_code_cool_high[17][359];
extern const uint16_t ir_code_off[359];