Skip to content

Commit

Permalink
Home Accessory Architect v12.12.5 Merlin
Browse files Browse the repository at this point in the history
  • Loading branch information
RavenSystem committed May 9, 2024
1 parent 0fb9e33 commit ccd0ee0
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 75 deletions.
2 changes: 1 addition & 1 deletion HAA/HAA_Installer/main/header.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
#include "../../common/common_headers.h"

#define INSTALLER_BETA_REVISION "" // Format: "b01"
#define INSTALLER_VERSION "7.10.3"INSTALLER_BETA_REVISION
#define INSTALLER_VERSION "7.10.4"INSTALLER_BETA_REVISION

#endif // __HAA_OTA_HEADER_H__
4 changes: 2 additions & 2 deletions HAA/HAA_Installer/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ void init_task() {

uart_driver_install(0, SDK_UART_BUFFER_SIZE, 0, 0, NULL, 0);
uart_param_config(0, &uart_config);
gpio_reset_pin(1);
uart_set_pin(0, 1, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
gpio_reset_pin(HAA_TX_UART_DEFAULT_PIN);
uart_set_pin(0, HAA_TX_UART_DEFAULT_PIN, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);

#else

Expand Down
37 changes: 23 additions & 14 deletions HAA/HAA_Main/main/header.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "../../common/common_headers.h"

// Version
#define HAA_FIRMWARE_VERSION "12.12.4"
#define HAA_FIRMWARE_VERSION "12.12.5"
#define HAA_FIRMWARE_BETA_REVISION "" // Format: "b01"
#define HAA_FIRMWARE_CODENAME "Merlin"

Expand Down Expand Up @@ -215,8 +215,8 @@
#define TH_DEADBAND_FORCE_IDLE ch_group->num_f[3]
#define THERMOSTAT_DEADBAND_SOFT_ON "ds"
#define TH_DEADBAND_SOFT_ON ch_group->num_f[4]
#define THERMOSTAT_SAFE_MARGIN_TEMP "mc"
#define TH_SAFE_MARGIN_TEMP ch_group->num_f[5]
#define THERMOSTAT_DEADBAND_OFFSET "o"
#define TH_DEADBAND_OFFSET ch_group->num_f[5]
#define THERMOSTAT_UPDATE_DELAY "dl"
#define THERMOSTAT_UPDATE_DELAY_MIN (0.15f)
#define THERMOSTAT_UPDATE_DELAY_DEFAULT (3.0f)
Expand Down Expand Up @@ -251,18 +251,13 @@
#define THERMOSTAT_ACTION_GATE_CLOSE (12)
#define THERMOSTAT_ACTION_GATE_OPEN (13)
#define THERMOSTAT_ACTION_ON (14)
#define THERMOSTAT_ACTION_HEATER_SAFE_UP (15)
#define THERMOSTAT_ACTION_HEATER_SAFE_DOWN (16)
#define THERMOSTAT_ACTION_COOLER_SAFE_UP (17)
#define THERMOSTAT_ACTION_COOLER_SAFE_DOWN (18)
#define THERMOSTAT_TEMP_UP (0)
#define THERMOSTAT_TEMP_DOWN (1)
#define TH_ACTIVE_INT ch_group->ch[2]->value.int_value
#define TH_MODE_INT ch_group->ch[3]->value.int_value
#define TH_TARGET_MODE_INT ch_group->ch[4]->value.int_value
#define TH_HEATER_TARGET_TEMP_FLOAT ch_group->ch[5]->value.float_value
#define TH_COOLER_TARGET_TEMP_FLOAT ch_group->ch[6]->value.float_value
#define SAFE_TEMPERATURE_MARGIN (3.f)

#define IAIRZONING_LAST_ACTION iairzoning_group->num_i[0]
#define IAIRZONING_MAIN_MODE iairzoning_group->num_i[1]
Expand Down Expand Up @@ -310,6 +305,8 @@
#define HM_DEADBAND_FORCE_IDLE ch_group->num_f[3]
#define HUMIDIF_DEADBAND_SOFT_ON "ds"
#define HM_DEADBAND_SOFT_ON ch_group->num_f[4]
#define HUMIDIF_DEADBAND_OFFSET "o"
#define HM_DEADBAND_OFFSET ch_group->num_f[5]
#define HUMIDIF_CURRENT_ACTION ch_group->num_i[5]
#define HUMIDIF_MODE_OFF (0)
#define HUMIDIF_MODE_IDLE (1)
Expand Down Expand Up @@ -806,10 +803,6 @@
#define WIFI_WATCHDOG_ARP_PERIOD_DEFAULT (190) // * WIFI_WATCHDOG_POLL_PERIOD_MS
#define WIFI_WATCHDOG_ROAMING_PERIOD (1234) // * WIFI_WATCHDOG_POLL_PERIOD_MS

#define HAA_RMT_LED_STRIP_BLOCK_SYMBOLS (128) // Bigger than 128 does not work
#define HAA_RMT_LED_STRIP_RESOLUTION_HZ (10000000)
#define HAA_RMT_LED_STRIP_QUEUE_DEPTH (2)

#define STATUS_LED_DURATION_ON (30)
#define STATUS_LED_DURATION_OFF (120)

Expand All @@ -834,12 +827,28 @@

#define HAA_ADC_FACTOR (HAA_ADC_RESOLUTION_ESP32 / HAA_ADC_RESOLUTION_ESP8266)


#ifdef ESP_PLATFORM
#define HAA_ADC_MAX_VALUE ((HAA_ADC_RESOLUTION_ESP32 - 1) / HAA_ADC_FACTOR)

#if defined(CONFIG_IDF_TARGET_ESP32) \
|| defined(CONFIG_IDF_TARGET_ESP32S2)
#define HAA_RMT_LED_STRIP_BLOCK_SYMBOLS (64)
#else
#define HAA_ADC_MAX_VALUE (HAA_ADC_RESOLUTION_ESP8266 - 1)
#define HAA_RMT_LED_STRIP_BLOCK_SYMBOLS (48)
#endif

#define HAA_RMT_LED_STRIP_RESOLUTION_HZ (10000000)
#define HAA_RMT_LED_STRIP_QUEUE_DEPTH (2)

#define HAA_ADC_MAX_VALUE ((HAA_ADC_RESOLUTION_ESP32 - 1) / HAA_ADC_FACTOR)

#else // ESP_PLATFORM

#define HAA_ADC_MAX_VALUE (HAA_ADC_RESOLUTION_ESP8266 - 1)

#endif // ESP_PLATFORM


#define KELVIN_TO_CELSIUS(x) ((x) - 273.15)

#define NTP_POLL_PERIOD_MS (3600 * 1000) // 1 hour
Expand Down
Loading

0 comments on commit ccd0ee0

Please sign in to comment.