Browse Source

AP_SerialManager: add AP::serialmanager()

mission-4.1.18
Peter Barker 7 years ago committed by Francisco Ferreira
parent
commit
b3f5e807a6
  1. 10
      libraries/AP_SerialManager/AP_SerialManager.cpp
  2. 4
      libraries/AP_SerialManager/AP_SerialManager.h

10
libraries/AP_SerialManager/AP_SerialManager.cpp

@ -411,3 +411,13 @@ bool AP_SerialManager::protocol_match(enum SerialProtocol protocol1, enum Serial
return false; return false;
} }
namespace AP {
AP_SerialManager &serialmanager()
{
return *AP_SerialManager::get_instance();
}
}

4
libraries/AP_SerialManager/AP_SerialManager.h

@ -161,3 +161,7 @@ private:
// protocol_match - returns true if the protocols match // protocol_match - returns true if the protocols match
bool protocol_match(enum SerialProtocol protocol1, enum SerialProtocol protocol2) const; bool protocol_match(enum SerialProtocol protocol1, enum SerialProtocol protocol2) const;
}; };
namespace AP {
AP_SerialManager &serialmanager();
};

Loading…
Cancel
Save