From 901c0772071db15826654008d8ac7eda03c8f7ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D0=BB=D0=B0=20=D0=93=D0=BE=D1=80?= =?UTF-8?q?=D0=BD=D1=83=D1=88=D0=BA=D0=BE?= Date: Tue, 28 Nov 2023 10:08:40 +0300 Subject: [PATCH] -multiline +restart on ctrl_c --- main/console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/console.c b/main/console.c index edf8515..d3f1b27 100644 --- a/main/console.c +++ b/main/console.c @@ -128,8 +128,9 @@ void console_task_interactive(void* arg) { linenoiseEditStart(&ls); } - ESP_LOGE(TAG, "Terminating console"); + ESP_LOGE(TAG, "Restarting..."); esp_console_deinit(); + esp_restart(); while (1) { vTaskDelay(100); } @@ -157,7 +158,7 @@ void initialize_console(void) { // linenoiseSetMultiLine(1); linenoiseSetCompletionCallback(&esp_console_get_completion); linenoiseSetHintsCallback((linenoiseHintsCallback*) &esp_console_get_hint); - linenoiseHistorySetMaxLen(100); + linenoiseHistorySetMaxLen(30); linenoiseSetMaxLineLen(console_config.max_cmdline_length); linenoiseHistoryLoad(HISTORY_PATH); /* Register commands */