From 87d4713b405de473468d0bfb1d2c826c35addd68 Mon Sep 17 00:00:00 2001 From: Alexey Zholtikov Date: Sun, 4 May 2025 13:40:18 +0300 Subject: [PATCH] fix: error sending more than 255 bytes --- include/zh_espnow.h | 2 +- version.txt | 2 +- zh_espnow.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/zh_espnow.h b/include/zh_espnow.h index e5a485c..7a18085 100644 --- a/include/zh_espnow.h +++ b/include/zh_espnow.h @@ -100,7 +100,7 @@ extern "C" * * @return ESP_OK if success or an error code otherwise. */ - esp_err_t zh_espnow_send(const uint8_t *target, const uint8_t *data, const uint8_t data_len); + esp_err_t zh_espnow_send(const uint8_t *target, const uint8_t *data, const uint16_t data_len); /** * @brief Get ESP-NOW version. diff --git a/version.txt b/version.txt index 1cc5f65..8cfbc90 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.1.0 \ No newline at end of file +1.1.1 \ No newline at end of file diff --git a/zh_espnow.c b/zh_espnow.c index 987ebd2..49cb6ef 100755 --- a/zh_espnow.c +++ b/zh_espnow.c @@ -215,7 +215,7 @@ esp_err_t zh_espnow_deinit(void) return final_status; } -esp_err_t zh_espnow_send(const uint8_t *target, const uint8_t *data, const uint8_t data_len) +esp_err_t zh_espnow_send(const uint8_t *target, const uint8_t *data, const uint16_t data_len) { ZH_ESPNOW_LOGI("Adding to queue outgoing ESP-NOW data to MAC %02X:%02X:%02X:%02X:%02X:%02X started.", MAC2STR((target == NULL) ? _broadcast_mac : target)); if (_is_initialized == false)