summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/General.h2
-rw-r--r--src/AccessoryCards/LoraCard15.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/include/General.h b/include/General.h
index c4ea4ca..c5be2ff 100644
--- a/include/General.h
+++ b/include/General.h
@@ -50,7 +50,7 @@ typedef unsigned int uint; //32 bit - even on 64 bit machines
#define FIRMWARE_DATE "Date"
#define SYSFS_PLATFORM "/sys/devices/platform/mts-io/"
-#define PRODUCT_ID_PATH "/sys/devices/platform/mts-io/product-id"
+#define HW_VERSION_PATH "/sys/devices/platform/mts-io/hw-version"
#define LEDS_GPIO_DIR "/sys/devices/platform/leds-gpio/leds/"
#define FIRMWARE_FILE "/etc/issue"
diff --git a/src/AccessoryCards/LoraCard15.cpp b/src/AccessoryCards/LoraCard15.cpp
index cb7dc64..a7a1dad 100644
--- a/src/AccessoryCards/LoraCard15.cpp
+++ b/src/AccessoryCards/LoraCard15.cpp
@@ -19,10 +19,10 @@
Device::Lora15Card::Lora15Card(Device& d, const std::string ProductId, const std::string Port) : LoraCard(d, ProductId, Port) {
int ret;
- std::string deviceProductId = "";
- /* Map the spi path to the device and card product id, with the default being spidev0.0 */
- MTS::System::readFile(PRODUCT_ID_PATH, deviceProductId);
- if (deviceProductId.find("MTCDT3-") != std::string::npos) {
+ std::string deviceHwVersion = "";
+ /* Map the spi path to the device hw version/mtac product id, with the default being spidev0.0 */
+ MTS::System::readFile(HW_VERSION_PATH, deviceHwVersion);
+ if (deviceHwVersion.find("MTCDT3-") != std::string::npos) {
if (port.back() == '2') {
spiPath = "/dev/spidev1.2";
} else {