summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Device/Device.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Device/Device.cpp b/src/Device/Device.cpp
index effd4b6..c6e1186 100644
--- a/src/Device/Device.cpp
+++ b/src/Device/Device.cpp
@@ -175,6 +175,12 @@ void Device::getSystemTreeJson(const char *dir_name) {
deviceInfoList[toCamelCase(d_name)] = fileData;
} else if (strcmp(d_name, "hw-version") == 0) {
deviceInfoList["hardwareVersion"] = fileData;
+ if (regex_match(fileData, mtcdt3Filters)) {
+ capabilityList["rs232"] = true;
+ capabilityList["rs422"] = true;
+ capabilityList["rs485"] = true;
+ capabilityList["serial"] = true;
+ }
} else if (strcmp(d_name, "mac-eth") == 0) {
deviceInfoList["macAddress"] = fileData;
} else if (strcmp(d_name, "has-radio") == 0 &&
@@ -186,12 +192,6 @@ void Device::getSystemTreeJson(const char *dir_name) {
deviceInfoList["oemString2"] = fileData;
};
if (strcmp(d_name, "product-id") == 0) {
- if (regex_match(fileData, mtcdt3Filters)) {
- capabilityList["rs232"] = true;
- capabilityList["rs422"] = true;
- capabilityList["rs485"] = true;
- capabilityList["serial"] = true;
- }
if (regex_match(fileData, mtrFilters)) {
capabilityList["rs232"] = true;
capabilityList["serial"] = true;