From 458d1f7f02a84ea2f48bdc4b4ab4ed22a5942fdf Mon Sep 17 00:00:00 2001 From: Francesco Zardi Date: Sat, 5 Oct 2019 08:42:31 +0200 Subject: [PATCH] If CFG_au921 is set, set CFG_au915 and warn the user about deprecation --- ci/platformio.sh | 3 +++ src/lmic/lmic_config_preconditions.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ci/platformio.sh b/ci/platformio.sh index 5e43d853..3e1f8292 100755 --- a/ci/platformio.sh +++ b/ci/platformio.sh @@ -139,6 +139,9 @@ then # Make sure debug prints work PLATFORMIO_BUILD_FLAGS='-D COMPILE_REGRESSION_TEST -D LED_BUILTIN=13 -D LMIC_DEBUG_LEVEL=2 -D LMIC_PRINTF_TO=Serial' platformio ci --lib . --board feather32u4 'examples/raw/raw.ino' + + # Check build with deprecated CFG_au921 flag + PLATFORMIO_BUILD_FLAGS='-D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS -D CFG_au921 -D CFG_sx1276_radio' platformio ci --lib . --board feather32u4 'examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino' elif [ "$TARGET" == "samd" ] then echo "WARNING: target '$TARGET' is not configured yet." diff --git a/src/lmic/lmic_config_preconditions.h b/src/lmic/lmic_config_preconditions.h index c95e1456..63e567cc 100644 --- a/src/lmic/lmic_config_preconditions.h +++ b/src/lmic/lmic_config_preconditions.h @@ -92,6 +92,11 @@ Revision history: # include CFG_TEXT_1(ARDUINO_LMIC_PROJECT_CONFIG_H) #endif /* ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS */ +#ifdef CFG_au921 +# warning "CFG_au921 was deprecated in favour of CFG_au915. Support for CFG_au921 might be removed in the future." +# define CFG_au915 +#endif + // a mask of the supported regions // TODO(tmm@mcci.com) consider moving this block to a central file as it's not // user-editable.