ESP-IDF Robot ESP NOW

This commit is contained in:
2024-12-24 18:58:08 -05:00
parent 62fa405f3d
commit f809cafda4
5 changed files with 4 additions and 4 deletions

View File

@@ -526,7 +526,7 @@ static esp_err_t espnow_init(void) {
send_param->count = CONFIG_ESPNOW_SEND_COUNT;
send_param->delay = CONFIG_ESPNOW_SEND_DELAY;
send_param->len = CONFIG_ESPNOW_SEND_LEN;
send_param->buffer = malloc(message); // malloc(CONFIG_ESPNOW_SEND_LEN); // Data to be sent?
send_param->buffer = malloc(sizeof(message)); // malloc(CONFIG_ESPNOW_SEND_LEN); // Data to be sent?
if (send_param->buffer == NULL) {
ESP_LOGE(TAG, "Malloc send buffer fail");
free(send_param);