mirror of https://github.com/ArduPilot/ardupilot
AP_Volz_Protocol: move serial port init of Volz protocol into Volz library
This commit is contained in:
parent
061097ac31
commit
4e0bc79002
|
@ -62,13 +62,16 @@ void AP_Volz_Protocol::init(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AP_SerialManager &serial_manager = AP::serialmanager();
|
AP_SerialManager &serial_manager = AP::serialmanager();
|
||||||
port = serial_manager.find_serial(AP_SerialManager::SerialProtocol_Volz,0);
|
port = serial_manager.find_serial(AP_SerialManager::SerialProtocol_Volz,0);
|
||||||
if (port == nullptr) {
|
if (port == nullptr) {
|
||||||
// No port configured
|
// No port configured
|
||||||
return;
|
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
|
// Create thread to handle output
|
||||||
if (!hal.scheduler->thread_create(FUNCTOR_BIND_MEMBER(&AP_Volz_Protocol::loop, void),
|
if (!hal.scheduler->thread_create(FUNCTOR_BIND_MEMBER(&AP_Volz_Protocol::loop, void),
|
||||||
"Volz",
|
"Volz",
|
||||||
|
|
Loading…
Reference in New Issue