diff options
Diffstat (limited to 'src/AccessoryCards/LoraCard15.cpp')
-rw-r--r-- | src/AccessoryCards/LoraCard15.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/AccessoryCards/LoraCard15.cpp b/src/AccessoryCards/LoraCard15.cpp index df5c969..7d2140b 100644 --- a/src/AccessoryCards/LoraCard15.cpp +++ b/src/AccessoryCards/LoraCard15.cpp @@ -19,8 +19,8 @@ Device::Lora15Card::Lora15Card(Device& d, const std::string productId, const std::string port) : LoraCard(d, productId, port) { int ret; - fpgaVersion = 255; - if ((productId.find("MTCDT3-") == 0) && (port.back() == '2')) { + printf("PORT %s\n", port.c_str()); + if ((productId.rfind("MTCDT3-", 0) == 0 || productId.rfind("MTLGA-", 0) == 0) && (port.back() == '2')) { spiPath = "/dev/spidev1.0"; } else if (productId.find("MTAC-LORA-") == 0) { if (port.back() == '2') { @@ -42,7 +42,7 @@ Device::Lora15Card::Lora15Card(Device& d, const std::string productId, const std spiClose(); spi_target_ptr = NULL; - device.accessoryCard.AddMember("fpgaVersion", fpgaVersion, device.accessoryCardsAlloc); + setCapabilities(); } int Device::Lora15Card::spiOpen(const char *spidev) { |