From cfac8da964002f098c204591679b07e712f05a0c Mon Sep 17 00:00:00 2001 From: "Morgan 'ARR\\!' Allen" Date: Wed, 1 Jan 2020 20:32:53 -0800 Subject: [PATCH] in test, send more than 12 bytes if available --- test/lora32/main/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/lora32/main/main.c b/test/lora32/main/main.c index 01c7ca3..4a1d3ff 100644 --- a/test/lora32/main/main.c +++ b/test/lora32/main/main.c @@ -99,6 +99,8 @@ static void uart_event_task(void *pvParameters) { static void handle_lora_receive(uint8_t *data, uint8_t size) { uint8_t j; + ESP_LOGI(TAG, "received: " LOG_RESET_COLOR "%s", data); + for(uint8_t i = 0; i < size; i += 16) { for(j = 0; j < 16; j++) { printf("%02X ", data[i + j]); @@ -131,7 +133,7 @@ void set_mode(void *args) { void send(void *args) { ESP_LOGI(TAG, "sending: %s", (char*)args); - lora32_send(&lora, (uint8_t *)args, 12); + lora32_send(&lora, (uint8_t *)args, strlen(args)); ESP_LOGI(TAG, "done"); }; @@ -173,6 +175,8 @@ void app_main() { lora32_init(&lora); //lora32_set_spreadfactor(&lora, 12); + lora32_dump_regs(&lora); + ucmdr_init(); ucmdr_install("send", send); ucmdr_install("dump", dump_mem);