Compare commits

..

3 Commits

Author SHA1 Message Date
Jordan Sherer ecc537475a Bump to v0.6.3 2018-09-14 08:45:40 -04:00
Jordan Sherer caef6ad1cd Bump message version to prevent incompatible CQs between 0.5 and 0.6 while we transition 2018-09-14 08:44:41 -04:00
Jordan Sherer ffbfb3b133 Fixed issue with APRS packet queue processing 2018-09-13 22:23:32 -04:00
7 changed files with 20 additions and 18 deletions
+14 -12
View File
@@ -255,17 +255,13 @@ void APRSISClient::processQueue(bool disconnect){
return;
}
QQueue<QPair<QString, QDateTime>> delayed;
while(!m_frameQueue.isEmpty()){
auto pair = m_frameQueue.head();
auto frame = pair.first;
auto timestamp = pair.second;
// random delay 50% of the time for throttling (a skip will add 60 seconds to the processing time)
if(qrand() % 100 <= 50){
qDebug() << "APRSISClient Throttle: Skipping Frame";
continue;
}
// if the packet is older than the timeout, drop it.
if(timestamp.secsTo(QDateTime::currentDateTimeUtc()) > PACKET_TIMEOUT_SECONDS){
qDebug() << "APRSISClient Packet Timeout:" << frame;
@@ -273,19 +269,20 @@ void APRSISClient::processQueue(bool disconnect){
continue;
}
// random delay 25% of the time for throttling (a skip will add 60 seconds to the processing time)
if(qrand() % 100 <= 25){
qDebug() << "APRSISClient Throttle: Skipping Frame";
delayed.enqueue(m_frameQueue.dequeue());
continue;
}
QByteArray data = frame.toLocal8Bit();
if(write(data) == -1){
qDebug() << "APRSISClient Write Error:" << errorString();
return;
}
if(!waitForBytesWritten(5000)){
qDebug() << "APRSISClient Cannot Write Error: Write Timeout";
return;
}
qDebug() << "APRSISClient Write:" << data;
if(waitForReadyRead(5000)){
line = QString(readLine());
@@ -300,6 +297,11 @@ void APRSISClient::processQueue(bool disconnect){
m_frameQueue.dequeue();
}
// enqueue the delayed frames for later processing
while(!delayed.isEmpty()){
m_frameQueue.enqueue(delayed.dequeue());
}
if(disconnect){
disconnectFromHost();
}
+1 -1
View File
@@ -1,6 +1,6 @@
# Version number components
set (WSJTX_VERSION_MAJOR 0)
set (WSJTX_VERSION_MINOR 6)
set (WSJTX_VERSION_PATCH 2)
set (WSJTX_VERSION_PATCH 3)
set (WSJTX_RC 0) # release candidate number, comment out or zero for development versions
set (WSJTX_VERSION_IS_RELEASE 0) # set to 1 for final release build
+1 -1
View File
@@ -16,7 +16,7 @@ subroutine chkcrc12a(decoded,nbadcrc)
i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32)
i1Dec8BitBytes(11)=0
icrc12=crc12(c_loc(i1Dec8BitBytes),11) !CRC12 computed from 75 msg bits
icrc12=xor(icrc12, 42)
icrc12=xor(icrc12, 41)
nbadcrc=1
if(ncrc12.eq.icrc12) nbadcrc=0
+1 -1
View File
@@ -22,7 +22,7 @@ subroutine extractmessage174(decoded,msgreceived,ncrcflag)
i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32)
i1Dec8BitBytes(11)=0
icrc12=crc12(c_loc(i1Dec8BitBytes),11) !CRC12 computed from 75 msg bits
icrc12=xor(icrc12, 42)
icrc12=xor(icrc12, 41)
if(ncrc12.eq.icrc12 .or. sum(decoded(57:87)).eq.0) then !### Kludge ###
! CRC12 checks out --- unpack 72-bit message
+1 -1
View File
@@ -73,7 +73,7 @@ subroutine foxgen()
read(cb88,1003) i1Msg8BitBytes(1:11)
1003 format(11b8)
icrc12=crc12(c_loc(i1Msg8BitBytes),11)
icrc12=xor(icrc12, 42)
icrc12=xor(icrc12, 41)
write(cbits,1001) msgbits(1:56),icrc10,nrpt,i3b,icrc12
read(cbits,1002) msgbits
+1 -1
View File
@@ -38,7 +38,7 @@ subroutine genft8(msg,mygrid,bcontest,i3bit,msgsent,msgbits,itone)
i1Msg8BitBytes(10)=iand(i1Msg8BitBytes(10),128+64+32)
i1Msg8BitBytes(11)=0
icrc12=crc12(c_loc(i1Msg8BitBytes),11)
icrc12=xor(icrc12, 42)
icrc12=xor(icrc12, 41)
! For reference, here's how to check the CRC
! i1Msg8BitBytes(10)=icrc12/256
+1 -1
View File
@@ -91,7 +91,7 @@ allocate ( rxdata(N), llr(N) )
i1Msg8BitBytes(10:11)=0
checksum = crc12 (c_loc (i1Msg8BitBytes), 11)
checksum = xor(checksum, 42)
checksum = xor(checksum, 41)
! For reference, the next 3 lines show how to check the CRC
i1Msg8BitBytes(10)=checksum/256
i1Msg8BitBytes(11)=iand (checksum,255)