From 0d9b7e3c165e5e2a43f75762fe6c9f1d64f7cf10 Mon Sep 17 00:00:00 2001 From: Gregg Date: Sun, 4 Oct 2020 13:53:07 -0500 Subject: [PATCH] Made RFControl more generic Instead of pre-defining RF433 and RF315, the user should define their own RFControl{pin} as a variable in their device-specific DEV_*.h file. Makes RFControl more generic and not specific to any transmitter name (such as 433 or 315). Also means that the pin can be set by the user instead of having to modify RFControl.h deep in the library. --- src/extras/RFControl.cpp | 3 --- src/extras/RFControl.h | 7 ++----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/extras/RFControl.cpp b/src/extras/RFControl.cpp index 77f5453..4644bc2 100644 --- a/src/extras/RFControl.cpp +++ b/src/extras/RFControl.cpp @@ -78,6 +78,3 @@ boolean RFControl::configured=false; volatile int RFControl::numCycles; uint32_t *RFControl::pRMT=(uint32_t *)RMT_CHANNEL_MEM(0); int RFControl::pCount=0; - -RFControl RF433(RF433_PIN); -RFControl RF315(RF315_PIN); diff --git a/src/extras/RFControl.h b/src/extras/RFControl.h index 3449277..bc0d59a 100644 --- a/src/extras/RFControl.h +++ b/src/extras/RFControl.h @@ -3,9 +3,6 @@ // RF Control Module // //////////////////////////////////// -#define RF433_PIN 22 // pin used for 433MHz transmitter -#define RF315_PIN 23 // pin used for 315MHz transmitter - class RFControl { private: int pin; @@ -24,6 +21,6 @@ class RFControl { // Two transmitters are defined -extern RFControl RF433; -extern RFControl RF315; +//extern RFControl RF433; +//extern RFControl RF315;