summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Sharma <harsh.sharma@multitech.com>2022-03-09 16:03:00 -0600
committerHarsh Sharma <harsh.sharma@multitech.com>2022-03-09 16:03:00 -0600
commit25a1c0e58eb725855cc86876fcb97d14e2f4eb8e (patch)
tree86ca0481db0943a5e7339bd918098dc2859efcab
parent54f86b83b60192f8b33dad90b33b47246165ac51 (diff)
downloadmts-io-sysfs-25a1c0e58eb725855cc86876fcb97d14e2f4eb8e.tar.gz
mts-io-sysfs-25a1c0e58eb725855cc86876fcb97d14e2f4eb8e.tar.bz2
mts-io-sysfs-25a1c0e58eb725855cc86876fcb97d14e2f4eb8e.zip
Updated lora 2g4 class to support dual cards
-rw-r--r--src/AccessoryCards/LoraCard2G4.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/AccessoryCards/LoraCard2G4.cpp b/src/AccessoryCards/LoraCard2G4.cpp
index 10691ce..aca092f 100644
--- a/src/AccessoryCards/LoraCard2G4.cpp
+++ b/src/AccessoryCards/LoraCard2G4.cpp
@@ -24,7 +24,8 @@ void Device::Lora2G4Card::AddToDeviceInfo(const std::string Port,
const std::string ProductID) {
LoraCard::AddToDeviceInfo(Port, ProductID);
- std::string ttyPath = "/dev/ttyACM0";
+ rapidjson::SizeType deviceNumber = device.accessoryCards.Size() + 1;
+ std::string ttyPath = "/dev/ttyACM" + std::to_string(deviceNumber);
device.accessoryCard.AddMember(
"ttyPath",
rapidjson::Value().SetString(ttyPath.c_str(), device.acAlloc),