starting with builing Tx packet
This commit is contained in:
parent
d83bb19bc8
commit
d82cf9235d
|
|
@ -121,8 +121,15 @@ namespace APRS_IS_Utils {
|
||||||
String buildPacketToTx(const String& aprsisPacket, uint8_t packetType) {
|
String buildPacketToTx(const String& aprsisPacket, uint8_t packetType) {
|
||||||
String packet = aprsisPacket;
|
String packet = aprsisPacket;
|
||||||
packet.trim();
|
packet.trim();
|
||||||
String outputPacket = packet.substring(0, packet.indexOf(","));
|
String outputPacket = Config.callsign;
|
||||||
outputPacket.concat(",TCPIP,WIDE1-1,");
|
outputPacket += ">APLRG1";
|
||||||
|
if (Config.beacon.path != "") {
|
||||||
|
outputPacket += ",";
|
||||||
|
outputPacket += Config.beacon.path;
|
||||||
|
}
|
||||||
|
outputPacket += ":}";
|
||||||
|
outputPacket += packet.substring(0, packet.indexOf(",")); //packetCallsign>packetTocall
|
||||||
|
outputPacket.concat(",TCPIP,");
|
||||||
outputPacket.concat(Config.callsign);
|
outputPacket.concat(Config.callsign);
|
||||||
outputPacket.concat("*");
|
outputPacket.concat("*");
|
||||||
switch (packetType) {
|
switch (packetType) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue