Skip to content

Commit

Permalink
Move tx cmd interval to component
Browse files Browse the repository at this point in the history
  • Loading branch information
GelidusResearch committed Oct 7, 2024
1 parent fb9b7b7 commit d124a3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gdo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 250; // Less than 250 is too frequent and brownouts many wall controllers
static uint32_t g_tx_delay_ms = 50;
static portMUX_TYPE gdo_spinlock = portMUX_INITIALIZER_UNLOCKED;


Expand Down Expand Up @@ -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 < 250) {
if (ms < 50) {
ESP_LOGE(TAG, "Invalid minimum command interval: %" PRIu32, ms);
return ESP_ERR_INVALID_ARG;
}
Expand Down
2 changes: 2 additions & 0 deletions include/gdo.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ typedef struct {
gpio_num_t uart_tx_pin; // UART TX pin
gpio_num_t uart_rx_pin; // UART RX pin
gpio_num_t obst_in_pin; // Obstruction input pin
gpio_num_t rf_tx_pin; // UART TX pin
gpio_num_t rf_rx_pin; // UART RX pin
} gdo_config_t;

#define GDO_PAIRED_DEVICE_COUNT_UNKNOWN 0xff
Expand Down

0 comments on commit d124a3e

Please sign in to comment.