kopia lustrzana https://github.com/sh123/esp32_loraprs
Remove 4 byte prefix
rodzic
e0dc7ddf54
commit
7f968a4e7c
1
config.h
1
config.h
|
@ -94,7 +94,6 @@
|
|||
#define CFG_BEACON false // enable perdiodic beacon from CFG_APRS_RAW_BKN
|
||||
#define CFG_TEXT_PACKETS false // enable aprs TNC2 text packets instead of binary for interoperability with other projects (disables KISS + AX.25!)
|
||||
#define CFG_TEXT_PACKETS_3 false // true - enable aprs-lora 3 byte prefix '<', 0xff, 0x01
|
||||
#define CFG_TEXT_PACKETS_4 false // true - enable oe3cjb 4 byte prefix
|
||||
|
||||
// Frequency correction for narrow band bandwidths
|
||||
#define CFG_FREQ_CORR false // true - correct own frequency based on received packet
|
||||
|
|
|
@ -84,7 +84,6 @@ void initializeConfig(LoraPrs::Config &cfg) {
|
|||
cfg.EnableBeacon = CFG_BEACON; // enable periodic AprsRawBeacon beacon to rf and aprsis if rf to aprsis is enabled
|
||||
cfg.EnableTextPackets = CFG_TEXT_PACKETS; // enables TNC2 text packets and disables KISS+AX25 binary frames for interoperability
|
||||
cfg.EnableTextPackets3 = CFG_TEXT_PACKETS_3; // enable aprs-lora 3 byte prefix '<', 0xff, 0x01
|
||||
cfg.EnableTextPackets4 = CFG_TEXT_PACKETS_4; // enable 4 byte prefix
|
||||
|
||||
// kiss
|
||||
cfg.KissEnableExtensions = CFG_KISS_EXTENSIONS; // radio control and signal reports
|
||||
|
|
|
@ -5,7 +5,6 @@ namespace Kiss {
|
|||
Processor::Processor()
|
||||
: disableKiss_(false)
|
||||
, usePrefix3_(false)
|
||||
, usePrefix4_(false)
|
||||
, isRawIdle_(true)
|
||||
, state_(State::GetStart)
|
||||
{
|
||||
|
@ -72,12 +71,6 @@ void Processor::queueSerialToRig(Cmd cmd, const byte *packet, int packetLength)
|
|||
result &= serialToRigQueue_.unshift(0xff);
|
||||
result &= serialToRigQueue_.unshift(0x01);
|
||||
}
|
||||
if (usePrefix4_) {
|
||||
result &= serialToRigQueue_.unshift(' ');
|
||||
result &= serialToRigQueue_.unshift(' ');
|
||||
result &= serialToRigQueue_.unshift(' ');
|
||||
result &= serialToRigQueue_.unshift(' ');
|
||||
}
|
||||
// TNC2, send as is, receiveByteRaw will deal with it
|
||||
for (int i = 0; i < packetLength; i++) {
|
||||
byte rxByte = packet[i];
|
||||
|
@ -138,12 +131,6 @@ bool Processor::processRigToSerial()
|
|||
rxPacketSize--;
|
||||
continue;
|
||||
}
|
||||
// filter out first 4 bytes
|
||||
} else if (usePrefix4_) {
|
||||
if (i >= 0 && i <= 3) {
|
||||
rxPacketSize--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
buf[j++] = rxByte;
|
||||
|
|
|
@ -86,7 +86,6 @@ private:
|
|||
protected:
|
||||
bool disableKiss_;
|
||||
bool usePrefix3_;
|
||||
bool usePrefix4_;
|
||||
|
||||
private:
|
||||
bool isRawIdle_;
|
||||
|
|
|
@ -69,7 +69,6 @@ struct Config
|
|||
bool EnableBeacon; // true - send AprsRawBeacon to RF and APRS-IS if EnableRfToIs is true
|
||||
bool EnableTextPackets; // true - use TNC2 text plain messages insead of AX25 binary frames for interoperability with other projects
|
||||
bool EnableTextPackets3; // true - enable aprs-lora 3 byte prefix '<', 0xff, 0x01
|
||||
bool EnableTextPackets4; // true - enable oe3cjb 4 byte prefix
|
||||
|
||||
// external ptt tx control
|
||||
bool PttEnable; // true - enable external ptt control
|
||||
|
|
|
@ -28,7 +28,6 @@ void Service::setup(const Config &conf)
|
|||
beaconLastTimestampMs_ = 0;
|
||||
disableKiss_ = conf.EnableTextPackets;
|
||||
usePrefix3_ = conf.EnableTextPackets3;
|
||||
usePrefix4_ = conf.EnableTextPackets4;
|
||||
|
||||
LOG_SET_OPTION(false, false, true); // disable file, line, enable func
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue