[APRS] Reworked macro configuration system
This commit is contained in:
parent
fe0136b15c
commit
98054055bd
2 changed files with 7 additions and 7 deletions
|
@ -2,7 +2,7 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue