From c4811dd1b73b37b0916803097237acd31f1df98b Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Tue, 7 Jan 2020 15:50:56 -0600 Subject: Refactored accessory cards classes with inheritence, fixed Makefile clean, moved some helper functions to header utility --- src/AccessoryCards/AccessoryCardLora.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 src/AccessoryCards/AccessoryCardLora.cpp (limited to 'src/AccessoryCards/AccessoryCardLora.cpp') diff --git a/src/AccessoryCards/AccessoryCardLora.cpp b/src/AccessoryCards/AccessoryCardLora.cpp deleted file mode 100644 index 13bbab5..0000000 --- a/src/AccessoryCards/AccessoryCardLora.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#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; -} -- cgit v1.2.3