Skip to content

Commit

Permalink
If CFG_au921 is set, set CFG_au915 and warn the user about deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
frazar committed Oct 5, 2019
1 parent 1346241 commit 458d1f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ci/platformio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
5 changes: 5 additions & 0 deletions src/lmic/lmic_config_preconditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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([email protected]) consider moving this block to a central file as it's not
// user-editable.
Expand Down

0 comments on commit 458d1f7

Please sign in to comment.