From dfbb598131b8a88b8556b17842ce010537611db2 Mon Sep 17 00:00:00 2001 From: gelidusresearch Date: Thu, 3 Oct 2024 22:44:43 -0500 Subject: [PATCH] Reduce tx and cmd intervals --- gdo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdo.c b/gdo.c index 3d36440..6361e82 100755 --- a/gdo.c +++ b/gdo.c @@ -86,7 +86,7 @@ static gdo_status_t g_status = { .close_ms = 0, .door_position = -1, .door_target = -1, - .client_id = 0x666, + .client_id = 0x5AFE, .rolling_code = 0, }; @@ -101,7 +101,7 @@ static esp_timer_handle_t motion_detect_timer; static esp_timer_handle_t door_position_sync_timer; static esp_timer_handle_t obst_timer; static void *g_user_cb_arg; -static uint32_t g_tx_delay_ms = 50; +static uint32_t g_tx_delay_ms = 250; // Less than 250 is too frequent and brownouts many wall controllers static portMUX_TYPE gdo_spinlock = portMUX_INITIALIZER_UNLOCKED; @@ -753,7 +753,7 @@ esp_err_t gdo_set_close_duration(uint16_t ms) { * @return ESP_OK on success, ESP_ERR_INVALID_ARG if the time is invalid. */ esp_err_t gdo_set_min_command_interval(uint32_t ms) { - if (ms < 50) { + if (ms < 300) { ESP_LOGE(TAG, "Invalid minimum command interval: %" PRIu32, ms); return ESP_ERR_INVALID_ARG; }