summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Sharma <harsh.sharma@multitech.com>2020-11-09 14:10:34 -0600
committerHarsh Sharma <harsh.sharma@multitech.com>2020-11-09 14:10:34 -0600
commitff2949b92db803f04cb056f8b4f83d28db4faa07 (patch)
tree740acb95380fdfeb563535434f43b5c98dfe512a
parentf13e498b07f525c9e74e735761efc3150ab45224 (diff)
downloadmts-io-sysfs-ff2949b92db803f04cb056f8b4f83d28db4faa07.tar.gz
mts-io-sysfs-ff2949b92db803f04cb056f8b4f83d28db4faa07.tar.bz2
mts-io-sysfs-ff2949b92db803f04cb056f8b4f83d28db4faa07.zip
Changed mtcdt3 lora card identifier from product-id to hw version0.1.10
-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 {