From 615cebcf6bd363b86e8495ade20fdf996165f9e6 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sat, 18 Nov 2023 15:07:19 +0100 Subject: [PATCH] Added warning for low-end platforms (Uno etc.) --- src/BuildOpt.h | 4 ++++ src/RadioLib.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/BuildOpt.h b/src/BuildOpt.h index be96ee12..813dac83 100644 --- a/src/BuildOpt.h +++ b/src/BuildOpt.h @@ -83,6 +83,10 @@ // Arduino AVR boards (except for megaAVR) - Uno, Mega etc. #define RADIOLIB_PLATFORM "Arduino AVR" + #if !(defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) + #define RADIOLIB_LOWEND_PLATFORM + #endif + #elif defined(ESP8266) // ESP8266 boards #define RADIOLIB_PLATFORM "ESP8266" diff --git a/src/RadioLib.h b/src/RadioLib.h index 9a673cb1..735309d2 100644 --- a/src/RadioLib.h +++ b/src/RadioLib.h @@ -70,6 +70,11 @@ #warning "RadioLib might not be compatible with this Arduino board - check supported platforms at https://github.com/jgromes/RadioLib!" #endif +// print warning for low-end platforms +#if defined(RADIOLIB_LOWEND_PLATFORM) + #warning "Low-end platform detected, stability issues are likely!" +#endif + #include "modules/CC1101/CC1101.h" #include "modules/LLCC68/LLCC68.h" #include "modules/nRF24/nRF24.h"