[AX.25] Added APRS classes
This commit is contained in:
parent
14d3ac6dff
commit
3eb831d7e1
2 changed files with 14 additions and 1 deletions
|
@ -366,7 +366,7 @@ int16_t AX25Client::sendFrame(AX25Frame* frame) {
|
||||||
} else {
|
} else {
|
||||||
stuffedFrameBuff[stuffedFrameBuffLen - 1] = RADIOLIB_AX25_FLAG;
|
stuffedFrameBuff[stuffedFrameBuffLen - 1] = RADIOLIB_AX25_FLAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert to NRZI
|
// convert to NRZI
|
||||||
for(size_t i = _preambleLen + 1; i < stuffedFrameBuffLen*8; i++) {
|
for(size_t i = _preambleLen + 1; i < stuffedFrameBuffLen*8; i++) {
|
||||||
size_t currBitPos = i + 7 - 2*(i%8);
|
size_t currBitPos = i + 7 - 2*(i%8);
|
||||||
|
@ -431,6 +431,14 @@ int16_t AX25Client::sendFrame(AX25Frame* frame) {
|
||||||
return(state);
|
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
|
CCITT CRC implementation based on https://github.com/kicksat/ax25
|
||||||
|
|
||||||
|
|
|
@ -345,6 +345,8 @@ class AX25Client {
|
||||||
#if !defined(RADIOLIB_GODMODE)
|
#if !defined(RADIOLIB_GODMODE)
|
||||||
private:
|
private:
|
||||||
#endif
|
#endif
|
||||||
|
friend class APRSClient;
|
||||||
|
|
||||||
PhysicalLayer* _phy;
|
PhysicalLayer* _phy;
|
||||||
#if !defined(RADIOLIB_EXCLUDE_AFSK)
|
#if !defined(RADIOLIB_EXCLUDE_AFSK)
|
||||||
AFSKClient* _audio;
|
AFSKClient* _audio;
|
||||||
|
@ -357,6 +359,9 @@ class AX25Client {
|
||||||
uint16_t _preambleLen = 0;
|
uint16_t _preambleLen = 0;
|
||||||
|
|
||||||
static uint16_t getFrameCheckSequence(uint8_t* buff, size_t len);
|
static uint16_t getFrameCheckSequence(uint8_t* buff, size_t len);
|
||||||
|
|
||||||
|
void getCallsign(char* buff);
|
||||||
|
uint8_t getSSID();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue