From 4e0bc79002db85fdf32b78ce19c2dcf805cbd40b Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 15 Dec 2024 15:51:36 +1100 Subject: [PATCH] AP_Volz_Protocol: move serial port init of Volz protocol into Volz library --- libraries/AP_Volz_Protocol/AP_Volz_Protocol.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Volz_Protocol/AP_Volz_Protocol.cpp b/libraries/AP_Volz_Protocol/AP_Volz_Protocol.cpp index c5318ef3ce..d306a718b6 100644 --- a/libraries/AP_Volz_Protocol/AP_Volz_Protocol.cpp +++ b/libraries/AP_Volz_Protocol/AP_Volz_Protocol.cpp @@ -62,13 +62,16 @@ void AP_Volz_Protocol::init(void) return; } - const AP_SerialManager &serial_manager = AP::serialmanager(); + AP_SerialManager &serial_manager = AP::serialmanager(); port = serial_manager.find_serial(AP_SerialManager::SerialProtocol_Volz,0); if (port == nullptr) { // No port configured return; } + // update baud param in case user looks at it + serial_manager.set_and_default_baud(AP_SerialManager::SerialProtocol_Volz, 0, 115200); + // Create thread to handle output if (!hal.scheduler->thread_create(FUNCTOR_BIND_MEMBER(&AP_Volz_Protocol::loop, void), "Volz",