diff --git a/test/lora32/main/main.c b/test/lora32/main/main.c index 31893df..20fbf27 100644 --- a/test/lora32/main/main.c +++ b/test/lora32/main/main.c @@ -125,6 +125,14 @@ void send(void *args) { lora32_send(&lora, (uint8_t *)args, 12); }; +void set_spreadfactor(void *args) { + uint32_t sf = atoi(args); + + ESP_LOGI(TAG, "spreadfactor: %d", sf); + + lora32_set_spreadfactor(&lora, sf); +} + void app_main() { esp_err_t ret; @@ -149,6 +157,7 @@ void app_main() { ucmdr_init(); ucmdr_install("send", send); ucmdr_install("dump", dump_mem); + ucmdr_install("sf", set_spreadfactor); uart_config_t uart_config = { .baud_rate = 115200,