From d4a13ae1de9a480cc63be2db486ac5dda97bf7bb Mon Sep 17 00:00:00 2001 From: Glyn Hudson Date: Thu, 1 Jun 2023 17:35:57 +0100 Subject: [PATCH] add build env for LPL and JeeLib classic RF formats --- firmware/emonth2.ino | 3 ++- firmware/platformio.ini | 27 ++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/firmware/emonth2.ino b/firmware/emonth2.ino index 1f22e8e..6d1c65e 100644 --- a/firmware/emonth2.ino +++ b/firmware/emonth2.ino @@ -79,7 +79,8 @@ const char *firmware_version = {"4.1.2\n\r"}; #define RFM69_JEELIB_NATIVE 2 #define RFM69_LOW_POWER_LABS 3 -#define RadioFormat RFM69_LOW_POWER_LABS +// Set in platformio.ini +//#define RadioFormat RFM69_LOW_POWER_LABS bool flash_led = false; // true = Flash LED after each sample (increases battery drain) diff --git a/firmware/platformio.ini b/firmware/platformio.ini index e39de73..b79d142 100644 --- a/firmware/platformio.ini +++ b/firmware/platformio.ini @@ -1,9 +1,9 @@ [platformio] -default_envs = default +default_envs = lpl src_dir = . #lib_dir = ../libraries -[env:default] +[common] platform = atmelavr framework = arduino board = uno @@ -17,5 +17,26 @@ lib_deps = OneWire DallasTemperature SI7021 -#build_flags = '-DRFM69_LPL_AES_ENCRYPTION_KEY="my-encrypted-key"' + + +# NEW Low Power Labs encrypted RF format (RFM69SPI compatiable) +[env:lpl] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board} +monitor_speed = ${common.monitor_speed} +lib_deps = ${common.lib_deps} +build_flags = + -D RadioFormat=RFM69_LOW_POWER_LABS + #-D RFM69_LPL_AES_ENCRYPTION_KEY="my-encrypted-key" + +# OLD JeeLive Classic RS format (RFM69Pi compatiable) +[env:jeelib_classic] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board} +monitor_speed = ${common.monitor_speed} +lib_deps = ${common.lib_deps} +build_flags = + -D RadioFormat=RFM69_JEELIB_CLASSIC