#include "AccessoryCardLora.h" AccessoryCardLora::AccessoryCardLora(std::string ProductId, std::string Port) { port = Port; productId = ProductId; spiPath = "/dev/spidev0.0"; if ((productId.find("MTCDT3-") == 0) && (port.back() == '2')) { spiPath = "/dev/spidev1.0"; } else if (productId.find("MTAC-LORA-G") == 0) { spiPath = "/dev/spidev32766.2"; } else if (productId.find("MTAC-LORA-") == 0) { if (port.back() == '2') { spiPath = "/dev/spidev32765.2"; } else { spiPath = "/dev/spidev32766.2"; } } } std::string AccessoryCardLora::getPath() { return spiPath; }