[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 <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#if !defined(RADIOLIB_EXCLUDE_APRS)
|
#if !RADIOLIB_EXCLUDE_APRS
|
||||||
|
|
||||||
APRSClient::APRSClient(AX25Client* ax) {
|
APRSClient::APRSClient(AX25Client* ax) {
|
||||||
axClient = ax;
|
axClient = ax;
|
||||||
|
@ -42,7 +42,7 @@ int16_t APRSClient::sendPosition(char* destCallsign, uint8_t destSSID, char* lat
|
||||||
if(time != NULL) {
|
if(time != NULL) {
|
||||||
len += strlen(time);
|
len += strlen(time);
|
||||||
}
|
}
|
||||||
#if !defined(RADIOLIB_STATIC_ONLY)
|
#if !RADIOLIB_STATIC_ONLY
|
||||||
char* info = new char[len + 1];
|
char* info = new char[len + 1];
|
||||||
#else
|
#else
|
||||||
char info[RADIOLIB_STATIC_ARRAY_SIZE];
|
char info[RADIOLIB_STATIC_ARRAY_SIZE];
|
||||||
|
@ -66,7 +66,7 @@ int16_t APRSClient::sendPosition(char* destCallsign, uint8_t destSSID, char* lat
|
||||||
|
|
||||||
// send the frame
|
// send the frame
|
||||||
int16_t state = sendFrame(destCallsign, destSSID, info);
|
int16_t state = sendFrame(destCallsign, destSSID, info);
|
||||||
#if !defined(RADIOLIB_STATIC_ONLY)
|
#if !RADIOLIB_STATIC_ONLY
|
||||||
delete[] info;
|
delete[] info;
|
||||||
#endif
|
#endif
|
||||||
return(state);
|
return(state);
|
||||||
|
@ -89,7 +89,7 @@ int16_t APRSClient::sendMicE(float lat, float lon, uint16_t heading, uint16_t sp
|
||||||
|
|
||||||
// prepare buffers
|
// prepare buffers
|
||||||
char destCallsign[7];
|
char destCallsign[7];
|
||||||
#if !defined(RADIOLIB_STATIC_ONLY)
|
#if !RADIOLIB_STATIC_ONLY
|
||||||
size_t infoLen = 10;
|
size_t infoLen = 10;
|
||||||
if(telemLen > 0) {
|
if(telemLen > 0) {
|
||||||
infoLen += 1 + telemLen;
|
infoLen += 1 + telemLen;
|
||||||
|
@ -231,7 +231,7 @@ int16_t APRSClient::sendMicE(float lat, float lon, uint16_t heading, uint16_t sp
|
||||||
destSSID = 1;
|
destSSID = 1;
|
||||||
}
|
}
|
||||||
int16_t state = sendFrame(destCallsign, destSSID, info);
|
int16_t state = sendFrame(destCallsign, destSSID, info);
|
||||||
#if !defined(RADIOLIB_STATIC_ONLY)
|
#if !RADIOLIB_STATIC_ONLY
|
||||||
delete[] info;
|
delete[] info;
|
||||||
#endif
|
#endif
|
||||||
return(state);
|
return(state);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "../../TypeDef.h"
|
#include "../../TypeDef.h"
|
||||||
|
|
||||||
#if !defined(RADIOLIB_EXCLUDE_APRS)
|
#if !RADIOLIB_EXCLUDE_APRS
|
||||||
|
|
||||||
#include "../PhysicalLayer/PhysicalLayer.h"
|
#include "../PhysicalLayer/PhysicalLayer.h"
|
||||||
#include "../AX25/AX25.h"
|
#include "../AX25/AX25.h"
|
||||||
|
@ -128,7 +128,7 @@ class APRSClient {
|
||||||
*/
|
*/
|
||||||
int16_t sendFrame(char* destCallsign, uint8_t destSSID, char* info);
|
int16_t sendFrame(char* destCallsign, uint8_t destSSID, char* info);
|
||||||
|
|
||||||
#if !defined(RADIOLIB_GODMODE)
|
#if !RADIOLIB_GODMODE
|
||||||
private:
|
private:
|
||||||
#endif
|
#endif
|
||||||
AX25Client* axClient;
|
AX25Client* axClient;
|
||||||
|
|
Loading…
Add table
Reference in a new issue