Add UAVCAN_NO_GLOBAL_DATA_TYPE_REGISTRY flag to allow the global data type registry to be disabled

This commit is contained in:
Ben Dyer
2015-08-21 15:57:04 +10:00
parent 3ae5400aa5
commit cfa77b13a4
2 changed files with 9 additions and 0 deletions
@@ -187,6 +187,7 @@ struct UAVCAN_EXPORT DefaultDataTypeRegistrator
{
DefaultDataTypeRegistrator()
{
#if !UAVCAN_NO_GLOBAL_DATA_TYPE_REGISTRY
const GlobalDataTypeRegistry::RegistrationResult res =
GlobalDataTypeRegistry::instance().registerDataType<Type>(Type::DefaultDataTypeID);
@@ -194,6 +195,7 @@ struct UAVCAN_EXPORT DefaultDataTypeRegistrator
{
handleFatalError("Type reg failed");
}
#endif
}
};