|
|
|
@ -30,7 +30,10 @@ This file is part of the QGROUNDCONTROL project
@@ -30,7 +30,10 @@ This file is part of the QGROUNDCONTROL project
|
|
|
|
|
#include "LinkConfiguration.h" |
|
|
|
|
#include "SerialLink.h" |
|
|
|
|
#include "UDPLink.h" |
|
|
|
|
|
|
|
|
|
#ifdef UNITTEST_BUILD |
|
|
|
|
#include "MockLink.h" |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#define LINK_SETTING_ROOT "LinkConfigurations" |
|
|
|
|
|
|
|
|
@ -81,9 +84,11 @@ LinkConfiguration* LinkConfiguration::createSettings(int type, const QString& na
@@ -81,9 +84,11 @@ LinkConfiguration* LinkConfiguration::createSettings(int type, const QString& na
|
|
|
|
|
case LinkConfiguration::TypeUdp: |
|
|
|
|
config = new UDPConfiguration(name); |
|
|
|
|
break; |
|
|
|
|
#ifdef UNITTEST_BUILD |
|
|
|
|
case LinkConfiguration::TypeMock: |
|
|
|
|
config = new MockConfiguration(name); |
|
|
|
|
break; |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
return config; |
|
|
|
|
} |
|
|
|
@ -102,9 +107,11 @@ LinkConfiguration* LinkConfiguration::duplicateSettings(LinkConfiguration* sourc
@@ -102,9 +107,11 @@ LinkConfiguration* LinkConfiguration::duplicateSettings(LinkConfiguration* sourc
|
|
|
|
|
case TypeUdp: |
|
|
|
|
dupe = new UDPConfiguration(dynamic_cast<UDPConfiguration*>(source)); |
|
|
|
|
break; |
|
|
|
|
#ifdef UNITTEST_BUILD |
|
|
|
|
case TypeMock: |
|
|
|
|
dupe = new MockConfiguration(dynamic_cast<MockConfiguration*>(source)); |
|
|
|
|
break; |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
return dupe; |
|
|
|
|
} |
|
|
|
|