Skip to content

Commit

Permalink
Home Accessory Architect v12.14.8 Merlin
Browse files Browse the repository at this point in the history
  • Loading branch information
RavenSystem committed Jan 22, 2025
1 parent 5e5394d commit 0685a94
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 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.12.6"INSTALLER_BETA_REVISION
#define INSTALLER_VERSION "7.12.7"INSTALLER_BETA_REVISION

#endif // __HAA_OTA_HEADER_H__
2 changes: 1 addition & 1 deletion HAA/HAA_Installer/main/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ <h2>Please, support this project by <a href="https://paypal.me/ravensystem">dona
<input type="checkbox" name="ssl" value="y" <!-- part HTML_SETTINGS_REPOSSL -->> HTTPS<br>
</div>
</form>
<center>© 2018-2024 Jos&eacute; A. Jim&eacute;nez Campos</center>
<center>© 2018-2025 Jos&eacute; A. Jim&eacute;nez Campos</center>
<h2>If you have paid for this firmware or for a device with it installed, you have been scammed. <a href="https://github.com/RavenSystem/esp-homekit-devices">Read LICENSE</a></h2>
</div><script>
var ssid_field,bssid_field,pass_block,pass_field,join_button;
Expand Down
4 changes: 3 additions & 1 deletion 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.14.7"
#define HAA_FIRMWARE_VERSION "12.14.8"
#define HAA_FIRMWARE_BETA_REVISION "" // Format: "b01"
#define HAA_FIRMWARE_CODENAME "Merlin"

Expand Down Expand Up @@ -777,6 +777,8 @@
#define SERV_TYPE_DATA_HISTORY (95)
#define SERV_TYPE_IAIRZONING (99)

#define ZERO_CROSS_INTERRUPT_DELAY_MS_SET "zd"

#define SERIAL_STRING "sn"
#define SERIAL_STRING_LEN (11)

Expand Down
15 changes: 15 additions & 0 deletions HAA/HAA_Main/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ main_config_t main_config = {
.mcp23017s = NULL,

.delayed_binary_outputs = NULL,
.zc_delay = 0,
};

#ifdef ESP_PLATFORM
Expand Down Expand Up @@ -411,13 +412,22 @@ static void IRAM delayed_binary_output_interrupt(const uint8_t trigger_gpio) {
#endif
int trigger_gpio_read_inverted_value = !gpio_read(trigger_gpio);

unsigned int delay = true;

delayed_binary_output_t* delayed_binary_output = main_config.delayed_binary_outputs;
while (delayed_binary_output) {
if (delayed_binary_output->enable &&
delayed_binary_output->trigger_gpio == trigger_gpio &&
(delayed_binary_output->trigger_gpio_mode == 3 ||
(delayed_binary_output->trigger_gpio_mode - 1) == trigger_gpio_read_inverted_value)) {

if (main_config.zc_delay > 0 && delay) {
sdk_os_delay_us(main_config.zc_delay);
delay = false;
}

gpio_write(delayed_binary_output->gpio, delayed_binary_output->value);

delayed_binary_output->enable = false;
}

Expand Down Expand Up @@ -9490,6 +9500,11 @@ void normal_mode_init() {
led_create(led_gpio, led_inverted);
}

// Zero-Cross Interrupt delay
if (cJSON_rsf_GetObjectItemCaseSensitive(json_config, ZERO_CROSS_INTERRUPT_DELAY_MS_SET) != NULL) {
main_config.zc_delay = cJSON_rsf_GetObjectItemCaseSensitive(json_config, ZERO_CROSS_INTERRUPT_DELAY_MS_SET)->valuefloat * 1000.f;
}

// IR TX LED GPIO
if (cJSON_rsf_GetObjectItemCaseSensitive(json_config, IR_ACTION_TX_GPIO) != NULL) {
// IR TX LED Frequency
Expand Down
2 changes: 1 addition & 1 deletion HAA/HAA_Main/main/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h2>Please, support this project by <a href="https://paypal.me/ravensystem">dona
<label for="bssid">BSSID</label>
<input type="text" id="bssid" name="bid" maxlength="12">
</div></form>
<center>© 2018-2024 Jos&eacute; A. Jim&eacute;nez Campos</center>
<center>© 2018-2025 Jos&eacute; A. Jim&eacute;nez Campos</center>
<h2>If you have paid for this firmware or for a device with it installed, you have been scammed. <a href="https://github.com/RavenSystem/esp-homekit-devices">Read LICENSE</a></h2>
</div><script>
var ssid_field,bssid_field,pass_block,pass_field,join_button;
Expand Down
2 changes: 2 additions & 0 deletions HAA/HAA_Main/main/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ typedef struct _main_config {
int8_t setup_mode_toggle_counter;
int8_t setup_mode_toggle_counter_max;

uint32_t zc_delay;

uint16_t setup_mode_time;
uint16_t wifi_roaming_count;

Expand Down

0 comments on commit 0685a94

Please sign in to comment.