fix: error sending more than 255 bytes

This commit is contained in:
Alexey Zholtikov 2025-05-04 13:40:18 +03:00
parent 7c4650d87a
commit 87d4713b40
3 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -1 +1 @@
1.1.0
1.1.1

View File

@ -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)