diff --git a/libraries/AP_SerialManager/AP_SerialManager.cpp b/libraries/AP_SerialManager/AP_SerialManager.cpp index f8df46ef28..936713997d 100644 --- a/libraries/AP_SerialManager/AP_SerialManager.cpp +++ b/libraries/AP_SerialManager/AP_SerialManager.cpp @@ -411,3 +411,13 @@ bool AP_SerialManager::protocol_match(enum SerialProtocol protocol1, enum Serial return false; } + + +namespace AP { + +AP_SerialManager &serialmanager() +{ + return *AP_SerialManager::get_instance(); +} + +} diff --git a/libraries/AP_SerialManager/AP_SerialManager.h b/libraries/AP_SerialManager/AP_SerialManager.h index bff0d62251..1c9b55cfb3 100644 --- a/libraries/AP_SerialManager/AP_SerialManager.h +++ b/libraries/AP_SerialManager/AP_SerialManager.h @@ -161,3 +161,7 @@ private: // protocol_match - returns true if the protocols match bool protocol_match(enum SerialProtocol protocol1, enum SerialProtocol protocol2) const; }; + +namespace AP { + AP_SerialManager &serialmanager(); +};