mirror of https://github.com/ArduPilot/ardupilot
AP_Mount: Do not perform unnecessary processing
This commit is contained in:
parent
2c267f462d
commit
a9d0bf856e
|
@ -38,9 +38,11 @@ void AP_Mount_Siyi::init()
|
|||
const AP_SerialManager& serial_manager = AP::serialmanager();
|
||||
|
||||
_uart = serial_manager.find_serial(AP_SerialManager::SerialProtocol_Gimbal, 0);
|
||||
if (_uart != nullptr) {
|
||||
_initialised = true;
|
||||
if (_uart == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
_initialised = true;
|
||||
AP_Mount_Backend::init();
|
||||
}
|
||||
|
||||
|
|
|
@ -34,10 +34,11 @@ void AP_Mount_Viewpro::init()
|
|||
const AP_SerialManager& serial_manager = AP::serialmanager();
|
||||
|
||||
_uart = serial_manager.find_serial(AP_SerialManager::SerialProtocol_Gimbal, 0);
|
||||
if (_uart != nullptr) {
|
||||
_initialised = true;
|
||||
if (_uart == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
_initialised = true;
|
||||
AP_Mount_Backend::init();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue