[AX25] Added override for Arduino String class transmit

This commit is contained in:
jgromes 2022-10-16 17:47:58 +02:00
parent 6eeee45968
commit 39489aeae6
2 changed files with 17 additions and 0 deletions

View file

@ -192,6 +192,10 @@ int16_t AX25Client::begin(const char* srcCallsign, uint8_t srcSSID, uint8_t prea
return(_phy->startDirect());
}
int16_t AX25Client::transmit(String& str, const char* destCallsign, uint8_t destSSID) {
return(transmit(str.c_str(), destCallsign, destSSID));
}
int16_t AX25Client::transmit(const char* str, const char* destCallsign, uint8_t destSSID) {
// create control field
uint8_t controlField = RADIOLIB_AX25_CONTROL_U_UNNUMBERED_INFORMATION | RADIOLIB_AX25_CONTROL_POLL_FINAL_DISABLED | RADIOLIB_AX25_CONTROL_UNNUMBERED_FRAME;

View file

@ -320,6 +320,19 @@ class AX25Client {
*/
int16_t begin(const char* srcCallsign, uint8_t srcSSID = 0x00, uint8_t preambleLen = 8);
/*!
\brief Transmit unnumbered information (UI) frame.
\param str Data to be sent as Arduino String.
\param destCallsign Callsign of the destination station.
\param destSSID 4-bit SSID of the destination station (in case there are more stations with the same callsign). Defaults to 0.
\returns \ref status_codes
*/
int16_t transmit(String& str, const char* destCallsign, uint8_t destSSID = 0x00);
/*!
\brief Transmit unnumbered information (UI) frame.