forked from test34/can_wizard
-multiline +restart on ctrl_c
This commit is contained in:
parent
6cb2ec72c3
commit
901c077207
1 changed files with 3 additions and 2 deletions
|
@ -128,8 +128,9 @@ void console_task_interactive(void* arg) {
|
||||||
linenoiseEditStart(&ls);
|
linenoiseEditStart(&ls);
|
||||||
}
|
}
|
||||||
|
|
||||||
ESP_LOGE(TAG, "Terminating console");
|
ESP_LOGE(TAG, "Restarting...");
|
||||||
esp_console_deinit();
|
esp_console_deinit();
|
||||||
|
esp_restart();
|
||||||
while (1) {
|
while (1) {
|
||||||
vTaskDelay(100);
|
vTaskDelay(100);
|
||||||
}
|
}
|
||||||
|
@ -157,7 +158,7 @@ void initialize_console(void) {
|
||||||
// linenoiseSetMultiLine(1);
|
// linenoiseSetMultiLine(1);
|
||||||
linenoiseSetCompletionCallback(&esp_console_get_completion);
|
linenoiseSetCompletionCallback(&esp_console_get_completion);
|
||||||
linenoiseSetHintsCallback((linenoiseHintsCallback*) &esp_console_get_hint);
|
linenoiseSetHintsCallback((linenoiseHintsCallback*) &esp_console_get_hint);
|
||||||
linenoiseHistorySetMaxLen(100);
|
linenoiseHistorySetMaxLen(30);
|
||||||
linenoiseSetMaxLineLen(console_config.max_cmdline_length);
|
linenoiseSetMaxLineLen(console_config.max_cmdline_length);
|
||||||
linenoiseHistoryLoad(HISTORY_PATH);
|
linenoiseHistoryLoad(HISTORY_PATH);
|
||||||
/* Register commands */
|
/* Register commands */
|
||||||
|
|
Loading…
Reference in a new issue