[AX.25] Added APRS classes

This commit is contained in:
jgromes 2021-11-28 22:54:20 +01:00
parent 14d3ac6dff
commit 3eb831d7e1
2 changed files with 14 additions and 1 deletions
src/protocols/AX25

View file

@ -366,7 +366,7 @@ int16_t AX25Client::sendFrame(AX25Frame* frame) {
} else {
stuffedFrameBuff[stuffedFrameBuffLen - 1] = RADIOLIB_AX25_FLAG;
}
// convert to NRZI
for(size_t i = _preambleLen + 1; i < stuffedFrameBuffLen*8; i++) {
size_t currBitPos = i + 7 - 2*(i%8);
@ -431,6 +431,14 @@ int16_t AX25Client::sendFrame(AX25Frame* frame) {
return(state);
}
void AX25Client::getCallsign(char* buff) {
strncpy(buff, _srcCallsign, RADIOLIB_AX25_MAX_CALLSIGN_LEN);
}
uint8_t AX25Client::getSSID() {
return(_srcSSID);
}
/*
CCITT CRC implementation based on https://github.com/kicksat/ax25

View file

@ -345,6 +345,8 @@ class AX25Client {
#if !defined(RADIOLIB_GODMODE)
private:
#endif
friend class APRSClient;
PhysicalLayer* _phy;
#if !defined(RADIOLIB_EXCLUDE_AFSK)
AFSKClient* _audio;
@ -357,6 +359,9 @@ class AX25Client {
uint16_t _preambleLen = 0;
static uint16_t getFrameCheckSequence(uint8_t* buff, size_t len);
void getCallsign(char* buff);
uint8_t getSSID();
};
#endif