add set_spreadfactor uart command
This commit is contained in:
parent
32926c30de
commit
f15732251f
1 changed files with 9 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue