From 6e523b3588c508640cc6041392d3a3e1c366f411 Mon Sep 17 00:00:00 2001 From: Matt Way Date: Thu, 4 Apr 2024 20:53:58 +1100 Subject: [PATCH] Define RF_ID in platformio.ini file instead of main.cpp --- platformio.ini | 1 + src/main.cpp | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/platformio.ini b/platformio.ini index 56cfabe..8e88158 100644 --- a/platformio.ini +++ b/platformio.ini @@ -16,6 +16,7 @@ build_flags = -D RF_CE_PIN=5 -D RF_CS_PIN=15 -D RF_IRQ_PIN=4 + -D RF_ID=0x2EC8 ; Copied from Powerview Hub userdata API. Open http://POWERVIEW_HUB_IP_ADDRESS/api/userdata/ and find the field labeled "rfID" [env] monitor_speed = 115200 diff --git a/src/main.cpp b/src/main.cpp index 7de6f24..f5d71a1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,10 +6,6 @@ #define SER_BAUDRATE (115200) -// Copied from Powerview Hub userdata API -// eg: http://POWERVIEW_HUB_IP_ADDRESS/api/userdata/ and find the field labeled "rfID" -#define RF_ID (0x2EC8) - RFPowerView powerView(RF_CE_PIN, RF_CS_PIN, RF_IRQ_PIN, RF_ID); void processBuffer(const uint8_t*);