From d6c5fc36d8ab3709f6a7601a28a5f5bc3fbff18b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Dec 2020 12:15:09 +1100 Subject: [PATCH] HAL_Linux: only init serial(0) we should not pre-init all uarts, it wastes memory if unused --- libraries/AP_HAL_Linux/HAL_Linux_Class.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp b/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp index 88605e0381..5168d54cf5 100644 --- a/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp +++ b/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp @@ -377,12 +377,7 @@ void HAL_Linux::run(int argc, char* const argv[], Callbacks* callbacks) const gpio->init(); rcout->init(); rcin->init(); - uartA->begin(115200); - uartE->begin(115200); - uartF->begin(115200); - uartG->begin(115200); - uartH->begin(115200); - uartI->begin(115200); + serial(0)->begin(115200); analogin->init(); utilInstance.init(argc+gopt.optind-1, &argv[gopt.optind-1]);