From 98054055bd128956f950585ce9d3977d1165ed5e Mon Sep 17 00:00:00 2001 From: jgromes Date: Mon, 27 Nov 2023 21:16:13 +0100 Subject: [PATCH] [APRS] Reworked macro configuration system --- src/protocols/APRS/APRS.cpp | 10 +++++----- src/protocols/APRS/APRS.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/protocols/APRS/APRS.cpp b/src/protocols/APRS/APRS.cpp index 3458272e..55b034d1 100644 --- a/src/protocols/APRS/APRS.cpp +++ b/src/protocols/APRS/APRS.cpp @@ -2,7 +2,7 @@ #include #include #include -#if !defined(RADIOLIB_EXCLUDE_APRS) +#if !RADIOLIB_EXCLUDE_APRS APRSClient::APRSClient(AX25Client* ax) { axClient = ax; @@ -42,7 +42,7 @@ int16_t APRSClient::sendPosition(char* destCallsign, uint8_t destSSID, char* lat if(time != NULL) { len += strlen(time); } - #if !defined(RADIOLIB_STATIC_ONLY) + #if !RADIOLIB_STATIC_ONLY char* info = new char[len + 1]; #else char info[RADIOLIB_STATIC_ARRAY_SIZE]; @@ -66,7 +66,7 @@ int16_t APRSClient::sendPosition(char* destCallsign, uint8_t destSSID, char* lat // send the frame int16_t state = sendFrame(destCallsign, destSSID, info); - #if !defined(RADIOLIB_STATIC_ONLY) + #if !RADIOLIB_STATIC_ONLY delete[] info; #endif return(state); @@ -89,7 +89,7 @@ int16_t APRSClient::sendMicE(float lat, float lon, uint16_t heading, uint16_t sp // prepare buffers char destCallsign[7]; - #if !defined(RADIOLIB_STATIC_ONLY) + #if !RADIOLIB_STATIC_ONLY size_t infoLen = 10; if(telemLen > 0) { infoLen += 1 + telemLen; @@ -231,7 +231,7 @@ int16_t APRSClient::sendMicE(float lat, float lon, uint16_t heading, uint16_t sp destSSID = 1; } int16_t state = sendFrame(destCallsign, destSSID, info); - #if !defined(RADIOLIB_STATIC_ONLY) + #if !RADIOLIB_STATIC_ONLY delete[] info; #endif return(state); diff --git a/src/protocols/APRS/APRS.h b/src/protocols/APRS/APRS.h index ee74cfa0..8369a6f3 100644 --- a/src/protocols/APRS/APRS.h +++ b/src/protocols/APRS/APRS.h @@ -3,7 +3,7 @@ #include "../../TypeDef.h" -#if !defined(RADIOLIB_EXCLUDE_APRS) +#if !RADIOLIB_EXCLUDE_APRS #include "../PhysicalLayer/PhysicalLayer.h" #include "../AX25/AX25.h" @@ -128,7 +128,7 @@ class APRSClient { */ int16_t sendFrame(char* destCallsign, uint8_t destSSID, char* info); -#if !defined(RADIOLIB_GODMODE) +#if !RADIOLIB_GODMODE private: #endif AX25Client* axClient;