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.
This commit is contained in:
Gregg 2020-10-04 13:53:07 -05:00
parent 22962ebfe3
commit 0d9b7e3c16
2 changed files with 2 additions and 8 deletions

View File

@ -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);

View File

@ -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;