Skip to content

Commit 458d1f7

Browse files
committed
If CFG_au921 is set, set CFG_au915 and warn the user about deprecation
1 parent 1346241 commit 458d1f7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

ci/platformio.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ then
139139

140140
# Make sure debug prints work
141141
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'
142+
143+
# Check build with deprecated CFG_au921 flag
144+
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'
142145
elif [ "$TARGET" == "samd" ]
143146
then
144147
echo "WARNING: target '$TARGET' is not configured yet."

src/lmic/lmic_config_preconditions.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ Revision history:
9292
# include CFG_TEXT_1(ARDUINO_LMIC_PROJECT_CONFIG_H)
9393
#endif /* ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS */
9494

95+
#ifdef CFG_au921
96+
# warning "CFG_au921 was deprecated in favour of CFG_au915. Support for CFG_au921 might be removed in the future."
97+
# define CFG_au915
98+
#endif
99+
95100
// a mask of the supported regions
96101
// TODO([email protected]) consider moving this block to a central file as it's not
97102
// user-editable.

0 commit comments

Comments
 (0)