From 8c7856e74ba7bc149180aa3ab9f820043260cdc8 Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Thu, 9 Jan 2020 12:10:01 -0600 Subject: Added spidev as to accessory card object, moved setting capabilities for lora accessory cards to a common base class function --- include/Device/Device.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'include/Device') diff --git a/include/Device/Device.h b/include/Device/Device.h index aa1d32b..86e284f 100644 --- a/include/Device/Device.h +++ b/include/Device/Device.h @@ -4,7 +4,6 @@ #include "General.h" #include "Utility.h" #include "Version.h" -#include "AccessoryCardLora15.h" class Device { private: @@ -32,7 +31,6 @@ class Device { static const std::regex storeFilters; static const std::regex showFilters; - class AccessoryCard { protected: Device& device; @@ -43,14 +41,15 @@ class Device { class LoraCard : public AccessoryCard { protected: std::string spiPath; + uint8_t fpgaVersion = 255; public: - LoraCard(Device& d, const std::string productId, const std::string port); + LoraCard(Device& d, const std::string productId, const std::string port); + void setCapabilities(); }; class Lora15Card : public LoraCard { private: void *spi_target_ptr = NULL; - uint8_t fpgaVersion = 255; public: Lora15Card(Device& d, const std::string productId, const std::string port); int spiOpen(const char *spidev); @@ -60,14 +59,14 @@ class Device { class Lora21Card : public LoraCard { private: - std::string fpgaVersion; + std::string cmdFpgaVersion; public: Lora21Card(Device& d, const std::string productId, const std::string port); }; class Lora21ExtCard : public Lora21Card { private: - std::string fpgaVersion2; + std::string cmdFpgaVersion2; public: Lora21ExtCard(Device& d, const std::string productId, const std::string port); }; -- cgit v1.2.3