diff --git a/src/Core.cpp b/src/Core.cpp index 0a56745..965bbde 100644 --- a/src/Core.cpp +++ b/src/Core.cpp @@ -88,16 +88,11 @@ namespace core { details::appendToSmsBuffer(buffer, PSTR("\n- RTC was stopped.%S"), backupFailureString); } -#if ALERTS_ON_SERIAL_IF_AVAILABLE - if(Serial) { - NOTICE_FORMAT("notifyFailure", "%s", buffer); - notified = true; - } - else { -#endif +#if ALERTS_ON_SERIAL + NOTICE_FORMAT("notifyFailure", "%s", buffer); + notified = true; +#else notified = network::sendSms(buffer); -#if ALERTS_ON_SERIAL_IF_AVAILABLE - } #endif if (!notified) NOTICE_MSG("notifyFailure", "SMS not sent !"); } diff --git a/src/config/Alerts.h b/src/config/Alerts.h index b2122de..61247f8 100644 --- a/src/config/Alerts.h +++ b/src/config/Alerts.h @@ -18,15 +18,16 @@ /** - \def ALERTS_ON_SERIAL_IF_AVAILABLE + \def ALERTS_ON_SERIAL Display alerts on serial when connected rather than sending an SMS. Useful for debugging purpose and avoid costs related to SMS sending. */ -#define ALERTS_ON_SERIAL_IF_AVAILABLE 1 +#define ALERTS_ON_SERIAL _DEBUG + /** \def ALERT_SUSPICIOUS_RTC_TEMPERATURE Temperature at which to consider the RTC module as failling. When the backup battery is dead or nearly dead, the reading of the temperature fails and returns 0. */ -#define ALERT_SUSPICIOUS_RTC_TEMPERATURE 0 \ No newline at end of file +#define ALERT_SUSPICIOUS_RTC_TEMPERATURE 0 \ No newline at end of file