more prompt goodness
This commit is contained in:
parent
164694ff7e
commit
417f7856eb
2 changed files with 9 additions and 3 deletions
|
@ -61,7 +61,12 @@ void console_task(void *args) {
|
|||
char *prompt;
|
||||
|
||||
while(true) {
|
||||
asprintf(&prompt, LOG_COLOR_I "%s > " LOG_RESET_COLOR, lorcomm_cfg.hostname);
|
||||
asprintf(&prompt, LOG_COLOR_I "%s bw: %d sf: %d cr: %d> " LOG_RESET_COLOR,
|
||||
lorcomm_cfg.hostname,
|
||||
lora.bandwidth,
|
||||
lora.spreadingFactor,
|
||||
lora.codingRate
|
||||
);
|
||||
|
||||
char* line = linenoise(prompt);
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@ void app_main(void) {
|
|||
//lora.bandwidth = B208;
|
||||
//lora.codingRate = 5;
|
||||
lora.frequency = 915000000;
|
||||
//lora.spreadingFactor = 8;
|
||||
//lora.preamble = DEFAULT_PREAMBLE;
|
||||
lora.spreadingFactor = 11;
|
||||
lora.preamble = DEFAULT_PREAMBLE;
|
||||
lora.dio0 = CONFIG_LORA32_DIO0_PIN;
|
||||
lora.implicitHeader = false;
|
||||
lora.nss = CONFIG_LORA32_NSS_PIN;
|
||||
|
@ -76,6 +76,7 @@ void app_main(void) {
|
|||
//lora.cad_detected = &handle_lora_caddetected;
|
||||
|
||||
lora32_init(&lora);
|
||||
lora32_set_spreadfactor(&lora, lora.spreadingFactor);
|
||||
|
||||
//double dr = lora32_calc_datarate(&lora);
|
||||
//ESP_LOGI(TAG, "data rate: %fbps", dr);
|
||||
|
|
Loading…
Reference in a new issue