diff --git a/test/lora32/main/main.c b/test/lora32/main/main.c index 824a5c7..31893df 100644 --- a/test/lora32/main/main.c +++ b/test/lora32/main/main.c @@ -68,8 +68,10 @@ static void uart_event_task(void *pvParameters) { struct Cmd *handler; uint8_t match = ucmdr_match((char *)dtmp, &handler); + ESP_LOGD(TAG, "command size: %d", strlen(handler->cmd)); + if(match) { - handler->callback(dtmp + sizeof(handler->cmd)); + handler->callback(dtmp + strlen(handler->cmd)); } else { printf("command not found\n"); }