From 7802baa0bd2d3a2cc4289196c0853cc5ea6f0ff7 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 20 Jul 2021 14:24:29 +0200 Subject: [PATCH 01/22] Adding zeromq stuff --- JAERO/.qmake.stash | 22 + JAERO/JAERO.pro | 84 +- JAERO/aerol.cpp | 38 +- JAERO/aerol.h | 58 +- JAERO/audioburstmskdemodulator.cpp | 7 + JAERO/audioburstoqpskdemodulator.cpp | 7 + JAERO/audiomskdemodulator.cpp | 7 + JAERO/audiooqpskdemodulator.cpp | 9 + JAERO/audioreceiver.cpp | 56 ++ JAERO/audioreceiver.h | 55 ++ JAERO/burstmskdemodulator.cpp | 19 +- JAERO/burstmskdemodulator.h | 6 + JAERO/burstoqpskdemodulator.cpp | 27 +- JAERO/burstoqpskdemodulator.h | 11 + .../UsersjeroenAppDataLocalTemptmp1_94dcea | 0 .../UsersjeroenAppDataLocalTemptmp1yxsa67p | 0 .../UsersjeroenAppDataLocalTemptmpgie733gt | 0 .../UsersjeroenAppDataLocalTemptmpkz73g8jc | 0 JAERO/gui_classes/settingsdialog.cpp | 43 +- JAERO/gui_classes/settingsdialog.cpp.bak | 227 ++++++ JAERO/gui_classes/settingsdialog.h | 15 + JAERO/gui_classes/settingsdialog.h.bak | 78 ++ JAERO/gui_classes/settingsdialog.ui | 318 +++++++- JAERO/gui_classes/settingsdialog.ui.bak | 723 ++++++++++++++++++ JAERO/jconvolutionalcodec.cpp | 2 +- JAERO/main.cpp | 2 +- JAERO/mainwindow.cpp | 281 ++++++- JAERO/mainwindow.h | 23 + JAERO/mskdemodulator.cpp | 14 +- JAERO/mskdemodulator.h | 4 + JAERO/oqpskdemodulator.cpp | 61 +- JAERO/oqpskdemodulator.h | 3 + JAERO/tmp/debug/stuff/moc_predefs.h | 384 ++++++++++ 33 files changed, 2458 insertions(+), 126 deletions(-) create mode 100644 JAERO/.qmake.stash create mode 100644 JAERO/audioreceiver.cpp create mode 100644 JAERO/audioreceiver.h create mode 100644 JAERO/debug/UsersjeroenAppDataLocalTemptmp1_94dcea create mode 100644 JAERO/debug/UsersjeroenAppDataLocalTemptmp1yxsa67p create mode 100644 JAERO/debug/UsersjeroenAppDataLocalTemptmpgie733gt create mode 100644 JAERO/debug/UsersjeroenAppDataLocalTemptmpkz73g8jc create mode 100644 JAERO/gui_classes/settingsdialog.cpp.bak create mode 100644 JAERO/gui_classes/settingsdialog.h.bak create mode 100644 JAERO/gui_classes/settingsdialog.ui.bak create mode 100644 JAERO/tmp/debug/stuff/moc_predefs.h diff --git a/JAERO/.qmake.stash b/JAERO/.qmake.stash new file mode 100644 index 0000000..e530957 --- /dev/null +++ b/JAERO/.qmake.stash @@ -0,0 +1,22 @@ +QMAKE_CXX.QT_COMPILER_STDCXX = 201402L +QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 9 +QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 2 +QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0 +QMAKE_CXX.COMPILER_MACROS = \ + QT_COMPILER_STDCXX \ + QMAKE_GCC_MAJOR_VERSION \ + QMAKE_GCC_MINOR_VERSION \ + QMAKE_GCC_PATCH_VERSION +QMAKE_CXX.INCDIRS = \ + C:/msys64/mingw64/include/c++/9.2.0 \ + C:/msys64/mingw64/include/c++/9.2.0/x86_64-w64-mingw32 \ + C:/msys64/mingw64/include/c++/9.2.0/backward \ + C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/include \ + C:/msys64/mingw64/include \ + C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/include-fixed \ + C:/msys64/mingw64/x86_64-w64-mingw32/include +QMAKE_CXX.LIBDIRS = \ + C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0 \ + C:/msys64/mingw64/lib/gcc \ + C:/msys64/mingw64/x86_64-w64-mingw32/lib \ + C:/msys64/mingw64/lib diff --git a/JAERO/JAERO.pro b/JAERO/JAERO.pro index deaef90..cf49b36 100644 --- a/JAERO/JAERO.pro +++ b/JAERO/JAERO.pro @@ -21,7 +21,8 @@ TARGET = JAERO TEMPLATE = app INSTALL_PATH = /opt/jaero -JFFT_PATH = ../../JFFT/ +JFFT_PATH = C:/work/git_repos/JFFT/ +EXT_DEP_PATH=C:/work/svn/JAERO QMAKE_CXXFLAGS += -std=c++11 @@ -85,7 +86,9 @@ SOURCES += mainwindow.cpp \ $$JFFT_PATH/jfft.cpp \ util/stdio_utils.cpp \ util/file_utils.cpp \ - util/RuntimeError.cpp + util/RuntimeError.cpp\ + audioreceiver.cpp + HEADERS += mainwindow.h \ coarsefreqestimate.h \ @@ -119,18 +122,10 @@ HEADERS += mainwindow.h \ $$JFFT_PATH/jfft.h \ util/stdio_utils.h \ util/file_utils.h \ - util/RuntimeError.h + util/RuntimeError.h\ + audioreceiver.h + -# Tell the qcustomplot header that it will be used as library: -DEFINES += QCUSTOMPLOT_USE_LIBRARY -#qcustom plot is called different names on different systems -win32 { -#message("windows") -LIBS += -lqcustomplot2 -} else { -#message("not windows") -LIBS += -lqcustomplot -} FORMS += mainwindow.ui \ gui_classes/settingsdialog.ui \ @@ -158,8 +153,46 @@ QMAKE_CXXFLAGS_RELEASE += -O3 # add the desired -O3 if not present #QMAKE_CXXFLAGS_RELEASE *= -O3 + + +win32 { +#on windows the libcorrect dlls are here +INCLUDEPATH +=$$EXT_DEP_PATH/libcorrect/include +contains(QT_ARCH, i386) { + #message("32-bit") + LIBS += -L$$EXT_DEP_PATH/libcorrect/lib/32 +} else { + #message("64-bit") + LIBS += -L$$EXT_DEP_PATH/libcorrect/lib/64 +} +LIBS += -llibcorrect +} + +win32 { +# libacars support +INCLUDEPATH +=$$EXT_DEP_PATH/libacars-2.1.2 +LIBS += -L$$EXT_DEP_PATH/libacars-2.1.2/build/libacars +#in windows use the dynamic lib rather than the static one even when stattically compiling + +LIBS += -lacars-2.dll +} else { +LIBS += -lacars-2 +} + +win32: LIBS += -L$$EXT_DEP_PATH/libzmq/lib/ -llibzmq-v120-mt-4_0_4 + +INCLUDEPATH += $$EXT_DEP_PATH/libzmq/include +DEPENDPATH += $$EXT_DEP_PATH/libzmq/include + +#for static building order seems to matter +LIBS += -lcorrect -lvorbis -lvorbisenc -logg + + +#for audio compressor #for static building order seems to matter -LIBS += -lcorrect -lvorbis -lvorbisenc -logg -lacars +INCLUDEPATH += $$EXT_DEP_PATH/libvorbis-1.3.6/include +LIBS += -L$$EXT_DEP_PATH/libvorbis-1.3.6/lib/.libs -lvorbis -lvorbisenc +LIBS += -L$$EXT_DEP_PATH/libogg-1.3.3/src/.libs -logg #desktop desktop.path = /usr/share/applications @@ -185,3 +218,26 @@ INSTALLS += target QMAKE_CXXFLAGS += '-Wno-deprecated-copy' #QMAKE_CXXFLAGS += '-Werror=format-security' + +win32: LIBS += -L$$PWD/../../../svn/build-qcustomplot-Desktop_Qt_MinGW_w64_64bit_MSYS2-Release/release/ -lqcustomplot + +INCLUDEPATH += $$PWD/../../../svn/qcustomplot +DEPENDPATH += $$PWD/../../../svn/qcustomplot + +win32:!win32-g++: PRE_TARGETDEPS += $$PWD/../../../svn/build-qcustomplot-Desktop_Qt_MinGW_w64_64bit_MSYS2-Release/release/qcustomplot.lib +else:win32-g++: PRE_TARGETDEPS += $$PWD/../../../svn/build-qcustomplot-Desktop_Qt_MinGW_w64_64bit_MSYS2-Release/release/libqcustomplot.a + +#define where we store everything so when using the command line we don't make the main directory messy. +CONFIG(debug, debug|release) { + DESTDIR = $$PWD/debug + OBJECTS_DIR = $$PWD/tmp/debug/stuff + MOC_DIR = $$PWD/tmp/debug/stuff + UI_DIR = $$PWD/tmp/debug/stuff + RCC_DIR = $$PWD/tmp/debug/stuff +} else { + DESTDIR = $$PWD/release + OBJECTS_DIR = $$PWD/tmp/release/stuff + MOC_DIR = $$PWD/tmp/release/stuff + UI_DIR = $$PWD/tmp/release/stuff + RCC_DIR = $$PWD/tmp/release/stuff +} diff --git a/JAERO/aerol.cpp b/JAERO/aerol.cpp index 646a93f..0cf6c09 100644 --- a/JAERO/aerol.cpp +++ b/JAERO/aerol.cpp @@ -1407,8 +1407,6 @@ QByteArray &AeroL::Decode(QVector &bits, bool soft)//0 bit --> oldest bit uchar SEQINDICATOR=((byte1&0xF0)>>4); uchar SUTYPE=byte1&0x0F; - uchar QNO=((byte2&0xF0)>>4); - uchar REFNO=byte2&0x07; quint32 AESID=byte3<<8*2|byte4<<8*1|byte5<<8*0; int GES=byte6; @@ -1446,8 +1444,6 @@ QByteArray &AeroL::Decode(QVector &bits, bool soft)//0 bit --> oldest bit int BytesInSU=0; if((SUTYPE>=1)&&(SUTYPE<=11))BytesInSU=SUTYPE; - bool SignalingInfoSU=false; - if(SUTYPE==15)SignalingInfoSU=true; decline+=((QString)" SU %1 of %2. AES: %3 GES: %4").arg(SUindex+1).arg(SUTotal).arg((((QString)"%1").arg(AESID,6, 16, QChar('0'))).toUpper()).arg((((QString)"%1").arg(GES,2, 16, QChar('0'))).toUpper()) ; /*decline+=" \""; @@ -1735,6 +1731,10 @@ QByteArray &AeroL::Decode(QVector &bits, bool soft)//0 bit --> oldest bit break; case Log_on_confirm: decline+="Log_on_confirm"; + + { + SendLogOnOff(k, "Log on confirm"); + } break; case Log_control_P_channel_log_off_request: decline+="Log_control_P_channel_log_off_request"; @@ -2166,9 +2166,21 @@ void AeroL::SendCAssignment(int k, QString decline) QString beam = " Global Beam "; if(byte7&0x80)beam=" Spot Beam "; + item.message = "Receive Freq: " + receive + beam + "Transmit " + transmit + "\r\n" + decline; + emit ACARSsignal(item); +} +void AeroL::SendLogOnOff(int k, QString text) +{ + ACARSItem item; + item.isuitem.AESID=((uchar)infofield[k*12-1+2])<<8*2|((uchar)infofield[k*12-1+3])<<8*1|((uchar)infofield[k*12-1+4])<<8*0; + item.isuitem.GESID=infofield[k*12-1+5]; + item.hastext = true; + item.downlink = true; + item.nonacars = true; + item.valid = true; - item.message = "Receive Freq: " + receive + beam + "Transmit " + transmit + "\r\n" + decline; + item.message = text; emit ACARSsignal(item); } @@ -2182,6 +2194,8 @@ QByteArray &AeroL::DecodeC(QVector &bits) quint16 bit=0; quint16 soft_bit=0; + QString hex = "000000"; + for(int i=0;i &bits) decline+=" GES = "+infofield.mid(4,1).toHex().toUpper(); decline+=" Call_progress \r\n"; emit Call_progress_Signal(infofield); + + QString thex = infofield.mid(1,3).toHex().toUpper(); + + if(thex.length() == 6) + { + hex = thex; + } + } break; @@ -2457,13 +2479,15 @@ QByteArray &AeroL::DecodeC(QVector &bits) } } + // send for external decoding + emit Voicesignal(data, hex); + //25 primary fields. this is where the audio lives in a compressed format for(int i=0;i<25;i++) { - emit Voicesignal(data.mid(i*12,12));//send one frame at a time + emit Voicesignal(data.mid(i*12,12));//send one frame at a time } - // reset for next block index = -1; }// end of frame diff --git a/JAERO/aerol.h b/JAERO/aerol.h index 34277f9..c90963b 100644 --- a/JAERO/aerol.h +++ b/JAERO/aerol.h @@ -397,26 +397,47 @@ class AeroLScrambler public: AeroLScrambler() { - reset(); - } - void reset() - { + QVector state; + position=0; + pre_state.resize(5000); int tmp[]={1,1,0,1,0,0,1,0,1,0,1,1,0,0,1,-1}; state.clear(); for(int i=0;tmp[i]>=0;i++)state.push_back(tmp[i]); + + + // populate the vector so we can reuse it + for(int a = 0; a<5000;a++) + { + + int val0 = state.at(0)^state.at(14); + pre_state[a]=val0; + for(int i=state.size()-1;i>0;i--) + { + state[i]=state.at(i-1); + } + state[0] =val0; + + } } + void update(QVector &data) { for(int j=0;j0;i--)state[i]=state.at(i-1); - state[0]=val0; + data[j] = data.at(j)^pre_state.at(position); + position++; } + + } + void reset() + { + + position = 0; } private: - QVector state; + + QVector pre_state; + int position; }; class PuncturedCode @@ -626,7 +647,7 @@ class RTChannelDeleaveFECScram bool cont = false; - if((((blockptr-(64*5))%(64*3))==0) && (blockptr /64 == 5 || blockptr /64 == targetBlocks || blockptr/64 == 8 || blockptr/64 == 50)) + if((((blockptr-(64*5))%(64*3))==0) && (blockptr /64 == 5 || blockptr /64 == targetBlocks || blockptr/64 == 11 || blockptr/64 == 50)) { cont = true; } @@ -666,6 +687,10 @@ class RTChannelDeleaveFECScram lastpacketstate=OK_R_Packet; return OK_R_Packet; + }else{ + + return Nothing; + } } @@ -682,11 +707,7 @@ class RTChannelDeleaveFECScram else { - if(blockptr/64 ==5){ - return Nothing; - } - - if(blockptr/64 == 8){ + if(blockptr/64 == 11){ // we should be able to peek at the SU after the initial SU and figure out the number of SU's in this // burst @@ -703,7 +724,7 @@ class RTChannelDeleaveFECScram } - targetBlocks = (targetSUSize*3) +2; + targetBlocks = ((targetSUSize+1)*3) +2; return Nothing; } @@ -711,7 +732,7 @@ class RTChannelDeleaveFECScram // this should be the target blocks for this T packet if(blockptr/64 == targetBlocks) { - for(int i=0;i &bits, bool soft = false); QByteArray &DecodeC(QVector &bits); diff --git a/JAERO/audioburstmskdemodulator.cpp b/JAERO/audioburstmskdemodulator.cpp index 01e8566..eecd4a5 100644 --- a/JAERO/audioburstmskdemodulator.cpp +++ b/JAERO/audioburstmskdemodulator.cpp @@ -12,12 +12,19 @@ AudioBurstMskDemodulator::AudioBurstMskDemodulator(QObject *parent) void AudioBurstMskDemodulator::start() { BurstMskDemodulator::start(); + if(!settings.zmqAudio) + { if(m_audioInput)m_audioInput->start(this); } +} void AudioBurstMskDemodulator::stop() { + if(!settings.zmqAudio) + { if(m_audioInput)m_audioInput->stop(); + + } BurstMskDemodulator::stop(); } diff --git a/JAERO/audioburstoqpskdemodulator.cpp b/JAERO/audioburstoqpskdemodulator.cpp index 789650f..11b1614 100644 --- a/JAERO/audioburstoqpskdemodulator.cpp +++ b/JAERO/audioburstoqpskdemodulator.cpp @@ -15,13 +15,20 @@ void AudioBurstOqpskDemodulator::start() { BurstOqpskDemodulator::start(); demod2->start(); + if(!settings.zmqAudio) + { if(m_audioInput)m_audioInput->start(this); } +} void AudioBurstOqpskDemodulator::stop() { if(m_audioInput)m_audioInput->stop(); + if(!settings.zmqAudio) + { + BurstOqpskDemodulator::stop(); + } demod2->stop(); } diff --git a/JAERO/audiomskdemodulator.cpp b/JAERO/audiomskdemodulator.cpp index ba19a28..46bb98f 100644 --- a/JAERO/audiomskdemodulator.cpp +++ b/JAERO/audiomskdemodulator.cpp @@ -12,12 +12,19 @@ AudioMskDemodulator::AudioMskDemodulator(QObject *parent) void AudioMskDemodulator::start() { MskDemodulator::start(); + if(!settings.zmqAudio) + { if(m_audioInput)m_audioInput->start(this); } +} void AudioMskDemodulator::stop() { + if(!settings.zmqAudio) + { if(m_audioInput)m_audioInput->stop(); + + } MskDemodulator::stop(); } diff --git a/JAERO/audiooqpskdemodulator.cpp b/JAERO/audiooqpskdemodulator.cpp index 54645d0..eb06ef7 100644 --- a/JAERO/audiooqpskdemodulator.cpp +++ b/JAERO/audiooqpskdemodulator.cpp @@ -12,12 +12,21 @@ AudioOqpskDemodulator::AudioOqpskDemodulator(QObject *parent) void AudioOqpskDemodulator::start() { OqpskDemodulator::start(); + + if(!settings.zmqAudio) + { if(m_audioInput)m_audioInput->start(this); } +} + void AudioOqpskDemodulator::stop() { + if(!settings.zmqAudio) + { if(m_audioInput)m_audioInput->stop(); + + } OqpskDemodulator::stop(); } diff --git a/JAERO/audioreceiver.cpp b/JAERO/audioreceiver.cpp new file mode 100644 index 0000000..c4dba77 --- /dev/null +++ b/JAERO/audioreceiver.cpp @@ -0,0 +1,56 @@ +#include "audioreceiver.h" +#include "QDebug" +#include +#include "QDataStream" +#include "QDateTime" + + +void AudioReceiver::process() +{ + running = true; + // allocate enough for 96Khz sampling with 1 buffer per second + int recsize = 192000; + context = zmq_ctx_new(); + subscriber = zmq_socket(context, ZMQ_SUB); + + zmqStatus = zmq_connect(subscriber, _address.toStdString().c_str()); + zmq_setsockopt(subscriber, ZMQ_SUBSCRIBE, _topic.toStdString().c_str(), 5); + + char buf [recsize]; + char topic[20]; + + while(running){ + + + zmq_recv(subscriber, topic, 20, 0); + int received = zmq_recv(subscriber, buf, recsize, ZMQ_DONTWAIT); + + QByteArray qdata(buf, received); + + emit recAudio(qdata); + } + + zmq_disconnect(subscriber,_address.toStdString().c_str()); + zmq_ctx_destroy (context); + + emit finished(); + +} + + +AudioReceiver::AudioReceiver(QString address, QString topic){ + _address = address; + _topic = topic; +} + +void AudioReceiver::setParameters(QString address, QString topic){ + _address = address; + _topic = topic; +} + +void AudioReceiver::ZMQaudioStop() +{ + +running = false; + +} diff --git a/JAERO/audioreceiver.h b/JAERO/audioreceiver.h new file mode 100644 index 0000000..d53a9cd --- /dev/null +++ b/JAERO/audioreceiver.h @@ -0,0 +1,55 @@ +#ifndef AUDIORECEIVER_H +#define AUDIORECEIVER_H + + +#include "audioreceiver.h" + +#include +#include +#include +#include + + +class AudioReceiver : public QObject +{ + Q_OBJECT + +public: + + AudioReceiver(QString address, QString topic); + void setParameters(QString address, QString topic); + + bool running; + + +public slots: + + void process(); + void ZMQaudioStop(); + +signals: + + void finished(); + + +private: + + void* context; + void* subscriber; + + int zmqStatus; + + QString _address; + QString _topic; + int _rate; + + + + + +signals: + void recAudio(const QByteArray & audio); + +}; + +#endif // AUDIORECEIVER_H diff --git a/JAERO/burstmskdemodulator.cpp b/JAERO/burstmskdemodulator.cpp index 060b44e..2b739e7 100644 --- a/JAERO/burstmskdemodulator.cpp +++ b/JAERO/burstmskdemodulator.cpp @@ -127,7 +127,10 @@ void BurstMskDemodulator::setSQL(bool state) { sql=state; } - +void BurstMskDemodulator::setCPUReduce(bool state) +{ + cpuReduce=state; +} void BurstMskDemodulator::setScatterPointType(ScatterPointType type) { scatterpointtype=type; @@ -395,7 +398,8 @@ qint64 BurstMskDemodulator::writeData(const char *data, qint64 len) if(fabs(dval)>maxval)maxval=fabs(dval); spectrumcycbuff[spectrumcycbuff_ptr]=dval; spectrumcycbuff_ptr++;spectrumcycbuff_ptr%=spectrumnfft; - if(timer.elapsed()>150) + //if(timer.elapsed()>150) + if((!cpuReduce && timer.elapsed()>150) || (cpuReduce && timer.elapsed()>1000)) { timer.start(); emit OrgOverlapedBuffer(spectrumcycbuff); @@ -592,6 +596,9 @@ qint64 BurstMskDemodulator::writeData(const char *data, qint64 len) } + if(startstop > 0 || mse < signalthreshold) + { + cval= mixer2.WTCISValue()*(val_to_demod)*vol_gain; cpx_type sig2 = cpx_type(matchedfilter_re->FIRUpdateAndProcess(cval.real()),matchedfilter_im->FIRUpdateAndProcess(cval.imag())); @@ -738,6 +745,8 @@ qint64 BurstMskDemodulator::writeData(const char *data, qint64 len) mixer2.WTnextFrame(); mixer_center.WTnextFrame(); + + } } return len; @@ -750,3 +759,9 @@ void BurstMskDemodulator::DCDstatSlot(bool _dcd) dcd=_dcd; } +void BurstMskDemodulator::dataReceived(const QByteArray &audio) +{ + + writeData(audio, audio.length()); + +} diff --git a/JAERO/burstmskdemodulator.h b/JAERO/burstmskdemodulator.h index cf74586..f4dd064 100644 --- a/JAERO/burstmskdemodulator.h +++ b/JAERO/burstmskdemodulator.h @@ -33,6 +33,7 @@ class BurstMskDemodulator : public QIODevice double Fs; int symbolspercycle; double signalthreshold; + bool zmqAudio; Settings() { coarsefreqest_fft_power=13;//2^coarsefreqest_fft_power @@ -42,6 +43,7 @@ class BurstMskDemodulator : public QIODevice Fs=8000;//Hz symbolspercycle=16; signalthreshold=0.6; + zmqAudio=false; } }; explicit BurstMskDemodulator(QObject *parent); @@ -58,6 +60,7 @@ class BurstMskDemodulator : public QIODevice void invalidatesettings(); void setAFC(bool state); void setSQL(bool state); + void setCPUReduce(bool state); void setScatterPointType(ScatterPointType type); double getCurrentFreq(); private: @@ -188,6 +191,7 @@ class BurstMskDemodulator : public QIODevice DelayThing delayedsmpl; + bool cpuReduce; signals: void ScatterPoints(const QVector &buffer); @@ -209,6 +213,8 @@ class BurstMskDemodulator : public QIODevice public slots: void CenterFreqChangedSlot(double freq_center); void DCDstatSlot(bool dcd); + void dataReceived(const QByteArray &audio); + }; diff --git a/JAERO/burstoqpskdemodulator.cpp b/JAERO/burstoqpskdemodulator.cpp index d585011..2d3a82e 100644 --- a/JAERO/burstoqpskdemodulator.cpp +++ b/JAERO/burstoqpskdemodulator.cpp @@ -172,6 +172,12 @@ void BurstOqpskDemodulator::setSQL(bool state) sql=state; } +void BurstOqpskDemodulator::setCPUReduce(bool state) +{ + cpuReduce=state; + +} + void BurstOqpskDemodulator::setScatterPointType(ScatterPointType type) { scatterpointtype=type; @@ -297,6 +303,12 @@ qint64 BurstOqpskDemodulator::writeData(const char *data, qint64 len) return len; } +void BurstOqpskDemodulator::dataReceived(const QByteArray &audio) +{ + + writeData(audio, audio.length()); + +} void BurstOqpskDemodulator::writeDataSlot(const char *data, qint64 len) { @@ -342,7 +354,9 @@ void BurstOqpskDemodulator::writeDataSlot(const char *data, qint64 len) if(fabs(dval)>maxval)maxval=fabs(dval); spectrumcycbuff[spectrumcycbuff_ptr]=dval; spectrumcycbuff_ptr++;spectrumcycbuff_ptr%=spectrumnfft; - if(timer.elapsed()>150) + + if((!cpuReduce && timer.elapsed()>150) || (cpuReduce && timer.elapsed()>1000)) + { sendscatterpoints=true; timer.start(); @@ -518,8 +532,6 @@ void BurstOqpskDemodulator::writeDataSlot(const char *data, qint64 len) if(startstop==0) { startstop--; - // qDebug()<<"stop"; - emit SignalStatus(false); } @@ -561,14 +573,16 @@ void BurstOqpskDemodulator::writeDataSlot(const char *data, qint64 len) rotator=rotator*std::exp(imag*rotator_freq); sig2*=rotator; + double sig2abs = std::abs(sig2); + //Measure ebno - ebnomeasure->Update(std::abs(sig2)); + ebnomeasure->Update(sig2abs); //send ebno when right time if(fabs(cntr-((128.0+128.0+128.0)*SamplesPerSymbol))<0.5)emit EbNoMeasurmentSignal(ebnomeasure->EbNo); //AGC - sig2*=agc2->Update(std::abs(sig2)); + sig2*=agc2->Update(sig2abs); //clipping double abval=std::abs(sig2); @@ -683,7 +697,7 @@ void BurstOqpskDemodulator::writeDataSlot(const char *data, qint64 len) } - //if(startstop>0)//if signal then may as well demodulate + if(startstop>0)//if signal then may as well demodulate { @@ -732,3 +746,4 @@ void BurstOqpskDemodulator::writeDataSlot(const char *data, qint64 len) return; } + diff --git a/JAERO/burstoqpskdemodulator.h b/JAERO/burstoqpskdemodulator.h index ab9a324..b808340 100644 --- a/JAERO/burstoqpskdemodulator.h +++ b/JAERO/burstoqpskdemodulator.h @@ -30,6 +30,7 @@ class BurstOqpskDemodulator : public QIODevice double Fs; double signalthreshold; bool channel_stereo; + bool zmqAudio; Settings() { coarsefreqest_fft_power=13;//2^coarsefreqest_fft_power @@ -39,12 +40,14 @@ class BurstOqpskDemodulator : public QIODevice Fs=48000;//Hz signalthreshold=0.6; channel_stereo=false; + zmqAudio=false; } }; explicit BurstOqpskDemodulator(QObject *parent); ~BurstOqpskDemodulator(); void setAFC(bool state); void setSQL(bool state); + void setCPUReduce(bool state); void setSettings(Settings settings); void invalidatesettings(); void ConnectSinkDevice(QIODevice *datasinkdevice); @@ -58,6 +61,8 @@ class BurstOqpskDemodulator : public QIODevice //--L/R channel selection bool channel_select_other; + + static int sample; // signals: @@ -213,9 +218,15 @@ class BurstOqpskDemodulator : public QIODevice bool channel_stereo; + bool cpuReduce; + + + public slots: void CenterFreqChangedSlot(double freq_center); void writeDataSlot(const char *data, qint64 len); + void dataReceived(const QByteArray &audio); + }; diff --git a/JAERO/debug/UsersjeroenAppDataLocalTemptmp1_94dcea b/JAERO/debug/UsersjeroenAppDataLocalTemptmp1_94dcea new file mode 100644 index 0000000..e69de29 diff --git a/JAERO/debug/UsersjeroenAppDataLocalTemptmp1yxsa67p b/JAERO/debug/UsersjeroenAppDataLocalTemptmp1yxsa67p new file mode 100644 index 0000000..e69de29 diff --git a/JAERO/debug/UsersjeroenAppDataLocalTemptmpgie733gt b/JAERO/debug/UsersjeroenAppDataLocalTemptmpgie733gt new file mode 100644 index 0000000..e69de29 diff --git a/JAERO/debug/UsersjeroenAppDataLocalTemptmpkz73g8jc b/JAERO/debug/UsersjeroenAppDataLocalTemptmpkz73g8jc new file mode 100644 index 0000000..e69de29 diff --git a/JAERO/gui_classes/settingsdialog.cpp b/JAERO/gui_classes/settingsdialog.cpp index e705d09..c6afab7 100644 --- a/JAERO/gui_classes/settingsdialog.cpp +++ b/JAERO/gui_classes/settingsdialog.cpp @@ -118,6 +118,16 @@ void SettingsDialog::poulatepublicvars() ui->checkTCPAsClient->setEnabled(ui->checkOutputADSMessageToTCP->isChecked()); + localAudioOutEnabled=ui->ambeEnabled->isChecked(); + zmqAudioOutEnabled=ui->remoteAmbeEnabled->isChecked(); + zmqAudioOutBind=ui->lineEditZMQBind->text(); + zmqAudioOutTopic=ui->lineEditZMQBindTopic->text(); + + zmqAudioInputAddress = ui->lineEditZmqConnectAddress->text(); + zmqAudioInputTopic = ui->lineEditZmqTopic->text(); + zmqAudioInputEnabled = ui->checkBoxZMQ->isChecked(); + + } @@ -147,8 +157,27 @@ void SettingsDialog::populatesettings() ui->checkOutputADSMessageToTCP->setChecked(settings.value("checkOutputADSMessageToTCP",false).toBool()); ui->checkTCPAsClient->setChecked(settings.value("checkTCPAsClient",false).toBool()); -//these have been tested so far as lineEditplanelookup -//http://www.flightradar24.com/data/airplanes/{REG} + + ui->ambeEnabled->setChecked(settings.value("localAudioOutEnabled", true).toBool()); + ui->remoteAmbeEnabled->setChecked(settings.value("remoteAudioOutEnabled", false).toBool()); + + + if(!ui->remoteAmbeEnabled->isChecked()) + { + ui->lineEditZMQBind->setEnabled(false); + ui->lineEditZMQBindTopic->setEnabled(false); + + } + ui->lineEditZMQBind->setText(settings.value("remoteAudioOutBindAddress", "tcp://*:5551").toString()); + ui->lineEditZMQBindTopic->setText(settings.value("remoteAudioOutBindTopic", "JAERO").toString()); + + ui->checkBoxZMQ->setChecked(settings.value("zmqAudioInputEnabled", true).toBool()); + ui->lineEditZmqConnectAddress->setText(settings.value("zmqAudioInputReceiveAddress", "tcp://127.0.0.1:6003").toString()); + + + QString default_topic = settings_name.remove(QRegExp( "JAERO \\[" )).remove(QRegExp( "\\]" )); + + ui->lineEditZmqTopic->setText(settings.value("zmqAudioInputReceiveTopic", default_topic).toString()); on_lineEditlogdir_editingFinished(); @@ -176,6 +205,16 @@ void SettingsDialog::accept() settings.setValue("checkOutputADSMessageToTCP", ui->checkOutputADSMessageToTCP->isChecked()); settings.setValue("checkTCPAsClient", ui->checkTCPAsClient->isChecked()); + settings.setValue("localAudioOutEnabled", ui->ambeEnabled->isChecked()); + settings.setValue("remoteAudioOutEnabled", ui->remoteAmbeEnabled->isChecked()); + settings.setValue("remoteAudioOutBindAddress",ui->lineEditZMQBind->text()); + settings.setValue("remoteAudioOutBindTopic",ui->lineEditZMQBindTopic->text()); + + + settings.setValue("zmqAudioInputEnabled", ui->checkBoxZMQ->isChecked()); + settings.setValue("zmqAudioInputReceiveAddress", ui->lineEditZmqConnectAddress->text()); + settings.setValue("zmqAudioInputReceiveTopic", ui->lineEditZmqTopic->text()); + poulatepublicvars(); QDialog::accept(); } diff --git a/JAERO/gui_classes/settingsdialog.cpp.bak b/JAERO/gui_classes/settingsdialog.cpp.bak new file mode 100644 index 0000000..2285c41 --- /dev/null +++ b/JAERO/gui_classes/settingsdialog.cpp.bak @@ -0,0 +1,227 @@ +#include "settingsdialog.h" +#include "ui_settingsdialog.h" +#include +#include +#include +#include +#include +#include +#include +#include "../databasetext.h" + +QString settings_name=""; + +SettingsDialog::SettingsDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::SettingsDialog) +{ + ui->setupUi(this); + populatesettings(); +} + +SettingsDialog::~SettingsDialog() +{ + delete ui; +} + +void SettingsDialog::poulatepublicvars() +{ + + msgdisplayformat=ui->comboBoxDisplayformat->currentText(); + dropnontextmsgs=ui->checkBoxdropnontextmsgs->isChecked(); + donotdisplaysus.clear(); + QRegExp rx("([\\da-fA-F]+)"); + int pos = 0; + while ((pos = rx.indexIn(ui->lineEditdonotdisplaysus->text(), pos)) != -1) + { + bool ok = false; + uint value = rx.cap(1).toUInt(&ok,16); + if(ok)donotdisplaysus.push_back(value); + pos += rx.matchedLength(); + } + + audioinputdevice=QAudioDeviceInfo::defaultInputDevice(); + foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioInput)) + { + if(deviceInfo.deviceName()==ui->comboBoxsoundcard->currentText()) + { + audioinputdevice=deviceInfo; + break; + } + } + + loggingdirectory=ui->lineEditlogdir->text(); + loggingenable=ui->checkBoxlogenable->isChecked(); + widebandwidthenable=ui->checkBoxlogwidebandwidthenable->isChecked(); + + planesfolder=ui->lineEditplanesfolder->text(); + planelookup=ui->lineEditplanelookup->text(); + + beepontextmessage=ui->checkBoxbeepontextmessage->isChecked(); + + //bottom text window output settings + QStringList hosts=ui->lineEditudpoutputdecodedmessagesaddress->text().simplified().split(" "); + udp_for_decoded_messages_address.clear(); + udp_for_decoded_messages_port.clear(); + for(int i=0;icheckOutputDecodedMessageToUDPPort->isChecked(); + + + //ads message output using SBS1 protocol over TCP + QString hostaddr=ui->lineEdittcpoutputadsmessagesaddress->text().section(':',0,0); + if(!tcp_for_ads_messages_address.setAddress(hostaddr)) + { + QString tstr=ui->lineEdittcpoutputadsmessagesaddress->text().section(':',1,1); + ui->lineEdittcpoutputadsmessagesaddress->setText("0.0.0.0:"+tstr); + tcp_for_ads_messages_address.clear(); + QSettings settings("Jontisoft", settings_name); + settings.setValue("lineEdittcpoutputadsmessagesaddress", "0.0.0.0:"+tstr); + qDebug()<<"Can't set TCP address reverting to 0.0.0.0"; + } + tcp_for_ads_messages_port=ui->lineEdittcpoutputadsmessagesaddress->text().section(':',1,1).toInt(); + if(tcp_for_ads_messages_port==0) + { + qDebug()<<"Can't set TCP port reverting to 30003"; + ui->lineEdittcpoutputadsmessagesaddress->setText(hostaddr+":30003"); + QSettings settings("Jontisoft", settings_name); + settings.setValue("lineEdittcpoutputadsmessagesaddress", hostaddr+":30003"); + tcp_for_ads_messages_port=30003; + } + tcp_for_ads_messages_enabled=ui->checkOutputADSMessageToTCP->isChecked(); + tcp_as_client_enabled=ui->checkTCPAsClient->isChecked(); + + ui->checkTCPAsClient->setEnabled(ui->checkOutputADSMessageToTCP->isChecked()); + + localAudioOutEnabled=ui->ambeEnabled->isChecked(); + zmqAudioOutEnabled=ui->remoteAmbeEnabled->isChecked(); + zmqAudioOutBind=ui->lineEditZMQBind->text(); + zmqAudioOutTopic=ui->lineEditZMQBindTopic->text(); + + zmqAudioInputAddress = ui->lineEditZmqConnectAddress->text(); + zmqAudioInputTopic = ui->lineEditZmqTopic->text(); + zmqAudioInputEnabled = ui->checkBoxZMQ->isChecked(); + + +} + + +void SettingsDialog::populatesettings() +{ + + //populate soundcard + ui->comboBoxsoundcard->clear(); + foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioInput)) + ui->comboBoxsoundcard->addItem(deviceInfo.deviceName()); + + //load settings + QSettings settings("Jontisoft", settings_name); + ui->comboBoxDisplayformat->setCurrentIndex(settings.value("comboBoxDisplayformat",2).toInt()); + ui->lineEditdonotdisplaysus->setText(settings.value("lineEditdonotdisplaysus","26 0A C0 00 14 16").toString()); + ui->checkBoxdropnontextmsgs->setChecked(settings.value("checkBoxdropnontextmsgs",true).toBool()); + ui->comboBoxsoundcard->setCurrentText(settings.value("comboBoxsoundcard","").toString()); + ui->lineEditlogdir->setText(settings.value("lineEditlogdir",QStandardPaths::standardLocations(APPDATALOCATIONS)[0]+"/logs").toString()); + ui->checkBoxlogenable->setChecked(settings.value("checkBoxlogenable",false).toBool()); + ui->checkBoxlogwidebandwidthenable->setChecked(settings.value("checkBoxlogwidebandwidthenable",false).toBool()); + ui->lineEditplanesfolder->setText(settings.value("lineEditplanesfolder",QStandardPaths::standardLocations(APPDATALOCATIONS)[0]+"/planes").toString()); + ui->lineEditplanelookup->setText(settings.value("lineEditplanelookup","http://www.flightradar24.com/data/airplanes/{REG}").toString()); + ui->checkBoxbeepontextmessage->setChecked(settings.value("checkBoxbeepontextmessage",true).toBool()); + ui->lineEditudpoutputdecodedmessagesaddress->setText(settings.value("lineEditudpoutputdecodedmessagesaddress","localhost:18765").toString()); + ui->checkOutputDecodedMessageToUDPPort->setChecked(settings.value("checkOutputDecodedMessageToUDPPort",false).toBool()); + ui->lineEdittcpoutputadsmessagesaddress->setText(settings.value("lineEdittcpoutputadsmessagesaddress","0.0.0.0:30003").toString()); + ui->checkOutputADSMessageToTCP->setChecked(settings.value("checkOutputADSMessageToTCP",false).toBool()); + ui->checkTCPAsClient->setChecked(settings.value("checkTCPAsClient",false).toBool()); + ui->lineEditZMQBind->setText(settings.value("lineZMQBindAddress", "tcp://*:5551").toString()); + ui->ambeEnabled->setChecked(settings.value("ambeEnabled", true).toBool()); + + ui->checkBoxZMQ->setChecked(settings.value("zmqAudioEnabled", true).toBool()); + ui->lineEditZmqConnectAddress->setText(settings.value("zmqAudioReceiveAddress", "tcp://127.0.0.1:6003").toString()); + + QString default_topic = settings_name; + + default_topic = settings_name.remove(QRegExp( "JAERO \\[" )).remove(QRegExp( "\\]" )); + + ui->lineEditZmqTopic->setText(settings.value("zmqAudioReceiveTopic", default_topic).toString()); +//these have been tested so far as lineEditplanelookup +//http://www.flightradar24.com/data/airplanes/{REG} + + on_lineEditlogdir_editingFinished(); + + poulatepublicvars(); +} + +void SettingsDialog::accept() +{ + + //save settings + QSettings settings("Jontisoft", settings_name); + settings.setValue("comboBoxDisplayformat", ui->comboBoxDisplayformat->currentIndex()); + settings.setValue("lineEditdonotdisplaysus", ui->lineEditdonotdisplaysus->text()); + settings.setValue("checkBoxdropnontextmsgs", ui->checkBoxdropnontextmsgs->isChecked()); + settings.setValue("comboBoxsoundcard", ui->comboBoxsoundcard->currentText()); + settings.setValue("lineEditlogdir", ui->lineEditlogdir->text()); + settings.setValue("checkBoxlogenable", ui->checkBoxlogenable->isChecked()); + settings.setValue("checkBoxlogwidebandwidthenable", ui->checkBoxlogwidebandwidthenable->isChecked()); + settings.setValue("lineEditplanesfolder", ui->lineEditplanesfolder->text()); + settings.setValue("lineEditplanelookup", ui->lineEditplanelookup->text()); + settings.setValue("checkBoxbeepontextmessage", ui->checkBoxbeepontextmessage->isChecked()); + settings.setValue("lineEditudpoutputdecodedmessagesaddress", ui->lineEditudpoutputdecodedmessagesaddress->text()); + settings.setValue("checkOutputDecodedMessageToUDPPort", ui->checkOutputDecodedMessageToUDPPort->isChecked()); + settings.setValue("lineEdittcpoutputadsmessagesaddress", ui->lineEdittcpoutputadsmessagesaddress->text()); + settings.setValue("checkOutputADSMessageToTCP", ui->checkOutputADSMessageToTCP->isChecked()); + settings.setValue("checkTCPAsClient", ui->checkTCPAsClient->isChecked()); + settings.setValue("lineZMQBindAddress",ui->lineEditZMQBind->text()); + settings.setValue("ambeEnabled", ui->ambeEnabled->isChecked()); + + settings.setValue("zmqAudioEnabled", ui->checkBoxZMQ->isChecked()); + settings.setValue("zmqAudioReceiveAddress", ui->lineEditZmqConnectAddress->text()); + settings.setValue("zmqAudioReceiveTopic", ui->lineEditZmqTopic->text()); + + + poulatepublicvars(); + QDialog::accept(); +} + + +void SettingsDialog::on_lineEditlogdir_editingFinished() +{ + QFile file(ui->lineEditlogdir->text()); + ui->lineEditlogdir->setText(file.fileName()); +} + +void SettingsDialog::on_lineEditplanesfolder_editingFinished() +{ + QFile file(ui->lineEditplanesfolder->text()); + ui->lineEditplanesfolder->setText(file.fileName()); +} + +void SettingsDialog::on_checkOutputADSMessageToTCP_stateChanged(int arg1) +{ + if(!arg1)ui->checkTCPAsClient->setEnabled(false); + else ui->checkTCPAsClient->setEnabled(true); +} diff --git a/JAERO/gui_classes/settingsdialog.h b/JAERO/gui_classes/settingsdialog.h index a4dcd21..177417f 100644 --- a/JAERO/gui_classes/settingsdialog.h +++ b/JAERO/gui_classes/settingsdialog.h @@ -51,6 +51,21 @@ class SettingsDialog : public QDialog bool tcp_for_ads_messages_enabled; bool tcp_as_client_enabled; + + bool cpuSaveMode; + bool disableAcarsConsole; + + bool localAudioOutEnabled; + bool zmqAudioOutEnabled; + QString zmqAudioOutBind; + QString zmqAudioOutTopic; + + bool zmqAudioInputEnabled; + QString zmqAudioInputAddress; + QString zmqAudioInputTopic; + + + private: Ui::SettingsDialog *ui; void poulatepublicvars(); diff --git a/JAERO/gui_classes/settingsdialog.h.bak b/JAERO/gui_classes/settingsdialog.h.bak new file mode 100644 index 0000000..86a2487 --- /dev/null +++ b/JAERO/gui_classes/settingsdialog.h.bak @@ -0,0 +1,78 @@ +#ifndef SETTINGSDIALOG_H +#define SETTINGSDIALOG_H + +#include +#include + +#if defined(Q_OS_UNIX) || defined(Q_OS_LUNX) +#define APPDATALOCATIONS QStandardPaths::AppDataLocation +#else +#define APPDATALOCATIONS QStandardPaths::AppLocalDataLocation +#endif + +#include +#include +#include + +extern QString settings_name; + +namespace Ui { +class SettingsDialog; +} + +class SettingsDialog : public QDialog +{ + Q_OBJECT + +public: + explicit SettingsDialog(QWidget *parent = 0); + ~SettingsDialog(); + void populatesettings(); + + QAudioDeviceInfo audioinputdevice; + QVector donotdisplaysus; + bool dropnontextmsgs; + QString msgdisplayformat; + bool loggingenable; + QString loggingdirectory; + bool widebandwidthenable; + + QString planesfolder; + QString planelookup; + bool beepontextmessage; + + QList udp_for_decoded_messages_address; + QList udp_for_decoded_messages_port; + bool udp_for_decoded_messages_enabled; + + + QHostAddress tcp_for_ads_messages_address; + quint16 tcp_for_ads_messages_port; + bool tcp_for_ads_messages_enabled; + bool tcp_as_client_enabled; + + bool ambeEnabled; + QString zmqBind; + bool cpuSaveMode; + bool disableAcarsConsole; + + QString zmqAudioAddress; + QString zmqAudioTopic; + bool zmqAudioEnabled; + + +private: + Ui::SettingsDialog *ui; + void poulatepublicvars(); + +protected: + void accept(); + +private slots: + + void on_lineEditlogdir_editingFinished(); + void on_lineEditplanesfolder_editingFinished(); + void on_checkOutputADSMessageToTCP_stateChanged(int arg1); +}; + +#endif // SETTINGSDIALOG_H diff --git a/JAERO/gui_classes/settingsdialog.ui b/JAERO/gui_classes/settingsdialog.ui index 973650d..01fa924 100644 --- a/JAERO/gui_classes/settingsdialog.ui +++ b/JAERO/gui_classes/settingsdialog.ui @@ -2,12 +2,15 @@ SettingsDialog + + Qt::NonModal + 0 0 - 451 - 665 + 453 + 753 @@ -19,13 +22,7 @@ 451 - 665 - - - - - 451 - 665 + 720 @@ -206,19 +203,19 @@ eg "localhost:12345 localhost:12346" 10 - 470 + 520 401 - 101 + 151 - Soundcard + Audio source 10 - 30 + 20 381 22 @@ -227,8 +224,8 @@ eg "localhost:12345 localhost:12346" - 20 - 67 + 10 + 120 321 19 @@ -237,6 +234,95 @@ eg "localhost:12345 localhost:12346" Enable widebandwidth (CPU intensive) + + + + 10 + 50 + 70 + 41 + + + + ZMQ Audio + + + + + + 190 + 60 + 201 + 20 + + + + + + + 120 + 60 + 51 + 25 + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + Address + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 130 + 90 + 31 + 25 + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + Topic + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 190 + 90 + 101 + 20 + + + @@ -308,7 +394,7 @@ eg "localhost:12345 localhost:12346" 10 390 401 - 71 + 121 @@ -443,6 +529,126 @@ eg "localhost:12345 localhost:12346" + + + + 8 + 0 + + + + Voice Settings + + + + + 10 + 20 + 401 + 191 + + + + Voice decoding + + + + + 20 + 110 + 101 + 16 + + + + Socket bind address + + + + + true + + + + 150 + 110 + 221 + 20 + + + + + 0 + 0 + + + + tcp://*:5550 + + + + + + 20 + 30 + 171 + 17 + + + + JAERO voice decoding + + + + + + 20 + 70 + 171 + 17 + + + + Remote voice decoding + + + + + + 20 + 150 + 47 + 13 + + + + Topic + + + + + true + + + + 150 + 150 + 91 + 20 + + + + + 0 + 0 + + + + JAERO + + + + @@ -497,5 +703,85 @@ eg "localhost:12345 localhost:12346" + + checkBoxZMQ + toggled(bool) + comboBoxsoundcard + setDisabled(bool) + + + 75 + 581 + + + 231 + 641 + + + + + checkBoxZMQ + toggled(bool) + lineEditZmqConnectAddress + setEnabled(bool) + + + 75 + 581 + + + 326 + 580 + + + + + checkBoxZMQ + toggled(bool) + lineEditZmqTopic + setEnabled(bool) + + + 75 + 581 + + + 287 + 610 + + + + + remoteAmbeEnabled + toggled(bool) + lineEditZMQBind + setEnabled(bool) + + + 126 + 129 + + + 281 + 170 + + + + + remoteAmbeEnabled + toggled(bool) + lineEditZMQBindTopic + setEnabled(bool) + + + 126 + 129 + + + 216 + 210 + + + diff --git a/JAERO/gui_classes/settingsdialog.ui.bak b/JAERO/gui_classes/settingsdialog.ui.bak new file mode 100644 index 0000000..558c3c7 --- /dev/null +++ b/JAERO/gui_classes/settingsdialog.ui.bak @@ -0,0 +1,723 @@ + + + SettingsDialog + + + + 0 + 0 + 453 + 753 + + + + + 0 + 0 + + + + + 451 + 720 + + + + + 451 + 720 + + + + Settings + + + + + + true + + + 0 + + + + Decoding + + + + + 10 + 10 + 401 + 61 + + + + Do not display SU types + + + + + 10 + 26 + 381 + 21 + + + + 26 0A + + + + + + + 10 + 80 + 401 + 121 + + + + ACARS window + + + + + 160 + 27 + 201 + 19 + + + + Drop non text messages + + + + + + 25 + 25 + 48 + 25 + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + Format + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 80 + 27 + 38 + 21 + + + + + 40 + 16777215 + + + + 0 + + + + 1 + + + + + 2 + + + + + 3 + + + + + + + 20 + 60 + 301 + 19 + + + + Beep on multi line text message + + + + + + 20 + 90 + 131 + 19 + + + + Output to UDP + + + + + + 150 + 90 + 231 + 21 + + + + you can output to multiple destinations +by placing a space between destinations. +eg "localhost:12345 localhost:12346" + + + localhost:18765 + + + + + + + 20 + 520 + 401 + 151 + + + + Audio source + + + + + 10 + 80 + 381 + 22 + + + + + + + 10 + 120 + 321 + 19 + + + + Enable widebandwidth (CPU intensive) + + + + + + 10 + 10 + 70 + 41 + + + + ZMQ Audio + + + + + + 200 + 20 + 191 + 20 + + + + + + + 130 + 20 + 61 + 25 + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + Address + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 140 + 50 + 51 + 25 + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + Topic + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 200 + 50 + 113 + 20 + + + + + + + + 10 + 310 + 401 + 71 + + + + Logging + + + + + 100 + 30 + 201 + 21 + + + + + + + 320 + 30 + 71 + 19 + + + + Enable + + + + + + 10 + 26 + 81 + 25 + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + Directory + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 10 + 390 + 401 + 121 + + + + Images + + + + + 100 + 30 + 291 + 21 + + + + <html><head/><body><p>Plane images are stored as {AES}.png or {AES}.jpg in this folder. Additionally if a basestation.sqb database file is present JAERO will use this file for plane lookups.</p></body></html> + + + + + + 10 + 26 + 81 + 25 + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + Directory + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 10 + 210 + 401 + 91 + + + + ADS data output + + + + + 20 + 30 + 241 + 20 + + + + Enable BaseStation format + + + + + + 250 + 30 + 141 + 22 + + + + localhost:30003 + + + + + + 20 + 60 + 161 + 19 + + + + Behave as client + + + + + + + Log Window + + + + + 120 + 28 + 291 + 21 + + + + <html><head/><body><p>URL for plane lookup. {AES} is the plane ICAO number in hex and {REG} is the registration.</p></body></html> + + + http://junzisun.com/aif/?q={AES}# + + + + + + 10 + 30 + 101 + 16 + + + + Plane lookup + + + + + + + 8 + 0 + + + + Voice Settings + + + + + 10 + 20 + 401 + 91 + + + + ZeroMQ + + + + + 20 + 20 + 101 + 16 + + + + Socket bind address + + + + + true + + + + 150 + 20 + 221 + 20 + + + + + 0 + 0 + + + + tcp://*:5550 + + + + + + + 10 + 120 + 401 + 61 + + + + AMBE + + + + + 20 + 20 + 111 + 17 + + + + AMBE enabled + + + + + + + + + + Qt::LeftToRight + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + false + + + + + + + + + buttonBox + accepted() + SettingsDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + SettingsDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + checkBoxZMQ + toggled(bool) + comboBoxsoundcard + setDisabled(bool) + + + 75 + 581 + + + 231 + 641 + + + + + checkBoxZMQ + toggled(bool) + lineEditZmqConnectAddress + setEnabled(bool) + + + 75 + 581 + + + 326 + 580 + + + + + checkBoxZMQ + toggled(bool) + lineEditZmqTopic + setEnabled(bool) + + + 75 + 581 + + + 287 + 610 + + + + + diff --git a/JAERO/jconvolutionalcodec.cpp b/JAERO/jconvolutionalcodec.cpp index 1909cef..d51b81c 100644 --- a/JAERO/jconvolutionalcodec.cpp +++ b/JAERO/jconvolutionalcodec.cpp @@ -200,7 +200,7 @@ QVector &JConvolutionalCodec::Decode_Continuous(QByteArray& soft_bits_in)// return decoded_bits; } -//this is a bit of a hack just to compre soft with hard decoding. paddinglength must be a multiple of 8 + // unpack the re-encoded bytes QVector &JConvolutionalCodec::Decode_Continuous_hard(const QByteArray& soft_bits_in)//0-->-1 128-->0 255-->1 { int k=(2*nparitybits*paddinglength)/8;//msg is padded frount and back both times by paddinglength diff --git a/JAERO/main.cpp b/JAERO/main.cpp index 6035bf0..c2b7346 100644 --- a/JAERO/main.cpp +++ b/JAERO/main.cpp @@ -11,7 +11,7 @@ int main(int argc, char *argv[]) QApplication::setApplicationVersion("1.0.4.4"); QCommandLineParser cmdparser; - cmdparser.setApplicationDescription("Demodulatoe and decode Satcom ACARS"); + cmdparser.setApplicationDescription("Demodulate and decode Satcom ACARS"); cmdparser.addHelpOption(); cmdparser.addVersionOption(); diff --git a/JAERO/mainwindow.cpp b/JAERO/mainwindow.cpp index 09ac8fc..58eebd2 100644 --- a/JAERO/mainwindow.cpp +++ b/JAERO/mainwindow.cpp @@ -13,6 +13,9 @@ #endif #include "databasetext.h" +#include "zmq_utils.h" +#include "zmq.h" + MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), @@ -21,13 +24,17 @@ MainWindow::MainWindow(QWidget *parent) : ui->setupUi(this); - QTimer::singleShot(100, [this]() { setWindowTitle("JAERO "+QString(JAERO_VERSION)); } ); + // Nice with VFO name up on the title + //QTimer::singleShot(100, [this]() { setWindowTitle("JAERO "+QString(JAERO_VERSION)); } ); beep=new QSound(":/sounds/beep.wav",this); //plane logging window planelog = new PlaneLog; + //create areo decoder + pRecThrd = 0; + //create areo decoder aerol = new AeroL(this); //Create Aero sink aerol2 = new AeroL(this); //Create Aero sink @@ -122,9 +129,7 @@ MainWindow::MainWindow(QWidget *parent) : //connect(ambe,SIGNAL(decoded_signal(QByteArray)),this,SLOT(Voiceslot(QByteArray))); // an example connect(ambe,SIGNAL(decoded_signal(QByteArray)),compresseddiskwriter,SLOT(audioin(QByteArray))); connect(ambe,SIGNAL(decoded_signal(QByteArray)),audioout,SLOT(audioin(QByteArray))); - connect(aerol,SIGNAL(Voicesignal(QByteArray)),ambe,SLOT(to_decode_slot(QByteArray))); - // compresseddiskwriter->openFileForOutput("e:/delme.ogg"); //statusbar setup freqlabel = new QLabel(); @@ -190,6 +195,7 @@ MainWindow::MainWindow(QWidget *parent) : audiomskdemodulator->setSQL(false); audiomskdemodulator->setSettings(audiomskdemodulatorsettings); audiomskdemodulator->setCPUReduce(ui->actionReduce_CPU->isChecked()); + audiomskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; if(typeofdemodtouse==MSK)audiomskdemodulator->start(); //oqpsk @@ -198,6 +204,7 @@ MainWindow::MainWindow(QWidget *parent) : audiooqpskdemodulator->setSQL(false); audiooqpskdemodulator->setSettings(audiooqpskdemodulatorsettings); audiooqpskdemodulator->setCPUReduce(ui->actionReduce_CPU->isChecked()); + audiooqpskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; if(typeofdemodtouse==OQPSK)audiooqpskdemodulator->start(); //burstoqpsk @@ -205,6 +212,8 @@ MainWindow::MainWindow(QWidget *parent) : audioburstoqpskdemodulatorsettings.freq_center=tmpfreq; audioburstoqpskdemodulator->setSQL(false); audioburstoqpskdemodulator->setSettings(audioburstoqpskdemodulatorsettings); + audioburstoqpskdemodulator->setCPUReduce(ui->actionReduce_CPU->isChecked()); + audioburstoqpskdemodulatorsettings.zmqAudio =settingsdialog->zmqAudioInputEnabled; if(typeofdemodtouse==BURSTOQPSK)audioburstoqpskdemodulator->start(); //burst msk @@ -212,6 +221,8 @@ MainWindow::MainWindow(QWidget *parent) : audioburstmskdemodulatorsettings.freq_center=tmpfreq; audioburstmskdemodulator->setSQL(false); audioburstmskdemodulator->setSettings(audioburstmskdemodulatorsettings); + audioburstmskdemodulator->setCPUReduce(ui->actionReduce_CPU->isChecked()); + audioburstmskdemodulatorsettings.zmqAudio =settingsdialog->zmqAudioInputEnabled; if(typeofdemodtouse==BURSTMSK)audioburstmskdemodulator->start(); //add todays date @@ -223,25 +234,25 @@ MainWindow::MainWindow(QWidget *parent) : ui->actionTXRX->setVisible(false);//there is a hidden audio modulator icon. + zmqStatus = -1; + context = zmq_ctx_new(); + publisher = zmq_socket(context, ZMQ_PUB); + + int keepalive = 1; + int keepalivecnt = 10; + int keepaliveidle = 1; + int keepaliveintrv = 1; + + zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE,(void*)&keepalive, sizeof(ZMQ_TCP_KEEPALIVE)); + zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE_CNT,(void*)&keepalivecnt,sizeof(ZMQ_TCP_KEEPALIVE_CNT)); + zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE_IDLE,(void*)&keepaliveidle,sizeof(ZMQ_TCP_KEEPALIVE_IDLE)); + zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE_INTVL,(void*)&keepaliveintrv,sizeof(ZMQ_TCP_KEEPALIVE_INTVL)); + + //set pop and accept settings settingsdialog->populatesettings(); acceptsettings(); - /*QString teststr="F58ADL0040/AKLCDYA.ADS.N705DN07EEE19454DAC7D010D21D0DEEEC44556208024029F0588C71D7884D000E13B90F00000F12C1A280001029305F1019F4"; - // //teststr="F61AQF0027#M1B/B6 AKLCDYA.ADS.VH-OEI14DC715BE394C80ED02D1D0DDBBBBBEEEEC80E8258D82D843333080E800F85"; - teststr="A92AXA42FD#M1B/B6 OAKODYA.ADS..N42FD0724FE94A9BECAFC4DF01F0D24FA4CAAAACAFC802D238E3CE38E4AFC800E24B0F540040F25899FC004101420DEB82858"; - teststr="F21AUA082/FUKJJYA.ADS.N772UA070DD5F32FBD894736B79D1602BC7B5928E04EA01600C97B8938806560171165E328E289C408AA0D0EEF9B2D8D897302AD11C88B282289C4000E7B50F780000F79F9A30000BB12"; - //teststr="F42AUA0828/FUKJJYA.ADS.N772UA07150C231FE549470E3D1D1600DF765128E01B401601F479E128E055C01603557D7128E0B5801601DF042928E0E6C0160073043908F8F2E01600B47DC8CC69078017188A7B1E12C57D48AB0D1556AB1E84094700DA160C0B1C7A8947000E76";//5"; - - teststr="J84ACI0017/OAKODYA.ADSB-183560301D095"; - ACARSItem tmpitem; - tmpitem.message=teststr; - tmpitem.downlink=true; - tmpitem.nonacars=false; - if(arincparser.parseDownlinkmessage(tmpitem)) - { - qDebug()<spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); + } //some burstoqpsk connections disconnect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -290,6 +305,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); + } //burstdemod demod2 disconnect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -318,6 +337,12 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); + } + + //some msk connections connect(audiomskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -332,7 +357,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - + if(pRecThrd!=0) + { + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + } break; case OQPSK: //opqsk @@ -349,7 +377,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); + } //some burstoqpsk connections disconnect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -364,6 +395,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); + } //burstdemod demod2 disconnect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -392,6 +427,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); + } //some oqpsk connections connect(audiooqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -406,7 +445,11 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); + if(pRecThrd!=0) + { + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + } break; @@ -425,6 +468,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); + } //some oqpsk connections disconnect(audiooqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -439,6 +486,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); + } //some burst msk connections disconnect(audioburstmskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -453,7 +504,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); + } //some burstoqpsk connections @@ -469,6 +523,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); + if(pRecThrd!=0) + { + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray))); + } //burstdemod demod2 connect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -501,7 +559,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); + } //some oqpsk connections disconnect(audiooqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); disconnect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)), this,SLOT(SignalStatusSlot(bool))); @@ -515,7 +576,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); + } //some burstoqpsk connections disconnect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); disconnect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)), this,SLOT(SignalStatusSlot(bool))); @@ -529,6 +593,10 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); + if(pRecThrd!=0) + { + disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); + } //burstdemod demod2 disconnect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -557,11 +625,62 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)), aerol,SLOT(SignalStatusSlot(bool))); + if(pRecThrd!=0) + { + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray))); + } break; } } +void MainWindow::connectZMQ() +{ + // bind socket + + if(zmqStatus == 0) + { + zmq_disconnect(publisher, connected_url.c_str()); + } + + if(settingsdialog->zmqAudioOutEnabled) + { + + QSettings settings("Jontisoft", settings_name); + + QString url = settings.value("remoteAudioOutBindAddress", "tcp://*:5551").toString(); + + connected_url = url.toUtf8().constData(); + + zmqStatus= zmq_bind(publisher, connected_url.c_str() ); + } + + if(pRecThrd!=0 && pRecThrd->running) + { + emit ZMQaudioStop(); + pRecThrd = 0; + } + + + if(settingsdialog->zmqAudioInputEnabled) + { + pRecThrd = new AudioReceiver(settingsdialog->zmqAudioInputAddress, settingsdialog->zmqAudioInputTopic); + + QThread* thread = new QThread; + pRecThrd->moveToThread(thread); + + connect(thread, SIGNAL (started()), pRecThrd, SLOT (process())); + connect(pRecThrd, SIGNAL (finished()), pRecThrd, SLOT (deleteLater())); + connect(thread, SIGNAL (finished()), thread, SLOT (deleteLater())); + connect(this, SIGNAL (ZMQaudioStop()), pRecThrd, SLOT (ZMQaudioStop()),Qt::DirectConnection); + + thread->start(); + } + + + +} + void MainWindow::closeEvent(QCloseEvent *event) { @@ -595,6 +714,14 @@ MainWindow::~MainWindow() delete ambe; delete planelog; delete ui; + + if(pRecThrd!=0 && pRecThrd->running) + { + emit ZMQaudioStop(); + delete pRecThrd; + } + + } void MainWindow::SignalStatusSlot(bool signal) @@ -705,6 +832,11 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audioburstoqpskdemodulatorsettings.fb=bitrate_tmp; audioburstmskdemodulatorsettings.fb=bitrate_tmp; + audiooqpskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; + audiomskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; + audioburstoqpskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; + audioburstmskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; + if(typeofdemodtouse==BURSTOQPSK) { @@ -712,7 +844,18 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audiooqpskdemodulator->stop(); audioburstmskdemodulator->stop(); selectdemodulatorconnections(BURSTOQPSK); + + + if(!settingsdialog->widebandwidthenable) + { audioburstoqpskdemodulatorsettings.Fs=48000; + + }else + { + audioburstoqpskdemodulatorsettings.Fs=96000; + + } + int idx=ui->comboBoxlbw->findText(((QString)"%1 Hz").arg(audioburstoqpskdemodulatorsettings.fb*1.0)); if(idx>=0)audioburstoqpskdemodulatorsettings.lockingbw=ui->comboBoxlbw->itemText(idx).split(" ")[0].toDouble(); audioburstoqpskdemodulatorsettings.audio_device_in=settingsdialog->audioinputdevice; @@ -720,6 +863,11 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) else audioburstoqpskdemodulatorsettings.channel_stereo=false; audioburstoqpskdemodulator->setSettings(audioburstoqpskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); + + if(pRecThrd != 0) + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + + audioburstoqpskdemodulator->start(); } @@ -743,6 +891,11 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audiooqpskdemodulatorsettings.audio_device_in=settingsdialog->audioinputdevice; audiooqpskdemodulator->setSettings(audiooqpskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); + + if(pRecThrd != 0) + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + + audiooqpskdemodulator->start(); } @@ -768,6 +921,11 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audiomskdemodulatorsettings.audio_device_in=settingsdialog->audioinputdevice; audiomskdemodulator->setSettings(audiomskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); + + if(pRecThrd != 0) + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + + audiomskdemodulator->start(); } @@ -784,6 +942,11 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audioburstmskdemodulatorsettings.audio_device_in=settingsdialog->audioinputdevice; audioburstmskdemodulator->setSettings(audioburstmskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); + + if(pRecThrd != 0) + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + + audioburstmskdemodulator->start(); } @@ -968,6 +1131,9 @@ void MainWindow::acceptsettings() if(settingsdialog->tcp_for_ads_messages_enabled)sbs1->starttcpconnection(settingsdialog->tcp_for_ads_messages_address,settingsdialog->tcp_for_ads_messages_port,settingsdialog->tcp_as_client_enabled); else sbs1->stoptcpconnection(); + connectZMQ(); + + //if soundcard rate changed if(typeofdemodtouse==MSK) { @@ -988,6 +1154,10 @@ void MainWindow::acceptsettings() audiomskdemodulator->setSettings(audiomskdemodulatorsettings); } + if(pRecThrd != 0) + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + + } if(typeofdemodtouse==BURSTMSK)// we only use 48000 { @@ -995,6 +1165,10 @@ void MainWindow::acceptsettings() // audioburstmskdemodulatorsettings.Fs=48000; // audioburstmskdemodulator->setSettings(audioburstmskdemodulatorsettings); + if(pRecThrd != 0) + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + + } @@ -1002,40 +1176,51 @@ void MainWindow::acceptsettings() { //audiooqpskdemodulatorsettings.Fs=48000; //audiooqpskdemodulator->setSettings(audiooqpskdemodulatorsettings); + + if(pRecThrd != 0) + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + } if(typeofdemodtouse==BURSTOQPSK)//BURSTOQPSK uses 48000 all the time so not needed { //audioburstoqpskdemodulatorsettings.Fs=48000; //audioburstoqpskdemodulator->setSettings(audioburstoqpskdemodulatorsettings); + + if(pRecThrd != 0) + connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + } //if soundcard device changed if(typeofdemodtouse==MSK) { - if(audiomskdemodulatorsettings.audio_device_in!=settingsdialog->audioinputdevice) + if(audiomskdemodulatorsettings.audio_device_in!=settingsdialog->audioinputdevice || audiomskdemodulatorsettings.zmqAudio != settingsdialog->zmqAudioInputEnabled ) { audiomskdemodulator->stop(); audiomskdemodulatorsettings.audio_device_in=settingsdialog->audioinputdevice; + audiomskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; audiomskdemodulator->setSettings(audiomskdemodulatorsettings); audiomskdemodulator->start(); } } if(typeofdemodtouse==OQPSK) { - if(audiooqpskdemodulatorsettings.audio_device_in!=settingsdialog->audioinputdevice) + if(audiooqpskdemodulatorsettings.audio_device_in!=settingsdialog->audioinputdevice || audiooqpskdemodulatorsettings.zmqAudio != settingsdialog->zmqAudioInputEnabled) { audiooqpskdemodulator->stop(); audiooqpskdemodulatorsettings.audio_device_in=settingsdialog->audioinputdevice; + audiooqpskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; audiooqpskdemodulator->setSettings(audiooqpskdemodulatorsettings); audiooqpskdemodulator->start(); } } if(typeofdemodtouse==BURSTOQPSK) { - if(audioburstoqpskdemodulatorsettings.audio_device_in!=settingsdialog->audioinputdevice) + if(audioburstoqpskdemodulatorsettings.audio_device_in!=settingsdialog->audioinputdevice || audioburstoqpskdemodulatorsettings.zmqAudio != settingsdialog->zmqAudioInputEnabled) { audioburstoqpskdemodulator->stop(); audioburstoqpskdemodulatorsettings.audio_device_in=settingsdialog->audioinputdevice; + audioburstoqpskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; audioburstoqpskdemodulator->setSettings(audioburstoqpskdemodulatorsettings); audioburstoqpskdemodulator->start(); } @@ -1043,10 +1228,11 @@ void MainWindow::acceptsettings() if(typeofdemodtouse==BURSTMSK) { - if(audioburstmskdemodulatorsettings.audio_device_in!=settingsdialog->audioinputdevice) + if(audioburstmskdemodulatorsettings.audio_device_in!=settingsdialog->audioinputdevice || audioburstmskdemodulatorsettings.zmqAudio != settingsdialog->zmqAudioInputEnabled) { audioburstmskdemodulator->stop(); audioburstmskdemodulatorsettings.audio_device_in=settingsdialog->audioinputdevice; + audioburstmskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; audioburstmskdemodulator->setSettings(audioburstmskdemodulatorsettings); audioburstmskdemodulator->start(); } @@ -1087,6 +1273,30 @@ void MainWindow::acceptsettings() if(settingsdialog->loggingenable)compresseddiskwriter->setLogDir(settingsdialog->loggingdirectory); else compresseddiskwriter->setLogDir(""); + + if(settingsdialog->localAudioOutEnabled){ + + connect(aerol,SIGNAL(Voicesignal(QByteArray)),ambe,SLOT(to_decode_slot(QByteArray)),Qt::UniqueConnection); + + }else{ + + disconnect(aerol,SIGNAL(Voicesignal(QByteArray)),ambe,SLOT(to_decode_slot(QByteArray))); + + } + + if(settingsdialog->zmqAudioOutEnabled){ + + connect(aerol,SIGNAL(Voicesignal(QByteArray&, QString&)),this,SLOT(Voiceslot(QByteArray&, QString&)),Qt::UniqueConnection); + + }else + { + + disconnect(aerol,SIGNAL(Voicesignal(QByteArray&, QString&)),this,SLOT(Voiceslot(QByteArray&, QString&))); + + } + + + } void MainWindow::on_action_PlaneLog_triggered() @@ -1122,6 +1332,22 @@ void MainWindow::CChannelAssignmentSlot(CChannelAssignmentItem &item) ui->plainTextEdit_cchan_assignment->appendPlainText(message); } +void MainWindow::Voiceslot(QByteArray &data, QString &hex) +{ + + std::string topic_text = settingsdialog->zmqAudioOutTopic.toUtf8().constData(); + zmq_setsockopt(publisher, ZMQ_IDENTITY, topic_text.c_str(), topic_text.length()); + + if(data.length() != 0){ + + zmq_send(publisher, topic_text.c_str(), topic_text.length(), ZMQ_SNDMORE); + zmq_send(publisher, data.data(), data.length(), 0 ); + + } + zmq_send(publisher, topic_text.c_str(), 5, ZMQ_SNDMORE); + zmq_send(publisher, hex.toStdString().c_str(), 6, 0 ); + +} //--new method of mainwindow getting second channel from aerol @@ -1357,3 +1583,4 @@ void MainWindow::on_actionReduce_CPU_triggered(bool checked) audiomskdemodulator->setCPUReduce(checked); } + diff --git a/JAERO/mainwindow.h b/JAERO/mainwindow.h index 9943e84..71f5696 100644 --- a/JAERO/mainwindow.h +++ b/JAERO/mainwindow.h @@ -4,6 +4,9 @@ #include #include #include + +#include "winsock2.h" + #include "audiooqpskdemodulator.h" #include "audiomskdemodulator.h" #include "audioburstoqpskdemodulator.h" @@ -18,9 +21,12 @@ #include "databasetext.h" #include "arincparse.h" +#include "zmq.h" #include "audiooutdevice.h" #include "compressedaudiodiskwriter.h" +#include "audioreceiver.h" + namespace Ui { class MainWindow; @@ -34,6 +40,10 @@ class MainWindow : public QMainWindow explicit MainWindow(QWidget *parent = 0); ~MainWindow(); +signals: + + void ZMQaudioStop(); + private: enum DemodType{NoDemodType,MSK,OQPSK,BURSTOQPSK,BURSTMSK}; Ui::MainWindow *ui; @@ -88,6 +98,18 @@ class MainWindow : public QMainWindow ArincParse arincparser; QSound *beep; + + + // zeromq for AMBE + void* context; + void* publisher; + + void connectZMQ(); + int zmqStatus; + std::string connected_url; + + AudioReceiver * pRecThrd; + protected: void closeEvent(QCloseEvent *event); @@ -110,6 +132,7 @@ private slots: void on_action_Settings_triggered(); void on_action_PlaneLog_triggered(); void ACARSslot(ACARSItem &acarsitem); + void Voiceslot(QByteArray &data, QString &hex); void CChannelAssignmentSlot(CChannelAssignmentItem &item); void ERRorslot(QString &error); diff --git a/JAERO/mskdemodulator.cpp b/JAERO/mskdemodulator.cpp index 30de7cb..0224a78 100644 --- a/JAERO/mskdemodulator.cpp +++ b/JAERO/mskdemodulator.cpp @@ -368,14 +368,16 @@ qint64 MskDemodulator::writeData(const char *data, qint64 len) cpx_type cval= mixer2.WTCISValue()*(dval); cpx_type sig2 = cpx_type(matchedfilter_re->FIRUpdateAndProcess(cval.real()),matchedfilter_im->FIRUpdateAndProcess(cval.imag())); + double dabval = std::sqrt(sig2.real()*sig2.real() + sig2.imag()*sig2.imag()); + //Measure ebno - ebnomeasure->Update(std::abs(sig2)); + ebnomeasure->Update(dabval); //AGC - sig2*=agc->Update(std::abs(sig2)); + sig2*=agc->Update(dabval); //clipping - double abval=std::abs(sig2); + double abval=std::sqrt(sig2.real()*sig2.real() + sig2.imag()*sig2.imag()); if(abval>2.84)sig2=(2.84/abval)*sig2; cpx_type pt_d = delayedsmpl.update_dont_touch(sig2); @@ -523,5 +525,11 @@ void MskDemodulator::DCDstatSlot(bool _dcd) } +void MskDemodulator::dataReceived(const QByteArray &audio) +{ + + writeData(audio, audio.length()); + +} diff --git a/JAERO/mskdemodulator.h b/JAERO/mskdemodulator.h index 61bbf48..ddcfb06 100644 --- a/JAERO/mskdemodulator.h +++ b/JAERO/mskdemodulator.h @@ -30,6 +30,7 @@ class MskDemodulator : public QIODevice double Fs; int symbolspercycle; double signalthreshold; + bool zmqAudio; Settings() { coarsefreqest_fft_power=13;//2^coarsefreqest_fft_power @@ -39,6 +40,7 @@ class MskDemodulator : public QIODevice Fs=48000;//Hz symbolspercycle=16; signalthreshold=0.5; + zmqAudio=false; } }; explicit MskDemodulator(QObject *parent); @@ -160,6 +162,8 @@ public slots: void FreqOffsetEstimateSlot(double freq_offset_est); void CenterFreqChangedSlot(double freq_center); void DCDstatSlot(bool dcd); + void dataReceived(const QByteArray &audio); + }; diff --git a/JAERO/oqpskdemodulator.cpp b/JAERO/oqpskdemodulator.cpp index e35d3d2..a65f650 100644 --- a/JAERO/oqpskdemodulator.cpp +++ b/JAERO/oqpskdemodulator.cpp @@ -56,7 +56,7 @@ OqpskDemodulator::OqpskDemodulator(QObject *parent) connect(coarsefreqestimate, SIGNAL(FreqOffsetEstimate(double)),this,SLOT(FreqOffsetEstimateSlot(double))); RootRaisedCosine rrc; - rrc.design(1,55,48000,10500/2); + rrc.design(1,55,Fs,10500/2); fir_re=new FIR(rrc.Points.size()); fir_im=new FIR(rrc.Points.size()); for(int i=0;isetup_update(Fs,fb); @@ -452,12 +455,13 @@ qint64 OqpskDemodulator::writeData(const char *data, qint64 len) } //Measure ebno - ebnomeasure->Update(std::abs(sig2)); - //AGC - sig2*=agc->Update(std::abs(sig2)); + double dabval = std::sqrt(sig2.real()*sig2.real() + sig2.imag()*sig2.imag()); - //clipping + ebnomeasure->Update(dabval); + + //AGC + sig2*=agc->Update(dabval); //clipping double abval=std::abs(sig2); if(abval>2.84)sig2=(2.84/abval)*sig2; @@ -535,7 +539,7 @@ qint64 OqpskDemodulator::writeData(const char *data, qint64 len) if(!slowdown) { ASSERTCH(pointbuff,pointbuff_ptr); - pointbuff[pointbuff_ptr]=pt_qpsk; + pointbuff.replace(pointbuff_ptr,pt_qpsk); pointbuff_ptr++;pointbuff_ptr%=pointbuff.size(); //if(scatterpointtype==SPT_constellation&&(pointbuff_ptr%100==0))emit ScatterPoints(pointbuff); if(scatterpointtype==SPT_constellation&&sendscatterpoints){sendscatterpoints=false;emit ScatterPoints(pointbuff);} @@ -545,7 +549,7 @@ qint64 OqpskDemodulator::writeData(const char *data, qint64 len) { cpx_type st_phase_offset_pt=st_osc_ref.WTCISValue()*std::conj(st_osc.WTCISValue()); ASSERTCH(phasepointbuff,phasepointbuff_ptr); - phasepointbuff[phasepointbuff_ptr]=st_phase_offset_pt; + phasepointbuff.replace(phasepointbuff_ptr,st_phase_offset_pt); phasepointbuff_ptr++;phasepointbuff_ptr%=phasepointbuff.size(); //if(scatterpointtype==SPT_phaseoffsetest)emit ScatterPoints(phasepointbuff); if(scatterpointtype==SPT_phaseoffsetest&&sendscatterpoints){sendscatterpoints=false;emit ScatterPoints(phasepointbuff);} @@ -554,21 +558,8 @@ qint64 OqpskDemodulator::writeData(const char *data, qint64 len) //calc MSE of the points mse=msecalc->Update(pt_qpsk); - /* - //hard BPSK demod x2 - bool pt_qpsk_imag_demod=0; - bool pt_qpsk_real_demod=0; - if(pt_qpsk.imag()>0)pt_qpsk_imag_demod=1; - if(pt_qpsk.real()>0)pt_qpsk_real_demod=1; - - //if you want packed bits - bc.LoadSymbol(pt_qpsk_imag_demod); - bc.LoadSymbol(pt_qpsk_real_demod); - while(bc.DataAvailable) + if(mse Date: Tue, 20 Jul 2021 14:26:43 +0200 Subject: [PATCH 02/22] Adding zeromq stuff --- JAERO/.qmake.stash | 22 - .../UsersjeroenAppDataLocalTemptmp1_94dcea | 0 .../UsersjeroenAppDataLocalTemptmp1yxsa67p | 0 .../UsersjeroenAppDataLocalTemptmpgie733gt | 0 .../UsersjeroenAppDataLocalTemptmpkz73g8jc | 0 JAERO/tmp/debug/stuff/moc_predefs.h | 384 ------------------ 6 files changed, 406 deletions(-) delete mode 100644 JAERO/.qmake.stash delete mode 100644 JAERO/debug/UsersjeroenAppDataLocalTemptmp1_94dcea delete mode 100644 JAERO/debug/UsersjeroenAppDataLocalTemptmp1yxsa67p delete mode 100644 JAERO/debug/UsersjeroenAppDataLocalTemptmpgie733gt delete mode 100644 JAERO/debug/UsersjeroenAppDataLocalTemptmpkz73g8jc delete mode 100644 JAERO/tmp/debug/stuff/moc_predefs.h diff --git a/JAERO/.qmake.stash b/JAERO/.qmake.stash deleted file mode 100644 index e530957..0000000 --- a/JAERO/.qmake.stash +++ /dev/null @@ -1,22 +0,0 @@ -QMAKE_CXX.QT_COMPILER_STDCXX = 201402L -QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 9 -QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 2 -QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0 -QMAKE_CXX.COMPILER_MACROS = \ - QT_COMPILER_STDCXX \ - QMAKE_GCC_MAJOR_VERSION \ - QMAKE_GCC_MINOR_VERSION \ - QMAKE_GCC_PATCH_VERSION -QMAKE_CXX.INCDIRS = \ - C:/msys64/mingw64/include/c++/9.2.0 \ - C:/msys64/mingw64/include/c++/9.2.0/x86_64-w64-mingw32 \ - C:/msys64/mingw64/include/c++/9.2.0/backward \ - C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/include \ - C:/msys64/mingw64/include \ - C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/include-fixed \ - C:/msys64/mingw64/x86_64-w64-mingw32/include -QMAKE_CXX.LIBDIRS = \ - C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0 \ - C:/msys64/mingw64/lib/gcc \ - C:/msys64/mingw64/x86_64-w64-mingw32/lib \ - C:/msys64/mingw64/lib diff --git a/JAERO/debug/UsersjeroenAppDataLocalTemptmp1_94dcea b/JAERO/debug/UsersjeroenAppDataLocalTemptmp1_94dcea deleted file mode 100644 index e69de29..0000000 diff --git a/JAERO/debug/UsersjeroenAppDataLocalTemptmp1yxsa67p b/JAERO/debug/UsersjeroenAppDataLocalTemptmp1yxsa67p deleted file mode 100644 index e69de29..0000000 diff --git a/JAERO/debug/UsersjeroenAppDataLocalTemptmpgie733gt b/JAERO/debug/UsersjeroenAppDataLocalTemptmpgie733gt deleted file mode 100644 index e69de29..0000000 diff --git a/JAERO/debug/UsersjeroenAppDataLocalTemptmpkz73g8jc b/JAERO/debug/UsersjeroenAppDataLocalTemptmpkz73g8jc deleted file mode 100644 index e69de29..0000000 diff --git a/JAERO/tmp/debug/stuff/moc_predefs.h b/JAERO/tmp/debug/stuff/moc_predefs.h deleted file mode 100644 index 378eef5..0000000 --- a/JAERO/tmp/debug/stuff/moc_predefs.h +++ /dev/null @@ -1,384 +0,0 @@ -#define __DBL_MIN_EXP__ (-1021) -#define __FLT32X_MAX_EXP__ 1024 -#define __cpp_attributes 200809 -#define __UINT_LEAST16_MAX__ 0xffff -#define __ATOMIC_ACQUIRE 2 -#define __FLT128_MAX_10_EXP__ 4932 -#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F -#define __GCC_IEC_559_COMPLEX 2 -#define __UINT_LEAST8_TYPE__ unsigned char -#define __SIZEOF_FLOAT80__ 16 -#define _WIN32 1 -#define __INTMAX_C(c) c ## LL -#define __CHAR_BIT__ 8 -#define __UINT8_MAX__ 0xff -#define _WIN64 1 -#define __WINT_MAX__ 0xffff -#define __FLT32_MIN_EXP__ (-125) -#define __cpp_static_assert 200410 -#define __ORDER_LITTLE_ENDIAN__ 1234 -#define __SIZE_MAX__ 0xffffffffffffffffULL -#define __WCHAR_MAX__ 0xffff -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 -#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L) -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 -#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 -#define __GCC_IEC_559 2 -#define __FLT32X_DECIMAL_DIG__ 17 -#define __FLT_EVAL_METHOD__ 0 -#define __cpp_binary_literals 201304 -#define __FLT64_DECIMAL_DIG__ 17 -#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 -#define __x86_64 1 -#define __cpp_variadic_templates 200704 -#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL -#define __SIG_ATOMIC_TYPE__ int -#define __DBL_MIN_10_EXP__ (-307) -#define __FINITE_MATH_ONLY__ 0 -#define __GNUC_PATCHLEVEL__ 0 -#define __FLT32_HAS_DENORM__ 1 -#define __UINT_FAST8_MAX__ 0xff -#define __cpp_rvalue_reference 200610 -#define __has_include(STR) __has_include__(STR) -#define __DEC64_MAX_EXP__ 385 -#define __INT8_C(c) c -#define __INT_LEAST8_WIDTH__ 8 -#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL -#define __SHRT_MAX__ 0x7fff -#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L -#define __FLT64X_MAX_10_EXP__ 4932 -#define __UINT_LEAST8_MAX__ 0xff -#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 -#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128 -#define __UINTMAX_TYPE__ long long unsigned int -#define __DEC32_EPSILON__ 1E-6DF -#define __FLT_EVAL_METHOD_TS_18661_3__ 0 -#define __UINT32_MAX__ 0xffffffffU -#define __GXX_EXPERIMENTAL_CXX0X__ 1 -#define __LDBL_MAX_EXP__ 16384 -#define __FLT128_MIN_EXP__ (-16381) -#define __WINT_MIN__ 0 -#define __FLT128_MIN_10_EXP__ (-4931) -#define __INT_LEAST16_WIDTH__ 16 -#define __SCHAR_MAX__ 0x7f -#define __FLT128_MANT_DIG__ 113 -#define __WCHAR_MIN__ 0 -#define __INT64_C(c) c ## LL -#define __DBL_DIG__ 15 -#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 -#define __FLT64X_MANT_DIG__ 64 -#define __SIZEOF_INT__ 4 -#define __SIZEOF_POINTER__ 8 -#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 -#define __USER_LABEL_PREFIX__ -#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x -#define __STDC_HOSTED__ 1 -#define __WIN32 1 -#define __LDBL_HAS_INFINITY__ 1 -#define __WIN64 1 -#define __FLT32_DIG__ 6 -#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F -#define __GXX_WEAK__ 1 -#define __SHRT_WIDTH__ 16 -#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L -#define __DEC32_MAX__ 9.999999E96DF -#define __cpp_threadsafe_static_init 200806 -#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x -#define __MINGW32__ 1 -#define __FLT32X_HAS_INFINITY__ 1 -#define __INT32_MAX__ 0x7fffffff -#define __INT_WIDTH__ 32 -#define __SIZEOF_LONG__ 4 -#define __UINT16_C(c) c -#define __PTRDIFF_WIDTH__ 64 -#define __DECIMAL_DIG__ 21 -#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64 -#define __INTMAX_WIDTH__ 64 -#define __FLT64_MIN_EXP__ (-1021) -#define __has_include_next(STR) __has_include_next__(STR) -#define __FLT64X_MIN_10_EXP__ (-4931) -#define __LDBL_HAS_QUIET_NAN__ 1 -#define __FLT64_MANT_DIG__ 53 -#define _REENTRANT 1 -#define __GNUC__ 9 -#define __GXX_RTTI 1 -#define __MMX__ 1 -#define __cpp_delegating_constructors 200604 -#define __FLT_HAS_DENORM__ 1 -#define __SIZEOF_LONG_DOUBLE__ 16 -#define __BIGGEST_ALIGNMENT__ 16 -#define __STDC_UTF_16__ 1 -#define __FLT64_MAX_10_EXP__ 308 -#define __FLT32_HAS_INFINITY__ 1 -#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L) -#define __cpp_raw_strings 200710 -#define __INT_FAST32_MAX__ 0x7fffffff -#define __WINNT 1 -#define __DBL_HAS_INFINITY__ 1 -#define __WINNT__ 1 -#define __HAVE_SPECULATION_SAFE_VALUE 1 -#define __DEC32_MIN_EXP__ (-94) -#define __INTPTR_WIDTH__ 64 -#define __FLT32X_HAS_DENORM__ 1 -#define __INT_FAST16_TYPE__ short int -#define __STRICT_ANSI__ 1 -#define __LDBL_HAS_DENORM__ 1 -#define __cplusplus 201103L -#define __cpp_ref_qualifiers 200710 -#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL -#define __INT_LEAST32_MAX__ 0x7fffffff -#define __DEC32_MIN__ 1E-95DF -#define __DEPRECATED 1 -#define __cpp_rvalue_references 200610 -#define __DBL_MAX_EXP__ 1024 -#define __WCHAR_WIDTH__ 16 -#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32 -#define __DEC128_EPSILON__ 1E-33DL -#define __SSE2_MATH__ 1 -#define __ATOMIC_HLE_RELEASE 131072 -#define __WIN32__ 1 -#define __PTRDIFF_MAX__ 0x7fffffffffffffffLL -#define __amd64 1 -#define __ATOMIC_HLE_ACQUIRE 65536 -#define __FLT32_HAS_QUIET_NAN__ 1 -#define __GNUG__ 9 -#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL -#define __SIZEOF_SIZE_T__ 8 -#define __cpp_nsdmi 200809 -#define __FLT64X_MIN_EXP__ (-16381) -#define __SIZEOF_WINT_T__ 2 -#define __LONG_LONG_WIDTH__ 64 -#define __cpp_initializer_lists 200806 -#define __FLT32_MAX_EXP__ 128 -#define __cpp_hex_float 201603 -#define __GCC_HAVE_DWARF2_CFI_ASM 1 -#define __GXX_ABI_VERSION 1013 -#define __FLT128_HAS_INFINITY__ 1 -#define __FLT_MIN_EXP__ (-125) -#define __cpp_lambdas 200907 -#define __FLT64X_HAS_QUIET_NAN__ 1 -#define __INT_FAST64_TYPE__ long long int -#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64 -#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L) -#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x -#define __DECIMAL_BID_FORMAT__ 1 -#define __GXX_TYPEINFO_EQUALITY_INLINE 0 -#define __FLT64_MIN_10_EXP__ (-307) -#define __FLT64X_DECIMAL_DIG__ 21 -#define __DEC128_MIN__ 1E-6143DL -#define __REGISTER_PREFIX__ -#define __UINT16_MAX__ 0xffff -#define __cdecl __attribute__((__cdecl__)) -#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32 -#define __UINT8_TYPE__ unsigned char -#define __NO_INLINE__ 1 -#define __FLT_MANT_DIG__ 24 -#define __LDBL_DECIMAL_DIG__ 21 -#define __VERSION__ "9.2.0" -#define __UINT64_C(c) c ## ULL -#define __cpp_unicode_characters 200704 -#define __GCC_ATOMIC_INT_LOCK_FREE 2 -#define __FLT128_MAX_EXP__ 16384 -#define __FLT32_MANT_DIG__ 24 -#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __FLT128_HAS_DENORM__ 1 -#define __FLT128_DIG__ 33 -#define __SCHAR_WIDTH__ 8 -#define __INT32_C(c) c -#define __DEC64_EPSILON__ 1E-15DD -#define __ORDER_PDP_ENDIAN__ 3412 -#define __DEC128_MIN_EXP__ (-6142) -#define __FLT32_MAX_10_EXP__ 38 -#define __INT_FAST32_TYPE__ int -#define __UINT_LEAST16_TYPE__ short unsigned int -#define __FLT64X_HAS_INFINITY__ 1 -#define __DBL_HAS_DENORM__ 1 -#define __INT16_MAX__ 0x7fff -#define __cpp_rtti 199711 -#define __SIZE_TYPE__ long long unsigned int -#define __UINT64_MAX__ 0xffffffffffffffffULL -#define __FLT64X_DIG__ 18 -#define __INT8_TYPE__ signed char -#define __GCC_ASM_FLAG_OUTPUTS__ 1 -#define __FLT_RADIX__ 2 -#define __INT_LEAST16_TYPE__ short int -#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L -#define __UINTMAX_C(c) c ## ULL -#define __k8 1 -#define __SEH__ 1 -#define __SIG_ATOMIC_MAX__ 0x7fffffff -#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 -#define __SIZEOF_PTRDIFF_T__ 8 -#define __FLT32X_MANT_DIG__ 53 -#define __x86_64__ 1 -#define __FLT32X_MIN_EXP__ (-1021) -#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF -#define __MSVCRT__ 1 -#define __INT_FAST16_MAX__ 0x7fff -#define __FLT64_DIG__ 15 -#define __UINT_FAST32_MAX__ 0xffffffffU -#define __UINT_LEAST64_TYPE__ long long unsigned int -#define __FLT_HAS_QUIET_NAN__ 1 -#define __FLT_MAX_10_EXP__ 38 -#define __LONG_MAX__ 0x7fffffffL -#define __FLT64X_HAS_DENORM__ 1 -#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL -#define __FLT_HAS_INFINITY__ 1 -#define __cpp_unicode_literals 200710 -#define __UINT_FAST16_TYPE__ short unsigned int -#define __DEC64_MAX__ 9.999999999999999E384DD -#define __INT_FAST32_WIDTH__ 32 -#define __CHAR16_TYPE__ short unsigned int -#define __PRAGMA_REDEFINE_EXTNAME 1 -#define __SIZE_WIDTH__ 64 -#define __SEG_FS 1 -#define __INT_LEAST16_MAX__ 0x7fff -#define __DEC64_MANT_DIG__ 16 -#define __INT64_MAX__ 0x7fffffffffffffffLL -#define __UINT_LEAST32_MAX__ 0xffffffffU -#define __SEG_GS 1 -#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32 -#define __GCC_ATOMIC_LONG_LOCK_FREE 2 -#define __SIG_ATOMIC_WIDTH__ 32 -#define __INT_LEAST64_TYPE__ long long int -#define __INT16_TYPE__ short int -#define __INT_LEAST8_TYPE__ signed char -#define __DEC32_MAX_EXP__ 97 -#define __INT_FAST8_MAX__ 0x7f -#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 -#define __INTPTR_MAX__ 0x7fffffffffffffffLL -#define __GXX_MERGED_TYPEINFO_NAMES 0 -#define __cpp_range_based_for 200907 -#define __FLT64_HAS_QUIET_NAN__ 1 -#define __stdcall __attribute__((__stdcall__)) -#define __FLT32_MIN_10_EXP__ (-37) -#define __SSE2__ 1 -#define __EXCEPTIONS 1 -#define __LDBL_MANT_DIG__ 64 -#define __DBL_HAS_QUIET_NAN__ 1 -#define __FLT64_HAS_INFINITY__ 1 -#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x -#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) -#define __k8__ 1 -#define __INTPTR_TYPE__ long long int -#define __UINT16_TYPE__ short unsigned int -#define __WCHAR_TYPE__ short unsigned int -#define __SIZEOF_FLOAT__ 4 -#define __pic__ 1 -#define __UINTPTR_MAX__ 0xffffffffffffffffULL -#define __INT_FAST64_WIDTH__ 64 -#define __DEC64_MIN_EXP__ (-382) -#define __cpp_decltype 200707 -#define __FLT32_DECIMAL_DIG__ 9 -#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL -#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 -#define __FLT_DIG__ 6 -#define __FLT64X_MAX_EXP__ 16384 -#define __UINT_FAST64_TYPE__ long long unsigned int -#define __INT_MAX__ 0x7fffffff -#define __amd64__ 1 -#define __code_model_medium__ 1 -#define __INT64_TYPE__ long long int -#define __FLT_MAX_EXP__ 128 -#define __ORDER_BIG_ENDIAN__ 4321 -#define __DBL_MANT_DIG__ 53 -#define __cpp_inheriting_constructors 201511 -#define __SIZEOF_FLOAT128__ 16 -#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL -#define __DEC64_MIN__ 1E-383DD -#define __WINT_TYPE__ short unsigned int -#define __UINT_LEAST32_TYPE__ unsigned int -#define __SIZEOF_SHORT__ 2 -#define __SSE__ 1 -#define __LDBL_MIN_EXP__ (-16381) -#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64 -#define __WINT_WIDTH__ 16 -#define __INT_LEAST8_MAX__ 0x7f -#define __FLT32X_MAX_10_EXP__ 308 -#define __SIZEOF_INT128__ 16 -#define __WCHAR_UNSIGNED__ 1 -#define __LDBL_MAX_10_EXP__ 4932 -#define __ATOMIC_RELAXED 0 -#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L) -#define __thiscall __attribute__((__thiscall__)) -#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 -#define __UINT8_C(c) c -#define __FLT64_MAX_EXP__ 1024 -#define __INT_LEAST32_TYPE__ int -#define __SIZEOF_WCHAR_T__ 2 -#define __FLT128_HAS_QUIET_NAN__ 1 -#define __INT_FAST8_TYPE__ signed char -#define __fastcall __attribute__((__fastcall__)) -#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x -#define __GNUC_STDC_INLINE__ 1 -#define __FLT64_HAS_DENORM__ 1 -#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32 -#define __DBL_DECIMAL_DIG__ 17 -#define __STDC_UTF_32__ 1 -#define __INT_FAST8_WIDTH__ 8 -#define __FXSR__ 1 -#define __DEC_EVAL_METHOD__ 2 -#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x -#define __MINGW64__ 1 -#define __cpp_runtime_arrays 198712 -#define __UINT64_TYPE__ long long unsigned int -#define __UINT32_C(c) c ## U -#define __INTMAX_MAX__ 0x7fffffffffffffffLL -#define __cpp_alias_templates 200704 -#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F -#define __INT8_MAX__ 0x7f -#define __LONG_WIDTH__ 32 -#define __PIC__ 1 -#define __UINT_FAST32_TYPE__ unsigned int -#define __CHAR32_TYPE__ unsigned int -#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F -#define __cpp_constexpr 200704 -#define __INT32_TYPE__ int -#define __SIZEOF_DOUBLE__ 8 -#define __cpp_exceptions 199711 -#define __FLT_MIN_10_EXP__ (-37) -#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64 -#define __INT_LEAST32_WIDTH__ 32 -#define __INTMAX_TYPE__ long long int -#define _INTEGRAL_MAX_BITS 64 -#define __DEC128_MAX_EXP__ 6145 -#define __FLT32X_HAS_QUIET_NAN__ 1 -#define __ATOMIC_CONSUME 1 -#define __GNUC_MINOR__ 2 -#define __INT_FAST16_WIDTH__ 16 -#define __UINTMAX_MAX__ 0xffffffffffffffffULL -#define __DEC32_MANT_DIG__ 7 -#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x -#define __DBL_MAX_10_EXP__ 308 -#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L -#define __INT16_C(c) c -#define __STDC__ 1 -#define __FLT32X_DIG__ 15 -#define __PTRDIFF_TYPE__ long long int -#define __ATOMIC_SEQ_CST 5 -#define __UINT32_TYPE__ unsigned int -#define __FLT32X_MIN_10_EXP__ (-307) -#define __UINTPTR_TYPE__ long long unsigned int -#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD -#define __DEC128_MANT_DIG__ 34 -#define __LDBL_MIN_10_EXP__ (-4931) -#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 -#define __SSE_MATH__ 1 -#define __SIZEOF_LONG_LONG__ 8 -#define __cpp_user_defined_literals 200809 -#define __FLT128_DECIMAL_DIG__ 36 -#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 -#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x -#define __LDBL_DIG__ 18 -#define __FLT_DECIMAL_DIG__ 9 -#define __UINT_FAST16_MAX__ 0xffff -#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 -#define __INT_LEAST64_WIDTH__ 64 -#define __UINT_FAST8_TYPE__ unsigned char -#define __WIN64__ 1 -#define __ATOMIC_ACQ_REL 4 -#define __ATOMIC_RELEASE 3 -#define __declspec(x) __attribute__((x)) From 5e33dd66edbd0d5d7cf33792974b2810e94cf540 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jul 2021 13:16:48 +0200 Subject: [PATCH 03/22] removed bak files --- JAERO/.qmake.stash | 22 + JAERO/gui_classes/settingsdialog.cpp.bak | 227 ------- JAERO/gui_classes/settingsdialog.h.bak | 78 --- JAERO/gui_classes/settingsdialog.ui.bak | 723 ----------------------- JAERO/tmp/debug/stuff/moc_predefs.h | 384 ++++++++++++ JAERO/tmp/release/stuff/moc_predefs.h | 383 ++++++++++++ 6 files changed, 789 insertions(+), 1028 deletions(-) create mode 100644 JAERO/.qmake.stash delete mode 100644 JAERO/gui_classes/settingsdialog.cpp.bak delete mode 100644 JAERO/gui_classes/settingsdialog.h.bak delete mode 100644 JAERO/gui_classes/settingsdialog.ui.bak create mode 100644 JAERO/tmp/debug/stuff/moc_predefs.h create mode 100644 JAERO/tmp/release/stuff/moc_predefs.h diff --git a/JAERO/.qmake.stash b/JAERO/.qmake.stash new file mode 100644 index 0000000..e530957 --- /dev/null +++ b/JAERO/.qmake.stash @@ -0,0 +1,22 @@ +QMAKE_CXX.QT_COMPILER_STDCXX = 201402L +QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 9 +QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 2 +QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0 +QMAKE_CXX.COMPILER_MACROS = \ + QT_COMPILER_STDCXX \ + QMAKE_GCC_MAJOR_VERSION \ + QMAKE_GCC_MINOR_VERSION \ + QMAKE_GCC_PATCH_VERSION +QMAKE_CXX.INCDIRS = \ + C:/msys64/mingw64/include/c++/9.2.0 \ + C:/msys64/mingw64/include/c++/9.2.0/x86_64-w64-mingw32 \ + C:/msys64/mingw64/include/c++/9.2.0/backward \ + C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/include \ + C:/msys64/mingw64/include \ + C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/include-fixed \ + C:/msys64/mingw64/x86_64-w64-mingw32/include +QMAKE_CXX.LIBDIRS = \ + C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0 \ + C:/msys64/mingw64/lib/gcc \ + C:/msys64/mingw64/x86_64-w64-mingw32/lib \ + C:/msys64/mingw64/lib diff --git a/JAERO/gui_classes/settingsdialog.cpp.bak b/JAERO/gui_classes/settingsdialog.cpp.bak deleted file mode 100644 index 2285c41..0000000 --- a/JAERO/gui_classes/settingsdialog.cpp.bak +++ /dev/null @@ -1,227 +0,0 @@ -#include "settingsdialog.h" -#include "ui_settingsdialog.h" -#include -#include -#include -#include -#include -#include -#include -#include "../databasetext.h" - -QString settings_name=""; - -SettingsDialog::SettingsDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::SettingsDialog) -{ - ui->setupUi(this); - populatesettings(); -} - -SettingsDialog::~SettingsDialog() -{ - delete ui; -} - -void SettingsDialog::poulatepublicvars() -{ - - msgdisplayformat=ui->comboBoxDisplayformat->currentText(); - dropnontextmsgs=ui->checkBoxdropnontextmsgs->isChecked(); - donotdisplaysus.clear(); - QRegExp rx("([\\da-fA-F]+)"); - int pos = 0; - while ((pos = rx.indexIn(ui->lineEditdonotdisplaysus->text(), pos)) != -1) - { - bool ok = false; - uint value = rx.cap(1).toUInt(&ok,16); - if(ok)donotdisplaysus.push_back(value); - pos += rx.matchedLength(); - } - - audioinputdevice=QAudioDeviceInfo::defaultInputDevice(); - foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioInput)) - { - if(deviceInfo.deviceName()==ui->comboBoxsoundcard->currentText()) - { - audioinputdevice=deviceInfo; - break; - } - } - - loggingdirectory=ui->lineEditlogdir->text(); - loggingenable=ui->checkBoxlogenable->isChecked(); - widebandwidthenable=ui->checkBoxlogwidebandwidthenable->isChecked(); - - planesfolder=ui->lineEditplanesfolder->text(); - planelookup=ui->lineEditplanelookup->text(); - - beepontextmessage=ui->checkBoxbeepontextmessage->isChecked(); - - //bottom text window output settings - QStringList hosts=ui->lineEditudpoutputdecodedmessagesaddress->text().simplified().split(" "); - udp_for_decoded_messages_address.clear(); - udp_for_decoded_messages_port.clear(); - for(int i=0;icheckOutputDecodedMessageToUDPPort->isChecked(); - - - //ads message output using SBS1 protocol over TCP - QString hostaddr=ui->lineEdittcpoutputadsmessagesaddress->text().section(':',0,0); - if(!tcp_for_ads_messages_address.setAddress(hostaddr)) - { - QString tstr=ui->lineEdittcpoutputadsmessagesaddress->text().section(':',1,1); - ui->lineEdittcpoutputadsmessagesaddress->setText("0.0.0.0:"+tstr); - tcp_for_ads_messages_address.clear(); - QSettings settings("Jontisoft", settings_name); - settings.setValue("lineEdittcpoutputadsmessagesaddress", "0.0.0.0:"+tstr); - qDebug()<<"Can't set TCP address reverting to 0.0.0.0"; - } - tcp_for_ads_messages_port=ui->lineEdittcpoutputadsmessagesaddress->text().section(':',1,1).toInt(); - if(tcp_for_ads_messages_port==0) - { - qDebug()<<"Can't set TCP port reverting to 30003"; - ui->lineEdittcpoutputadsmessagesaddress->setText(hostaddr+":30003"); - QSettings settings("Jontisoft", settings_name); - settings.setValue("lineEdittcpoutputadsmessagesaddress", hostaddr+":30003"); - tcp_for_ads_messages_port=30003; - } - tcp_for_ads_messages_enabled=ui->checkOutputADSMessageToTCP->isChecked(); - tcp_as_client_enabled=ui->checkTCPAsClient->isChecked(); - - ui->checkTCPAsClient->setEnabled(ui->checkOutputADSMessageToTCP->isChecked()); - - localAudioOutEnabled=ui->ambeEnabled->isChecked(); - zmqAudioOutEnabled=ui->remoteAmbeEnabled->isChecked(); - zmqAudioOutBind=ui->lineEditZMQBind->text(); - zmqAudioOutTopic=ui->lineEditZMQBindTopic->text(); - - zmqAudioInputAddress = ui->lineEditZmqConnectAddress->text(); - zmqAudioInputTopic = ui->lineEditZmqTopic->text(); - zmqAudioInputEnabled = ui->checkBoxZMQ->isChecked(); - - -} - - -void SettingsDialog::populatesettings() -{ - - //populate soundcard - ui->comboBoxsoundcard->clear(); - foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioInput)) - ui->comboBoxsoundcard->addItem(deviceInfo.deviceName()); - - //load settings - QSettings settings("Jontisoft", settings_name); - ui->comboBoxDisplayformat->setCurrentIndex(settings.value("comboBoxDisplayformat",2).toInt()); - ui->lineEditdonotdisplaysus->setText(settings.value("lineEditdonotdisplaysus","26 0A C0 00 14 16").toString()); - ui->checkBoxdropnontextmsgs->setChecked(settings.value("checkBoxdropnontextmsgs",true).toBool()); - ui->comboBoxsoundcard->setCurrentText(settings.value("comboBoxsoundcard","").toString()); - ui->lineEditlogdir->setText(settings.value("lineEditlogdir",QStandardPaths::standardLocations(APPDATALOCATIONS)[0]+"/logs").toString()); - ui->checkBoxlogenable->setChecked(settings.value("checkBoxlogenable",false).toBool()); - ui->checkBoxlogwidebandwidthenable->setChecked(settings.value("checkBoxlogwidebandwidthenable",false).toBool()); - ui->lineEditplanesfolder->setText(settings.value("lineEditplanesfolder",QStandardPaths::standardLocations(APPDATALOCATIONS)[0]+"/planes").toString()); - ui->lineEditplanelookup->setText(settings.value("lineEditplanelookup","http://www.flightradar24.com/data/airplanes/{REG}").toString()); - ui->checkBoxbeepontextmessage->setChecked(settings.value("checkBoxbeepontextmessage",true).toBool()); - ui->lineEditudpoutputdecodedmessagesaddress->setText(settings.value("lineEditudpoutputdecodedmessagesaddress","localhost:18765").toString()); - ui->checkOutputDecodedMessageToUDPPort->setChecked(settings.value("checkOutputDecodedMessageToUDPPort",false).toBool()); - ui->lineEdittcpoutputadsmessagesaddress->setText(settings.value("lineEdittcpoutputadsmessagesaddress","0.0.0.0:30003").toString()); - ui->checkOutputADSMessageToTCP->setChecked(settings.value("checkOutputADSMessageToTCP",false).toBool()); - ui->checkTCPAsClient->setChecked(settings.value("checkTCPAsClient",false).toBool()); - ui->lineEditZMQBind->setText(settings.value("lineZMQBindAddress", "tcp://*:5551").toString()); - ui->ambeEnabled->setChecked(settings.value("ambeEnabled", true).toBool()); - - ui->checkBoxZMQ->setChecked(settings.value("zmqAudioEnabled", true).toBool()); - ui->lineEditZmqConnectAddress->setText(settings.value("zmqAudioReceiveAddress", "tcp://127.0.0.1:6003").toString()); - - QString default_topic = settings_name; - - default_topic = settings_name.remove(QRegExp( "JAERO \\[" )).remove(QRegExp( "\\]" )); - - ui->lineEditZmqTopic->setText(settings.value("zmqAudioReceiveTopic", default_topic).toString()); -//these have been tested so far as lineEditplanelookup -//http://www.flightradar24.com/data/airplanes/{REG} - - on_lineEditlogdir_editingFinished(); - - poulatepublicvars(); -} - -void SettingsDialog::accept() -{ - - //save settings - QSettings settings("Jontisoft", settings_name); - settings.setValue("comboBoxDisplayformat", ui->comboBoxDisplayformat->currentIndex()); - settings.setValue("lineEditdonotdisplaysus", ui->lineEditdonotdisplaysus->text()); - settings.setValue("checkBoxdropnontextmsgs", ui->checkBoxdropnontextmsgs->isChecked()); - settings.setValue("comboBoxsoundcard", ui->comboBoxsoundcard->currentText()); - settings.setValue("lineEditlogdir", ui->lineEditlogdir->text()); - settings.setValue("checkBoxlogenable", ui->checkBoxlogenable->isChecked()); - settings.setValue("checkBoxlogwidebandwidthenable", ui->checkBoxlogwidebandwidthenable->isChecked()); - settings.setValue("lineEditplanesfolder", ui->lineEditplanesfolder->text()); - settings.setValue("lineEditplanelookup", ui->lineEditplanelookup->text()); - settings.setValue("checkBoxbeepontextmessage", ui->checkBoxbeepontextmessage->isChecked()); - settings.setValue("lineEditudpoutputdecodedmessagesaddress", ui->lineEditudpoutputdecodedmessagesaddress->text()); - settings.setValue("checkOutputDecodedMessageToUDPPort", ui->checkOutputDecodedMessageToUDPPort->isChecked()); - settings.setValue("lineEdittcpoutputadsmessagesaddress", ui->lineEdittcpoutputadsmessagesaddress->text()); - settings.setValue("checkOutputADSMessageToTCP", ui->checkOutputADSMessageToTCP->isChecked()); - settings.setValue("checkTCPAsClient", ui->checkTCPAsClient->isChecked()); - settings.setValue("lineZMQBindAddress",ui->lineEditZMQBind->text()); - settings.setValue("ambeEnabled", ui->ambeEnabled->isChecked()); - - settings.setValue("zmqAudioEnabled", ui->checkBoxZMQ->isChecked()); - settings.setValue("zmqAudioReceiveAddress", ui->lineEditZmqConnectAddress->text()); - settings.setValue("zmqAudioReceiveTopic", ui->lineEditZmqTopic->text()); - - - poulatepublicvars(); - QDialog::accept(); -} - - -void SettingsDialog::on_lineEditlogdir_editingFinished() -{ - QFile file(ui->lineEditlogdir->text()); - ui->lineEditlogdir->setText(file.fileName()); -} - -void SettingsDialog::on_lineEditplanesfolder_editingFinished() -{ - QFile file(ui->lineEditplanesfolder->text()); - ui->lineEditplanesfolder->setText(file.fileName()); -} - -void SettingsDialog::on_checkOutputADSMessageToTCP_stateChanged(int arg1) -{ - if(!arg1)ui->checkTCPAsClient->setEnabled(false); - else ui->checkTCPAsClient->setEnabled(true); -} diff --git a/JAERO/gui_classes/settingsdialog.h.bak b/JAERO/gui_classes/settingsdialog.h.bak deleted file mode 100644 index 86a2487..0000000 --- a/JAERO/gui_classes/settingsdialog.h.bak +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef SETTINGSDIALOG_H -#define SETTINGSDIALOG_H - -#include -#include - -#if defined(Q_OS_UNIX) || defined(Q_OS_LUNX) -#define APPDATALOCATIONS QStandardPaths::AppDataLocation -#else -#define APPDATALOCATIONS QStandardPaths::AppLocalDataLocation -#endif - -#include -#include -#include - -extern QString settings_name; - -namespace Ui { -class SettingsDialog; -} - -class SettingsDialog : public QDialog -{ - Q_OBJECT - -public: - explicit SettingsDialog(QWidget *parent = 0); - ~SettingsDialog(); - void populatesettings(); - - QAudioDeviceInfo audioinputdevice; - QVector donotdisplaysus; - bool dropnontextmsgs; - QString msgdisplayformat; - bool loggingenable; - QString loggingdirectory; - bool widebandwidthenable; - - QString planesfolder; - QString planelookup; - bool beepontextmessage; - - QList udp_for_decoded_messages_address; - QList udp_for_decoded_messages_port; - bool udp_for_decoded_messages_enabled; - - - QHostAddress tcp_for_ads_messages_address; - quint16 tcp_for_ads_messages_port; - bool tcp_for_ads_messages_enabled; - bool tcp_as_client_enabled; - - bool ambeEnabled; - QString zmqBind; - bool cpuSaveMode; - bool disableAcarsConsole; - - QString zmqAudioAddress; - QString zmqAudioTopic; - bool zmqAudioEnabled; - - -private: - Ui::SettingsDialog *ui; - void poulatepublicvars(); - -protected: - void accept(); - -private slots: - - void on_lineEditlogdir_editingFinished(); - void on_lineEditplanesfolder_editingFinished(); - void on_checkOutputADSMessageToTCP_stateChanged(int arg1); -}; - -#endif // SETTINGSDIALOG_H diff --git a/JAERO/gui_classes/settingsdialog.ui.bak b/JAERO/gui_classes/settingsdialog.ui.bak deleted file mode 100644 index 558c3c7..0000000 --- a/JAERO/gui_classes/settingsdialog.ui.bak +++ /dev/null @@ -1,723 +0,0 @@ - - - SettingsDialog - - - - 0 - 0 - 453 - 753 - - - - - 0 - 0 - - - - - 451 - 720 - - - - - 451 - 720 - - - - Settings - - - - - - true - - - 0 - - - - Decoding - - - - - 10 - 10 - 401 - 61 - - - - Do not display SU types - - - - - 10 - 26 - 381 - 21 - - - - 26 0A - - - - - - - 10 - 80 - 401 - 121 - - - - ACARS window - - - - - 160 - 27 - 201 - 19 - - - - Drop non text messages - - - - - - 25 - 25 - 48 - 25 - - - - - 0 - 25 - - - - - 16777215 - 25 - - - - Format - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 80 - 27 - 38 - 21 - - - - - 40 - 16777215 - - - - 0 - - - - 1 - - - - - 2 - - - - - 3 - - - - - - - 20 - 60 - 301 - 19 - - - - Beep on multi line text message - - - - - - 20 - 90 - 131 - 19 - - - - Output to UDP - - - - - - 150 - 90 - 231 - 21 - - - - you can output to multiple destinations -by placing a space between destinations. -eg "localhost:12345 localhost:12346" - - - localhost:18765 - - - - - - - 20 - 520 - 401 - 151 - - - - Audio source - - - - - 10 - 80 - 381 - 22 - - - - - - - 10 - 120 - 321 - 19 - - - - Enable widebandwidth (CPU intensive) - - - - - - 10 - 10 - 70 - 41 - - - - ZMQ Audio - - - - - - 200 - 20 - 191 - 20 - - - - - - - 130 - 20 - 61 - 25 - - - - - 0 - 25 - - - - - 16777215 - 25 - - - - Address - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 140 - 50 - 51 - 25 - - - - - 0 - 25 - - - - - 16777215 - 25 - - - - Topic - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 200 - 50 - 113 - 20 - - - - - - - - 10 - 310 - 401 - 71 - - - - Logging - - - - - 100 - 30 - 201 - 21 - - - - - - - 320 - 30 - 71 - 19 - - - - Enable - - - - - - 10 - 26 - 81 - 25 - - - - - 0 - 25 - - - - - 16777215 - 25 - - - - Directory - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 10 - 390 - 401 - 121 - - - - Images - - - - - 100 - 30 - 291 - 21 - - - - <html><head/><body><p>Plane images are stored as {AES}.png or {AES}.jpg in this folder. Additionally if a basestation.sqb database file is present JAERO will use this file for plane lookups.</p></body></html> - - - - - - 10 - 26 - 81 - 25 - - - - - 0 - 25 - - - - - 16777215 - 25 - - - - Directory - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 10 - 210 - 401 - 91 - - - - ADS data output - - - - - 20 - 30 - 241 - 20 - - - - Enable BaseStation format - - - - - - 250 - 30 - 141 - 22 - - - - localhost:30003 - - - - - - 20 - 60 - 161 - 19 - - - - Behave as client - - - - - - - Log Window - - - - - 120 - 28 - 291 - 21 - - - - <html><head/><body><p>URL for plane lookup. {AES} is the plane ICAO number in hex and {REG} is the registration.</p></body></html> - - - http://junzisun.com/aif/?q={AES}# - - - - - - 10 - 30 - 101 - 16 - - - - Plane lookup - - - - - - - 8 - 0 - - - - Voice Settings - - - - - 10 - 20 - 401 - 91 - - - - ZeroMQ - - - - - 20 - 20 - 101 - 16 - - - - Socket bind address - - - - - true - - - - 150 - 20 - 221 - 20 - - - - - 0 - 0 - - - - tcp://*:5550 - - - - - - - 10 - 120 - 401 - 61 - - - - AMBE - - - - - 20 - 20 - 111 - 17 - - - - AMBE enabled - - - - - - - - - - Qt::LeftToRight - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - false - - - - - - - - - buttonBox - accepted() - SettingsDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - SettingsDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - checkBoxZMQ - toggled(bool) - comboBoxsoundcard - setDisabled(bool) - - - 75 - 581 - - - 231 - 641 - - - - - checkBoxZMQ - toggled(bool) - lineEditZmqConnectAddress - setEnabled(bool) - - - 75 - 581 - - - 326 - 580 - - - - - checkBoxZMQ - toggled(bool) - lineEditZmqTopic - setEnabled(bool) - - - 75 - 581 - - - 287 - 610 - - - - - diff --git a/JAERO/tmp/debug/stuff/moc_predefs.h b/JAERO/tmp/debug/stuff/moc_predefs.h new file mode 100644 index 0000000..378eef5 --- /dev/null +++ b/JAERO/tmp/debug/stuff/moc_predefs.h @@ -0,0 +1,384 @@ +#define __DBL_MIN_EXP__ (-1021) +#define __FLT32X_MAX_EXP__ 1024 +#define __cpp_attributes 200809 +#define __UINT_LEAST16_MAX__ 0xffff +#define __ATOMIC_ACQUIRE 2 +#define __FLT128_MAX_10_EXP__ 4932 +#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F +#define __GCC_IEC_559_COMPLEX 2 +#define __UINT_LEAST8_TYPE__ unsigned char +#define __SIZEOF_FLOAT80__ 16 +#define _WIN32 1 +#define __INTMAX_C(c) c ## LL +#define __CHAR_BIT__ 8 +#define __UINT8_MAX__ 0xff +#define _WIN64 1 +#define __WINT_MAX__ 0xffff +#define __FLT32_MIN_EXP__ (-125) +#define __cpp_static_assert 200410 +#define __ORDER_LITTLE_ENDIAN__ 1234 +#define __SIZE_MAX__ 0xffffffffffffffffULL +#define __WCHAR_MAX__ 0xffff +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L) +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 +#define __GCC_IEC_559 2 +#define __FLT32X_DECIMAL_DIG__ 17 +#define __FLT_EVAL_METHOD__ 0 +#define __cpp_binary_literals 201304 +#define __FLT64_DECIMAL_DIG__ 17 +#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 +#define __x86_64 1 +#define __cpp_variadic_templates 200704 +#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL +#define __SIG_ATOMIC_TYPE__ int +#define __DBL_MIN_10_EXP__ (-307) +#define __FINITE_MATH_ONLY__ 0 +#define __GNUC_PATCHLEVEL__ 0 +#define __FLT32_HAS_DENORM__ 1 +#define __UINT_FAST8_MAX__ 0xff +#define __cpp_rvalue_reference 200610 +#define __has_include(STR) __has_include__(STR) +#define __DEC64_MAX_EXP__ 385 +#define __INT8_C(c) c +#define __INT_LEAST8_WIDTH__ 8 +#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL +#define __SHRT_MAX__ 0x7fff +#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L +#define __FLT64X_MAX_10_EXP__ 4932 +#define __UINT_LEAST8_MAX__ 0xff +#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 +#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128 +#define __UINTMAX_TYPE__ long long unsigned int +#define __DEC32_EPSILON__ 1E-6DF +#define __FLT_EVAL_METHOD_TS_18661_3__ 0 +#define __UINT32_MAX__ 0xffffffffU +#define __GXX_EXPERIMENTAL_CXX0X__ 1 +#define __LDBL_MAX_EXP__ 16384 +#define __FLT128_MIN_EXP__ (-16381) +#define __WINT_MIN__ 0 +#define __FLT128_MIN_10_EXP__ (-4931) +#define __INT_LEAST16_WIDTH__ 16 +#define __SCHAR_MAX__ 0x7f +#define __FLT128_MANT_DIG__ 113 +#define __WCHAR_MIN__ 0 +#define __INT64_C(c) c ## LL +#define __DBL_DIG__ 15 +#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 +#define __FLT64X_MANT_DIG__ 64 +#define __SIZEOF_INT__ 4 +#define __SIZEOF_POINTER__ 8 +#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 +#define __USER_LABEL_PREFIX__ +#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x +#define __STDC_HOSTED__ 1 +#define __WIN32 1 +#define __LDBL_HAS_INFINITY__ 1 +#define __WIN64 1 +#define __FLT32_DIG__ 6 +#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F +#define __GXX_WEAK__ 1 +#define __SHRT_WIDTH__ 16 +#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L +#define __DEC32_MAX__ 9.999999E96DF +#define __cpp_threadsafe_static_init 200806 +#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x +#define __MINGW32__ 1 +#define __FLT32X_HAS_INFINITY__ 1 +#define __INT32_MAX__ 0x7fffffff +#define __INT_WIDTH__ 32 +#define __SIZEOF_LONG__ 4 +#define __UINT16_C(c) c +#define __PTRDIFF_WIDTH__ 64 +#define __DECIMAL_DIG__ 21 +#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64 +#define __INTMAX_WIDTH__ 64 +#define __FLT64_MIN_EXP__ (-1021) +#define __has_include_next(STR) __has_include_next__(STR) +#define __FLT64X_MIN_10_EXP__ (-4931) +#define __LDBL_HAS_QUIET_NAN__ 1 +#define __FLT64_MANT_DIG__ 53 +#define _REENTRANT 1 +#define __GNUC__ 9 +#define __GXX_RTTI 1 +#define __MMX__ 1 +#define __cpp_delegating_constructors 200604 +#define __FLT_HAS_DENORM__ 1 +#define __SIZEOF_LONG_DOUBLE__ 16 +#define __BIGGEST_ALIGNMENT__ 16 +#define __STDC_UTF_16__ 1 +#define __FLT64_MAX_10_EXP__ 308 +#define __FLT32_HAS_INFINITY__ 1 +#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L) +#define __cpp_raw_strings 200710 +#define __INT_FAST32_MAX__ 0x7fffffff +#define __WINNT 1 +#define __DBL_HAS_INFINITY__ 1 +#define __WINNT__ 1 +#define __HAVE_SPECULATION_SAFE_VALUE 1 +#define __DEC32_MIN_EXP__ (-94) +#define __INTPTR_WIDTH__ 64 +#define __FLT32X_HAS_DENORM__ 1 +#define __INT_FAST16_TYPE__ short int +#define __STRICT_ANSI__ 1 +#define __LDBL_HAS_DENORM__ 1 +#define __cplusplus 201103L +#define __cpp_ref_qualifiers 200710 +#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +#define __INT_LEAST32_MAX__ 0x7fffffff +#define __DEC32_MIN__ 1E-95DF +#define __DEPRECATED 1 +#define __cpp_rvalue_references 200610 +#define __DBL_MAX_EXP__ 1024 +#define __WCHAR_WIDTH__ 16 +#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32 +#define __DEC128_EPSILON__ 1E-33DL +#define __SSE2_MATH__ 1 +#define __ATOMIC_HLE_RELEASE 131072 +#define __WIN32__ 1 +#define __PTRDIFF_MAX__ 0x7fffffffffffffffLL +#define __amd64 1 +#define __ATOMIC_HLE_ACQUIRE 65536 +#define __FLT32_HAS_QUIET_NAN__ 1 +#define __GNUG__ 9 +#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL +#define __SIZEOF_SIZE_T__ 8 +#define __cpp_nsdmi 200809 +#define __FLT64X_MIN_EXP__ (-16381) +#define __SIZEOF_WINT_T__ 2 +#define __LONG_LONG_WIDTH__ 64 +#define __cpp_initializer_lists 200806 +#define __FLT32_MAX_EXP__ 128 +#define __cpp_hex_float 201603 +#define __GCC_HAVE_DWARF2_CFI_ASM 1 +#define __GXX_ABI_VERSION 1013 +#define __FLT128_HAS_INFINITY__ 1 +#define __FLT_MIN_EXP__ (-125) +#define __cpp_lambdas 200907 +#define __FLT64X_HAS_QUIET_NAN__ 1 +#define __INT_FAST64_TYPE__ long long int +#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64 +#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L) +#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x +#define __DECIMAL_BID_FORMAT__ 1 +#define __GXX_TYPEINFO_EQUALITY_INLINE 0 +#define __FLT64_MIN_10_EXP__ (-307) +#define __FLT64X_DECIMAL_DIG__ 21 +#define __DEC128_MIN__ 1E-6143DL +#define __REGISTER_PREFIX__ +#define __UINT16_MAX__ 0xffff +#define __cdecl __attribute__((__cdecl__)) +#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32 +#define __UINT8_TYPE__ unsigned char +#define __NO_INLINE__ 1 +#define __FLT_MANT_DIG__ 24 +#define __LDBL_DECIMAL_DIG__ 21 +#define __VERSION__ "9.2.0" +#define __UINT64_C(c) c ## ULL +#define __cpp_unicode_characters 200704 +#define __GCC_ATOMIC_INT_LOCK_FREE 2 +#define __FLT128_MAX_EXP__ 16384 +#define __FLT32_MANT_DIG__ 24 +#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __FLT128_HAS_DENORM__ 1 +#define __FLT128_DIG__ 33 +#define __SCHAR_WIDTH__ 8 +#define __INT32_C(c) c +#define __DEC64_EPSILON__ 1E-15DD +#define __ORDER_PDP_ENDIAN__ 3412 +#define __DEC128_MIN_EXP__ (-6142) +#define __FLT32_MAX_10_EXP__ 38 +#define __INT_FAST32_TYPE__ int +#define __UINT_LEAST16_TYPE__ short unsigned int +#define __FLT64X_HAS_INFINITY__ 1 +#define __DBL_HAS_DENORM__ 1 +#define __INT16_MAX__ 0x7fff +#define __cpp_rtti 199711 +#define __SIZE_TYPE__ long long unsigned int +#define __UINT64_MAX__ 0xffffffffffffffffULL +#define __FLT64X_DIG__ 18 +#define __INT8_TYPE__ signed char +#define __GCC_ASM_FLAG_OUTPUTS__ 1 +#define __FLT_RADIX__ 2 +#define __INT_LEAST16_TYPE__ short int +#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L +#define __UINTMAX_C(c) c ## ULL +#define __k8 1 +#define __SEH__ 1 +#define __SIG_ATOMIC_MAX__ 0x7fffffff +#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 +#define __SIZEOF_PTRDIFF_T__ 8 +#define __FLT32X_MANT_DIG__ 53 +#define __x86_64__ 1 +#define __FLT32X_MIN_EXP__ (-1021) +#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF +#define __MSVCRT__ 1 +#define __INT_FAST16_MAX__ 0x7fff +#define __FLT64_DIG__ 15 +#define __UINT_FAST32_MAX__ 0xffffffffU +#define __UINT_LEAST64_TYPE__ long long unsigned int +#define __FLT_HAS_QUIET_NAN__ 1 +#define __FLT_MAX_10_EXP__ 38 +#define __LONG_MAX__ 0x7fffffffL +#define __FLT64X_HAS_DENORM__ 1 +#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL +#define __FLT_HAS_INFINITY__ 1 +#define __cpp_unicode_literals 200710 +#define __UINT_FAST16_TYPE__ short unsigned int +#define __DEC64_MAX__ 9.999999999999999E384DD +#define __INT_FAST32_WIDTH__ 32 +#define __CHAR16_TYPE__ short unsigned int +#define __PRAGMA_REDEFINE_EXTNAME 1 +#define __SIZE_WIDTH__ 64 +#define __SEG_FS 1 +#define __INT_LEAST16_MAX__ 0x7fff +#define __DEC64_MANT_DIG__ 16 +#define __INT64_MAX__ 0x7fffffffffffffffLL +#define __UINT_LEAST32_MAX__ 0xffffffffU +#define __SEG_GS 1 +#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32 +#define __GCC_ATOMIC_LONG_LOCK_FREE 2 +#define __SIG_ATOMIC_WIDTH__ 32 +#define __INT_LEAST64_TYPE__ long long int +#define __INT16_TYPE__ short int +#define __INT_LEAST8_TYPE__ signed char +#define __DEC32_MAX_EXP__ 97 +#define __INT_FAST8_MAX__ 0x7f +#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 +#define __INTPTR_MAX__ 0x7fffffffffffffffLL +#define __GXX_MERGED_TYPEINFO_NAMES 0 +#define __cpp_range_based_for 200907 +#define __FLT64_HAS_QUIET_NAN__ 1 +#define __stdcall __attribute__((__stdcall__)) +#define __FLT32_MIN_10_EXP__ (-37) +#define __SSE2__ 1 +#define __EXCEPTIONS 1 +#define __LDBL_MANT_DIG__ 64 +#define __DBL_HAS_QUIET_NAN__ 1 +#define __FLT64_HAS_INFINITY__ 1 +#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x +#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +#define __k8__ 1 +#define __INTPTR_TYPE__ long long int +#define __UINT16_TYPE__ short unsigned int +#define __WCHAR_TYPE__ short unsigned int +#define __SIZEOF_FLOAT__ 4 +#define __pic__ 1 +#define __UINTPTR_MAX__ 0xffffffffffffffffULL +#define __INT_FAST64_WIDTH__ 64 +#define __DEC64_MIN_EXP__ (-382) +#define __cpp_decltype 200707 +#define __FLT32_DECIMAL_DIG__ 9 +#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL +#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 +#define __FLT_DIG__ 6 +#define __FLT64X_MAX_EXP__ 16384 +#define __UINT_FAST64_TYPE__ long long unsigned int +#define __INT_MAX__ 0x7fffffff +#define __amd64__ 1 +#define __code_model_medium__ 1 +#define __INT64_TYPE__ long long int +#define __FLT_MAX_EXP__ 128 +#define __ORDER_BIG_ENDIAN__ 4321 +#define __DBL_MANT_DIG__ 53 +#define __cpp_inheriting_constructors 201511 +#define __SIZEOF_FLOAT128__ 16 +#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL +#define __DEC64_MIN__ 1E-383DD +#define __WINT_TYPE__ short unsigned int +#define __UINT_LEAST32_TYPE__ unsigned int +#define __SIZEOF_SHORT__ 2 +#define __SSE__ 1 +#define __LDBL_MIN_EXP__ (-16381) +#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64 +#define __WINT_WIDTH__ 16 +#define __INT_LEAST8_MAX__ 0x7f +#define __FLT32X_MAX_10_EXP__ 308 +#define __SIZEOF_INT128__ 16 +#define __WCHAR_UNSIGNED__ 1 +#define __LDBL_MAX_10_EXP__ 4932 +#define __ATOMIC_RELAXED 0 +#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L) +#define __thiscall __attribute__((__thiscall__)) +#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 +#define __UINT8_C(c) c +#define __FLT64_MAX_EXP__ 1024 +#define __INT_LEAST32_TYPE__ int +#define __SIZEOF_WCHAR_T__ 2 +#define __FLT128_HAS_QUIET_NAN__ 1 +#define __INT_FAST8_TYPE__ signed char +#define __fastcall __attribute__((__fastcall__)) +#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x +#define __GNUC_STDC_INLINE__ 1 +#define __FLT64_HAS_DENORM__ 1 +#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32 +#define __DBL_DECIMAL_DIG__ 17 +#define __STDC_UTF_32__ 1 +#define __INT_FAST8_WIDTH__ 8 +#define __FXSR__ 1 +#define __DEC_EVAL_METHOD__ 2 +#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x +#define __MINGW64__ 1 +#define __cpp_runtime_arrays 198712 +#define __UINT64_TYPE__ long long unsigned int +#define __UINT32_C(c) c ## U +#define __INTMAX_MAX__ 0x7fffffffffffffffLL +#define __cpp_alias_templates 200704 +#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F +#define __INT8_MAX__ 0x7f +#define __LONG_WIDTH__ 32 +#define __PIC__ 1 +#define __UINT_FAST32_TYPE__ unsigned int +#define __CHAR32_TYPE__ unsigned int +#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F +#define __cpp_constexpr 200704 +#define __INT32_TYPE__ int +#define __SIZEOF_DOUBLE__ 8 +#define __cpp_exceptions 199711 +#define __FLT_MIN_10_EXP__ (-37) +#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64 +#define __INT_LEAST32_WIDTH__ 32 +#define __INTMAX_TYPE__ long long int +#define _INTEGRAL_MAX_BITS 64 +#define __DEC128_MAX_EXP__ 6145 +#define __FLT32X_HAS_QUIET_NAN__ 1 +#define __ATOMIC_CONSUME 1 +#define __GNUC_MINOR__ 2 +#define __INT_FAST16_WIDTH__ 16 +#define __UINTMAX_MAX__ 0xffffffffffffffffULL +#define __DEC32_MANT_DIG__ 7 +#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x +#define __DBL_MAX_10_EXP__ 308 +#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L +#define __INT16_C(c) c +#define __STDC__ 1 +#define __FLT32X_DIG__ 15 +#define __PTRDIFF_TYPE__ long long int +#define __ATOMIC_SEQ_CST 5 +#define __UINT32_TYPE__ unsigned int +#define __FLT32X_MIN_10_EXP__ (-307) +#define __UINTPTR_TYPE__ long long unsigned int +#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD +#define __DEC128_MANT_DIG__ 34 +#define __LDBL_MIN_10_EXP__ (-4931) +#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 +#define __SSE_MATH__ 1 +#define __SIZEOF_LONG_LONG__ 8 +#define __cpp_user_defined_literals 200809 +#define __FLT128_DECIMAL_DIG__ 36 +#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 +#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x +#define __LDBL_DIG__ 18 +#define __FLT_DECIMAL_DIG__ 9 +#define __UINT_FAST16_MAX__ 0xffff +#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 +#define __INT_LEAST64_WIDTH__ 64 +#define __UINT_FAST8_TYPE__ unsigned char +#define __WIN64__ 1 +#define __ATOMIC_ACQ_REL 4 +#define __ATOMIC_RELEASE 3 +#define __declspec(x) __attribute__((x)) diff --git a/JAERO/tmp/release/stuff/moc_predefs.h b/JAERO/tmp/release/stuff/moc_predefs.h new file mode 100644 index 0000000..04320b0 --- /dev/null +++ b/JAERO/tmp/release/stuff/moc_predefs.h @@ -0,0 +1,383 @@ +#define __DBL_MIN_EXP__ (-1021) +#define __FLT32X_MAX_EXP__ 1024 +#define __cpp_attributes 200809 +#define __UINT_LEAST16_MAX__ 0xffff +#define __ATOMIC_ACQUIRE 2 +#define __FLT128_MAX_10_EXP__ 4932 +#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F +#define __GCC_IEC_559_COMPLEX 2 +#define __UINT_LEAST8_TYPE__ unsigned char +#define __SIZEOF_FLOAT80__ 16 +#define _WIN32 1 +#define __INTMAX_C(c) c ## LL +#define __CHAR_BIT__ 8 +#define __UINT8_MAX__ 0xff +#define _WIN64 1 +#define __WINT_MAX__ 0xffff +#define __FLT32_MIN_EXP__ (-125) +#define __cpp_static_assert 200410 +#define __ORDER_LITTLE_ENDIAN__ 1234 +#define __SIZE_MAX__ 0xffffffffffffffffULL +#define __WCHAR_MAX__ 0xffff +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L) +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 +#define __GCC_IEC_559 2 +#define __FLT32X_DECIMAL_DIG__ 17 +#define __FLT_EVAL_METHOD__ 0 +#define __cpp_binary_literals 201304 +#define __FLT64_DECIMAL_DIG__ 17 +#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 +#define __x86_64 1 +#define __cpp_variadic_templates 200704 +#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL +#define __SIG_ATOMIC_TYPE__ int +#define __DBL_MIN_10_EXP__ (-307) +#define __FINITE_MATH_ONLY__ 0 +#define __GNUC_PATCHLEVEL__ 0 +#define __FLT32_HAS_DENORM__ 1 +#define __UINT_FAST8_MAX__ 0xff +#define __cpp_rvalue_reference 200610 +#define __has_include(STR) __has_include__(STR) +#define __DEC64_MAX_EXP__ 385 +#define __INT8_C(c) c +#define __INT_LEAST8_WIDTH__ 8 +#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL +#define __SHRT_MAX__ 0x7fff +#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L +#define __FLT64X_MAX_10_EXP__ 4932 +#define __UINT_LEAST8_MAX__ 0xff +#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 +#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128 +#define __UINTMAX_TYPE__ long long unsigned int +#define __DEC32_EPSILON__ 1E-6DF +#define __FLT_EVAL_METHOD_TS_18661_3__ 0 +#define __OPTIMIZE__ 1 +#define __UINT32_MAX__ 0xffffffffU +#define __GXX_EXPERIMENTAL_CXX0X__ 1 +#define __LDBL_MAX_EXP__ 16384 +#define __FLT128_MIN_EXP__ (-16381) +#define __WINT_MIN__ 0 +#define __FLT128_MIN_10_EXP__ (-4931) +#define __INT_LEAST16_WIDTH__ 16 +#define __SCHAR_MAX__ 0x7f +#define __FLT128_MANT_DIG__ 113 +#define __WCHAR_MIN__ 0 +#define __INT64_C(c) c ## LL +#define __DBL_DIG__ 15 +#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 +#define __FLT64X_MANT_DIG__ 64 +#define __SIZEOF_INT__ 4 +#define __SIZEOF_POINTER__ 8 +#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 +#define __USER_LABEL_PREFIX__ +#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x +#define __STDC_HOSTED__ 1 +#define __WIN32 1 +#define __LDBL_HAS_INFINITY__ 1 +#define __WIN64 1 +#define __FLT32_DIG__ 6 +#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F +#define __GXX_WEAK__ 1 +#define __SHRT_WIDTH__ 16 +#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L +#define __DEC32_MAX__ 9.999999E96DF +#define __cpp_threadsafe_static_init 200806 +#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x +#define __MINGW32__ 1 +#define __FLT32X_HAS_INFINITY__ 1 +#define __INT32_MAX__ 0x7fffffff +#define __INT_WIDTH__ 32 +#define __SIZEOF_LONG__ 4 +#define __UINT16_C(c) c +#define __PTRDIFF_WIDTH__ 64 +#define __DECIMAL_DIG__ 21 +#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64 +#define __INTMAX_WIDTH__ 64 +#define __FLT64_MIN_EXP__ (-1021) +#define __has_include_next(STR) __has_include_next__(STR) +#define __FLT64X_MIN_10_EXP__ (-4931) +#define __LDBL_HAS_QUIET_NAN__ 1 +#define __FLT64_MANT_DIG__ 53 +#define _REENTRANT 1 +#define __GNUC__ 9 +#define __GXX_RTTI 1 +#define __MMX__ 1 +#define __cpp_delegating_constructors 200604 +#define __FLT_HAS_DENORM__ 1 +#define __SIZEOF_LONG_DOUBLE__ 16 +#define __BIGGEST_ALIGNMENT__ 16 +#define __STDC_UTF_16__ 1 +#define __FLT64_MAX_10_EXP__ 308 +#define __FLT32_HAS_INFINITY__ 1 +#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L) +#define __cpp_raw_strings 200710 +#define __INT_FAST32_MAX__ 0x7fffffff +#define __WINNT 1 +#define __DBL_HAS_INFINITY__ 1 +#define __WINNT__ 1 +#define __HAVE_SPECULATION_SAFE_VALUE 1 +#define __DEC32_MIN_EXP__ (-94) +#define __INTPTR_WIDTH__ 64 +#define __FLT32X_HAS_DENORM__ 1 +#define __INT_FAST16_TYPE__ short int +#define __STRICT_ANSI__ 1 +#define __LDBL_HAS_DENORM__ 1 +#define __cplusplus 201103L +#define __cpp_ref_qualifiers 200710 +#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +#define __INT_LEAST32_MAX__ 0x7fffffff +#define __DEC32_MIN__ 1E-95DF +#define __DEPRECATED 1 +#define __cpp_rvalue_references 200610 +#define __DBL_MAX_EXP__ 1024 +#define __WCHAR_WIDTH__ 16 +#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32 +#define __DEC128_EPSILON__ 1E-33DL +#define __SSE2_MATH__ 1 +#define __ATOMIC_HLE_RELEASE 131072 +#define __WIN32__ 1 +#define __PTRDIFF_MAX__ 0x7fffffffffffffffLL +#define __amd64 1 +#define __ATOMIC_HLE_ACQUIRE 65536 +#define __FLT32_HAS_QUIET_NAN__ 1 +#define __GNUG__ 9 +#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL +#define __SIZEOF_SIZE_T__ 8 +#define __cpp_nsdmi 200809 +#define __FLT64X_MIN_EXP__ (-16381) +#define __SIZEOF_WINT_T__ 2 +#define __LONG_LONG_WIDTH__ 64 +#define __cpp_initializer_lists 200806 +#define __FLT32_MAX_EXP__ 128 +#define __cpp_hex_float 201603 +#define __GXX_ABI_VERSION 1013 +#define __FLT128_HAS_INFINITY__ 1 +#define __FLT_MIN_EXP__ (-125) +#define __cpp_lambdas 200907 +#define __FLT64X_HAS_QUIET_NAN__ 1 +#define __INT_FAST64_TYPE__ long long int +#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64 +#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L) +#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x +#define __DECIMAL_BID_FORMAT__ 1 +#define __GXX_TYPEINFO_EQUALITY_INLINE 0 +#define __FLT64_MIN_10_EXP__ (-307) +#define __FLT64X_DECIMAL_DIG__ 21 +#define __DEC128_MIN__ 1E-6143DL +#define __REGISTER_PREFIX__ +#define __UINT16_MAX__ 0xffff +#define __cdecl __attribute__((__cdecl__)) +#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32 +#define __UINT8_TYPE__ unsigned char +#define __FLT_MANT_DIG__ 24 +#define __LDBL_DECIMAL_DIG__ 21 +#define __VERSION__ "9.2.0" +#define __UINT64_C(c) c ## ULL +#define __cpp_unicode_characters 200704 +#define __GCC_ATOMIC_INT_LOCK_FREE 2 +#define __FLT128_MAX_EXP__ 16384 +#define __FLT32_MANT_DIG__ 24 +#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __FLT128_HAS_DENORM__ 1 +#define __FLT128_DIG__ 33 +#define __SCHAR_WIDTH__ 8 +#define __INT32_C(c) c +#define __DEC64_EPSILON__ 1E-15DD +#define __ORDER_PDP_ENDIAN__ 3412 +#define __DEC128_MIN_EXP__ (-6142) +#define __FLT32_MAX_10_EXP__ 38 +#define __INT_FAST32_TYPE__ int +#define __UINT_LEAST16_TYPE__ short unsigned int +#define __FLT64X_HAS_INFINITY__ 1 +#define __DBL_HAS_DENORM__ 1 +#define __INT16_MAX__ 0x7fff +#define __cpp_rtti 199711 +#define __SIZE_TYPE__ long long unsigned int +#define __UINT64_MAX__ 0xffffffffffffffffULL +#define __FLT64X_DIG__ 18 +#define __INT8_TYPE__ signed char +#define __GCC_ASM_FLAG_OUTPUTS__ 1 +#define __FLT_RADIX__ 2 +#define __INT_LEAST16_TYPE__ short int +#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L +#define __UINTMAX_C(c) c ## ULL +#define __k8 1 +#define __SEH__ 1 +#define __SIG_ATOMIC_MAX__ 0x7fffffff +#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 +#define __SIZEOF_PTRDIFF_T__ 8 +#define __FLT32X_MANT_DIG__ 53 +#define __x86_64__ 1 +#define __FLT32X_MIN_EXP__ (-1021) +#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF +#define __MSVCRT__ 1 +#define __INT_FAST16_MAX__ 0x7fff +#define __FLT64_DIG__ 15 +#define __UINT_FAST32_MAX__ 0xffffffffU +#define __UINT_LEAST64_TYPE__ long long unsigned int +#define __FLT_HAS_QUIET_NAN__ 1 +#define __FLT_MAX_10_EXP__ 38 +#define __LONG_MAX__ 0x7fffffffL +#define __FLT64X_HAS_DENORM__ 1 +#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL +#define __FLT_HAS_INFINITY__ 1 +#define __cpp_unicode_literals 200710 +#define __UINT_FAST16_TYPE__ short unsigned int +#define __DEC64_MAX__ 9.999999999999999E384DD +#define __INT_FAST32_WIDTH__ 32 +#define __CHAR16_TYPE__ short unsigned int +#define __PRAGMA_REDEFINE_EXTNAME 1 +#define __SIZE_WIDTH__ 64 +#define __SEG_FS 1 +#define __INT_LEAST16_MAX__ 0x7fff +#define __DEC64_MANT_DIG__ 16 +#define __INT64_MAX__ 0x7fffffffffffffffLL +#define __UINT_LEAST32_MAX__ 0xffffffffU +#define __SEG_GS 1 +#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32 +#define __GCC_ATOMIC_LONG_LOCK_FREE 2 +#define __SIG_ATOMIC_WIDTH__ 32 +#define __INT_LEAST64_TYPE__ long long int +#define __INT16_TYPE__ short int +#define __INT_LEAST8_TYPE__ signed char +#define __DEC32_MAX_EXP__ 97 +#define __INT_FAST8_MAX__ 0x7f +#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 +#define __INTPTR_MAX__ 0x7fffffffffffffffLL +#define __GXX_MERGED_TYPEINFO_NAMES 0 +#define __cpp_range_based_for 200907 +#define __FLT64_HAS_QUIET_NAN__ 1 +#define __stdcall __attribute__((__stdcall__)) +#define __FLT32_MIN_10_EXP__ (-37) +#define __SSE2__ 1 +#define __EXCEPTIONS 1 +#define __LDBL_MANT_DIG__ 64 +#define __DBL_HAS_QUIET_NAN__ 1 +#define __FLT64_HAS_INFINITY__ 1 +#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x +#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +#define __k8__ 1 +#define __INTPTR_TYPE__ long long int +#define __UINT16_TYPE__ short unsigned int +#define __WCHAR_TYPE__ short unsigned int +#define __SIZEOF_FLOAT__ 4 +#define __pic__ 1 +#define __UINTPTR_MAX__ 0xffffffffffffffffULL +#define __INT_FAST64_WIDTH__ 64 +#define __DEC64_MIN_EXP__ (-382) +#define __cpp_decltype 200707 +#define __FLT32_DECIMAL_DIG__ 9 +#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL +#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 +#define __FLT_DIG__ 6 +#define __FLT64X_MAX_EXP__ 16384 +#define __UINT_FAST64_TYPE__ long long unsigned int +#define __INT_MAX__ 0x7fffffff +#define __amd64__ 1 +#define __code_model_medium__ 1 +#define __INT64_TYPE__ long long int +#define __FLT_MAX_EXP__ 128 +#define __ORDER_BIG_ENDIAN__ 4321 +#define __DBL_MANT_DIG__ 53 +#define __cpp_inheriting_constructors 201511 +#define __SIZEOF_FLOAT128__ 16 +#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL +#define __DEC64_MIN__ 1E-383DD +#define __WINT_TYPE__ short unsigned int +#define __UINT_LEAST32_TYPE__ unsigned int +#define __SIZEOF_SHORT__ 2 +#define __SSE__ 1 +#define __LDBL_MIN_EXP__ (-16381) +#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64 +#define __WINT_WIDTH__ 16 +#define __INT_LEAST8_MAX__ 0x7f +#define __FLT32X_MAX_10_EXP__ 308 +#define __SIZEOF_INT128__ 16 +#define __WCHAR_UNSIGNED__ 1 +#define __LDBL_MAX_10_EXP__ 4932 +#define __ATOMIC_RELAXED 0 +#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L) +#define __thiscall __attribute__((__thiscall__)) +#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 +#define __UINT8_C(c) c +#define __FLT64_MAX_EXP__ 1024 +#define __INT_LEAST32_TYPE__ int +#define __SIZEOF_WCHAR_T__ 2 +#define __FLT128_HAS_QUIET_NAN__ 1 +#define __INT_FAST8_TYPE__ signed char +#define __fastcall __attribute__((__fastcall__)) +#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x +#define __GNUC_STDC_INLINE__ 1 +#define __FLT64_HAS_DENORM__ 1 +#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32 +#define __DBL_DECIMAL_DIG__ 17 +#define __STDC_UTF_32__ 1 +#define __INT_FAST8_WIDTH__ 8 +#define __FXSR__ 1 +#define __DEC_EVAL_METHOD__ 2 +#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x +#define __MINGW64__ 1 +#define __cpp_runtime_arrays 198712 +#define __UINT64_TYPE__ long long unsigned int +#define __UINT32_C(c) c ## U +#define __INTMAX_MAX__ 0x7fffffffffffffffLL +#define __cpp_alias_templates 200704 +#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F +#define __INT8_MAX__ 0x7f +#define __LONG_WIDTH__ 32 +#define __PIC__ 1 +#define __UINT_FAST32_TYPE__ unsigned int +#define __CHAR32_TYPE__ unsigned int +#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F +#define __cpp_constexpr 200704 +#define __INT32_TYPE__ int +#define __SIZEOF_DOUBLE__ 8 +#define __cpp_exceptions 199711 +#define __FLT_MIN_10_EXP__ (-37) +#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64 +#define __INT_LEAST32_WIDTH__ 32 +#define __INTMAX_TYPE__ long long int +#define _INTEGRAL_MAX_BITS 64 +#define __DEC128_MAX_EXP__ 6145 +#define __FLT32X_HAS_QUIET_NAN__ 1 +#define __ATOMIC_CONSUME 1 +#define __GNUC_MINOR__ 2 +#define __INT_FAST16_WIDTH__ 16 +#define __UINTMAX_MAX__ 0xffffffffffffffffULL +#define __DEC32_MANT_DIG__ 7 +#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x +#define __DBL_MAX_10_EXP__ 308 +#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L +#define __INT16_C(c) c +#define __STDC__ 1 +#define __FLT32X_DIG__ 15 +#define __PTRDIFF_TYPE__ long long int +#define __ATOMIC_SEQ_CST 5 +#define __UINT32_TYPE__ unsigned int +#define __FLT32X_MIN_10_EXP__ (-307) +#define __UINTPTR_TYPE__ long long unsigned int +#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD +#define __DEC128_MANT_DIG__ 34 +#define __LDBL_MIN_10_EXP__ (-4931) +#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 +#define __SSE_MATH__ 1 +#define __SIZEOF_LONG_LONG__ 8 +#define __cpp_user_defined_literals 200809 +#define __FLT128_DECIMAL_DIG__ 36 +#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 +#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x +#define __LDBL_DIG__ 18 +#define __FLT_DECIMAL_DIG__ 9 +#define __UINT_FAST16_MAX__ 0xffff +#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 +#define __INT_LEAST64_WIDTH__ 64 +#define __UINT_FAST8_TYPE__ unsigned char +#define __WIN64__ 1 +#define __ATOMIC_ACQ_REL 4 +#define __ATOMIC_RELEASE 3 +#define __declspec(x) __attribute__((x)) From ac9dc50c4d0c1ebb360c903b3bc36bd6077682c7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jul 2021 13:21:22 +0200 Subject: [PATCH 04/22] removed some build artifacts --- JAERO/tmp/debug/stuff/moc_predefs.h | 384 -------------------------- JAERO/tmp/release/stuff/moc_predefs.h | 383 ------------------------- 2 files changed, 767 deletions(-) delete mode 100644 JAERO/tmp/debug/stuff/moc_predefs.h delete mode 100644 JAERO/tmp/release/stuff/moc_predefs.h diff --git a/JAERO/tmp/debug/stuff/moc_predefs.h b/JAERO/tmp/debug/stuff/moc_predefs.h deleted file mode 100644 index 378eef5..0000000 --- a/JAERO/tmp/debug/stuff/moc_predefs.h +++ /dev/null @@ -1,384 +0,0 @@ -#define __DBL_MIN_EXP__ (-1021) -#define __FLT32X_MAX_EXP__ 1024 -#define __cpp_attributes 200809 -#define __UINT_LEAST16_MAX__ 0xffff -#define __ATOMIC_ACQUIRE 2 -#define __FLT128_MAX_10_EXP__ 4932 -#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F -#define __GCC_IEC_559_COMPLEX 2 -#define __UINT_LEAST8_TYPE__ unsigned char -#define __SIZEOF_FLOAT80__ 16 -#define _WIN32 1 -#define __INTMAX_C(c) c ## LL -#define __CHAR_BIT__ 8 -#define __UINT8_MAX__ 0xff -#define _WIN64 1 -#define __WINT_MAX__ 0xffff -#define __FLT32_MIN_EXP__ (-125) -#define __cpp_static_assert 200410 -#define __ORDER_LITTLE_ENDIAN__ 1234 -#define __SIZE_MAX__ 0xffffffffffffffffULL -#define __WCHAR_MAX__ 0xffff -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 -#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L) -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 -#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 -#define __GCC_IEC_559 2 -#define __FLT32X_DECIMAL_DIG__ 17 -#define __FLT_EVAL_METHOD__ 0 -#define __cpp_binary_literals 201304 -#define __FLT64_DECIMAL_DIG__ 17 -#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 -#define __x86_64 1 -#define __cpp_variadic_templates 200704 -#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL -#define __SIG_ATOMIC_TYPE__ int -#define __DBL_MIN_10_EXP__ (-307) -#define __FINITE_MATH_ONLY__ 0 -#define __GNUC_PATCHLEVEL__ 0 -#define __FLT32_HAS_DENORM__ 1 -#define __UINT_FAST8_MAX__ 0xff -#define __cpp_rvalue_reference 200610 -#define __has_include(STR) __has_include__(STR) -#define __DEC64_MAX_EXP__ 385 -#define __INT8_C(c) c -#define __INT_LEAST8_WIDTH__ 8 -#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL -#define __SHRT_MAX__ 0x7fff -#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L -#define __FLT64X_MAX_10_EXP__ 4932 -#define __UINT_LEAST8_MAX__ 0xff -#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 -#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128 -#define __UINTMAX_TYPE__ long long unsigned int -#define __DEC32_EPSILON__ 1E-6DF -#define __FLT_EVAL_METHOD_TS_18661_3__ 0 -#define __UINT32_MAX__ 0xffffffffU -#define __GXX_EXPERIMENTAL_CXX0X__ 1 -#define __LDBL_MAX_EXP__ 16384 -#define __FLT128_MIN_EXP__ (-16381) -#define __WINT_MIN__ 0 -#define __FLT128_MIN_10_EXP__ (-4931) -#define __INT_LEAST16_WIDTH__ 16 -#define __SCHAR_MAX__ 0x7f -#define __FLT128_MANT_DIG__ 113 -#define __WCHAR_MIN__ 0 -#define __INT64_C(c) c ## LL -#define __DBL_DIG__ 15 -#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 -#define __FLT64X_MANT_DIG__ 64 -#define __SIZEOF_INT__ 4 -#define __SIZEOF_POINTER__ 8 -#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 -#define __USER_LABEL_PREFIX__ -#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x -#define __STDC_HOSTED__ 1 -#define __WIN32 1 -#define __LDBL_HAS_INFINITY__ 1 -#define __WIN64 1 -#define __FLT32_DIG__ 6 -#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F -#define __GXX_WEAK__ 1 -#define __SHRT_WIDTH__ 16 -#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L -#define __DEC32_MAX__ 9.999999E96DF -#define __cpp_threadsafe_static_init 200806 -#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x -#define __MINGW32__ 1 -#define __FLT32X_HAS_INFINITY__ 1 -#define __INT32_MAX__ 0x7fffffff -#define __INT_WIDTH__ 32 -#define __SIZEOF_LONG__ 4 -#define __UINT16_C(c) c -#define __PTRDIFF_WIDTH__ 64 -#define __DECIMAL_DIG__ 21 -#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64 -#define __INTMAX_WIDTH__ 64 -#define __FLT64_MIN_EXP__ (-1021) -#define __has_include_next(STR) __has_include_next__(STR) -#define __FLT64X_MIN_10_EXP__ (-4931) -#define __LDBL_HAS_QUIET_NAN__ 1 -#define __FLT64_MANT_DIG__ 53 -#define _REENTRANT 1 -#define __GNUC__ 9 -#define __GXX_RTTI 1 -#define __MMX__ 1 -#define __cpp_delegating_constructors 200604 -#define __FLT_HAS_DENORM__ 1 -#define __SIZEOF_LONG_DOUBLE__ 16 -#define __BIGGEST_ALIGNMENT__ 16 -#define __STDC_UTF_16__ 1 -#define __FLT64_MAX_10_EXP__ 308 -#define __FLT32_HAS_INFINITY__ 1 -#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L) -#define __cpp_raw_strings 200710 -#define __INT_FAST32_MAX__ 0x7fffffff -#define __WINNT 1 -#define __DBL_HAS_INFINITY__ 1 -#define __WINNT__ 1 -#define __HAVE_SPECULATION_SAFE_VALUE 1 -#define __DEC32_MIN_EXP__ (-94) -#define __INTPTR_WIDTH__ 64 -#define __FLT32X_HAS_DENORM__ 1 -#define __INT_FAST16_TYPE__ short int -#define __STRICT_ANSI__ 1 -#define __LDBL_HAS_DENORM__ 1 -#define __cplusplus 201103L -#define __cpp_ref_qualifiers 200710 -#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL -#define __INT_LEAST32_MAX__ 0x7fffffff -#define __DEC32_MIN__ 1E-95DF -#define __DEPRECATED 1 -#define __cpp_rvalue_references 200610 -#define __DBL_MAX_EXP__ 1024 -#define __WCHAR_WIDTH__ 16 -#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32 -#define __DEC128_EPSILON__ 1E-33DL -#define __SSE2_MATH__ 1 -#define __ATOMIC_HLE_RELEASE 131072 -#define __WIN32__ 1 -#define __PTRDIFF_MAX__ 0x7fffffffffffffffLL -#define __amd64 1 -#define __ATOMIC_HLE_ACQUIRE 65536 -#define __FLT32_HAS_QUIET_NAN__ 1 -#define __GNUG__ 9 -#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL -#define __SIZEOF_SIZE_T__ 8 -#define __cpp_nsdmi 200809 -#define __FLT64X_MIN_EXP__ (-16381) -#define __SIZEOF_WINT_T__ 2 -#define __LONG_LONG_WIDTH__ 64 -#define __cpp_initializer_lists 200806 -#define __FLT32_MAX_EXP__ 128 -#define __cpp_hex_float 201603 -#define __GCC_HAVE_DWARF2_CFI_ASM 1 -#define __GXX_ABI_VERSION 1013 -#define __FLT128_HAS_INFINITY__ 1 -#define __FLT_MIN_EXP__ (-125) -#define __cpp_lambdas 200907 -#define __FLT64X_HAS_QUIET_NAN__ 1 -#define __INT_FAST64_TYPE__ long long int -#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64 -#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L) -#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x -#define __DECIMAL_BID_FORMAT__ 1 -#define __GXX_TYPEINFO_EQUALITY_INLINE 0 -#define __FLT64_MIN_10_EXP__ (-307) -#define __FLT64X_DECIMAL_DIG__ 21 -#define __DEC128_MIN__ 1E-6143DL -#define __REGISTER_PREFIX__ -#define __UINT16_MAX__ 0xffff -#define __cdecl __attribute__((__cdecl__)) -#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32 -#define __UINT8_TYPE__ unsigned char -#define __NO_INLINE__ 1 -#define __FLT_MANT_DIG__ 24 -#define __LDBL_DECIMAL_DIG__ 21 -#define __VERSION__ "9.2.0" -#define __UINT64_C(c) c ## ULL -#define __cpp_unicode_characters 200704 -#define __GCC_ATOMIC_INT_LOCK_FREE 2 -#define __FLT128_MAX_EXP__ 16384 -#define __FLT32_MANT_DIG__ 24 -#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __FLT128_HAS_DENORM__ 1 -#define __FLT128_DIG__ 33 -#define __SCHAR_WIDTH__ 8 -#define __INT32_C(c) c -#define __DEC64_EPSILON__ 1E-15DD -#define __ORDER_PDP_ENDIAN__ 3412 -#define __DEC128_MIN_EXP__ (-6142) -#define __FLT32_MAX_10_EXP__ 38 -#define __INT_FAST32_TYPE__ int -#define __UINT_LEAST16_TYPE__ short unsigned int -#define __FLT64X_HAS_INFINITY__ 1 -#define __DBL_HAS_DENORM__ 1 -#define __INT16_MAX__ 0x7fff -#define __cpp_rtti 199711 -#define __SIZE_TYPE__ long long unsigned int -#define __UINT64_MAX__ 0xffffffffffffffffULL -#define __FLT64X_DIG__ 18 -#define __INT8_TYPE__ signed char -#define __GCC_ASM_FLAG_OUTPUTS__ 1 -#define __FLT_RADIX__ 2 -#define __INT_LEAST16_TYPE__ short int -#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L -#define __UINTMAX_C(c) c ## ULL -#define __k8 1 -#define __SEH__ 1 -#define __SIG_ATOMIC_MAX__ 0x7fffffff -#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 -#define __SIZEOF_PTRDIFF_T__ 8 -#define __FLT32X_MANT_DIG__ 53 -#define __x86_64__ 1 -#define __FLT32X_MIN_EXP__ (-1021) -#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF -#define __MSVCRT__ 1 -#define __INT_FAST16_MAX__ 0x7fff -#define __FLT64_DIG__ 15 -#define __UINT_FAST32_MAX__ 0xffffffffU -#define __UINT_LEAST64_TYPE__ long long unsigned int -#define __FLT_HAS_QUIET_NAN__ 1 -#define __FLT_MAX_10_EXP__ 38 -#define __LONG_MAX__ 0x7fffffffL -#define __FLT64X_HAS_DENORM__ 1 -#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL -#define __FLT_HAS_INFINITY__ 1 -#define __cpp_unicode_literals 200710 -#define __UINT_FAST16_TYPE__ short unsigned int -#define __DEC64_MAX__ 9.999999999999999E384DD -#define __INT_FAST32_WIDTH__ 32 -#define __CHAR16_TYPE__ short unsigned int -#define __PRAGMA_REDEFINE_EXTNAME 1 -#define __SIZE_WIDTH__ 64 -#define __SEG_FS 1 -#define __INT_LEAST16_MAX__ 0x7fff -#define __DEC64_MANT_DIG__ 16 -#define __INT64_MAX__ 0x7fffffffffffffffLL -#define __UINT_LEAST32_MAX__ 0xffffffffU -#define __SEG_GS 1 -#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32 -#define __GCC_ATOMIC_LONG_LOCK_FREE 2 -#define __SIG_ATOMIC_WIDTH__ 32 -#define __INT_LEAST64_TYPE__ long long int -#define __INT16_TYPE__ short int -#define __INT_LEAST8_TYPE__ signed char -#define __DEC32_MAX_EXP__ 97 -#define __INT_FAST8_MAX__ 0x7f -#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 -#define __INTPTR_MAX__ 0x7fffffffffffffffLL -#define __GXX_MERGED_TYPEINFO_NAMES 0 -#define __cpp_range_based_for 200907 -#define __FLT64_HAS_QUIET_NAN__ 1 -#define __stdcall __attribute__((__stdcall__)) -#define __FLT32_MIN_10_EXP__ (-37) -#define __SSE2__ 1 -#define __EXCEPTIONS 1 -#define __LDBL_MANT_DIG__ 64 -#define __DBL_HAS_QUIET_NAN__ 1 -#define __FLT64_HAS_INFINITY__ 1 -#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x -#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) -#define __k8__ 1 -#define __INTPTR_TYPE__ long long int -#define __UINT16_TYPE__ short unsigned int -#define __WCHAR_TYPE__ short unsigned int -#define __SIZEOF_FLOAT__ 4 -#define __pic__ 1 -#define __UINTPTR_MAX__ 0xffffffffffffffffULL -#define __INT_FAST64_WIDTH__ 64 -#define __DEC64_MIN_EXP__ (-382) -#define __cpp_decltype 200707 -#define __FLT32_DECIMAL_DIG__ 9 -#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL -#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 -#define __FLT_DIG__ 6 -#define __FLT64X_MAX_EXP__ 16384 -#define __UINT_FAST64_TYPE__ long long unsigned int -#define __INT_MAX__ 0x7fffffff -#define __amd64__ 1 -#define __code_model_medium__ 1 -#define __INT64_TYPE__ long long int -#define __FLT_MAX_EXP__ 128 -#define __ORDER_BIG_ENDIAN__ 4321 -#define __DBL_MANT_DIG__ 53 -#define __cpp_inheriting_constructors 201511 -#define __SIZEOF_FLOAT128__ 16 -#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL -#define __DEC64_MIN__ 1E-383DD -#define __WINT_TYPE__ short unsigned int -#define __UINT_LEAST32_TYPE__ unsigned int -#define __SIZEOF_SHORT__ 2 -#define __SSE__ 1 -#define __LDBL_MIN_EXP__ (-16381) -#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64 -#define __WINT_WIDTH__ 16 -#define __INT_LEAST8_MAX__ 0x7f -#define __FLT32X_MAX_10_EXP__ 308 -#define __SIZEOF_INT128__ 16 -#define __WCHAR_UNSIGNED__ 1 -#define __LDBL_MAX_10_EXP__ 4932 -#define __ATOMIC_RELAXED 0 -#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L) -#define __thiscall __attribute__((__thiscall__)) -#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 -#define __UINT8_C(c) c -#define __FLT64_MAX_EXP__ 1024 -#define __INT_LEAST32_TYPE__ int -#define __SIZEOF_WCHAR_T__ 2 -#define __FLT128_HAS_QUIET_NAN__ 1 -#define __INT_FAST8_TYPE__ signed char -#define __fastcall __attribute__((__fastcall__)) -#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x -#define __GNUC_STDC_INLINE__ 1 -#define __FLT64_HAS_DENORM__ 1 -#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32 -#define __DBL_DECIMAL_DIG__ 17 -#define __STDC_UTF_32__ 1 -#define __INT_FAST8_WIDTH__ 8 -#define __FXSR__ 1 -#define __DEC_EVAL_METHOD__ 2 -#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x -#define __MINGW64__ 1 -#define __cpp_runtime_arrays 198712 -#define __UINT64_TYPE__ long long unsigned int -#define __UINT32_C(c) c ## U -#define __INTMAX_MAX__ 0x7fffffffffffffffLL -#define __cpp_alias_templates 200704 -#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F -#define __INT8_MAX__ 0x7f -#define __LONG_WIDTH__ 32 -#define __PIC__ 1 -#define __UINT_FAST32_TYPE__ unsigned int -#define __CHAR32_TYPE__ unsigned int -#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F -#define __cpp_constexpr 200704 -#define __INT32_TYPE__ int -#define __SIZEOF_DOUBLE__ 8 -#define __cpp_exceptions 199711 -#define __FLT_MIN_10_EXP__ (-37) -#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64 -#define __INT_LEAST32_WIDTH__ 32 -#define __INTMAX_TYPE__ long long int -#define _INTEGRAL_MAX_BITS 64 -#define __DEC128_MAX_EXP__ 6145 -#define __FLT32X_HAS_QUIET_NAN__ 1 -#define __ATOMIC_CONSUME 1 -#define __GNUC_MINOR__ 2 -#define __INT_FAST16_WIDTH__ 16 -#define __UINTMAX_MAX__ 0xffffffffffffffffULL -#define __DEC32_MANT_DIG__ 7 -#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x -#define __DBL_MAX_10_EXP__ 308 -#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L -#define __INT16_C(c) c -#define __STDC__ 1 -#define __FLT32X_DIG__ 15 -#define __PTRDIFF_TYPE__ long long int -#define __ATOMIC_SEQ_CST 5 -#define __UINT32_TYPE__ unsigned int -#define __FLT32X_MIN_10_EXP__ (-307) -#define __UINTPTR_TYPE__ long long unsigned int -#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD -#define __DEC128_MANT_DIG__ 34 -#define __LDBL_MIN_10_EXP__ (-4931) -#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 -#define __SSE_MATH__ 1 -#define __SIZEOF_LONG_LONG__ 8 -#define __cpp_user_defined_literals 200809 -#define __FLT128_DECIMAL_DIG__ 36 -#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 -#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x -#define __LDBL_DIG__ 18 -#define __FLT_DECIMAL_DIG__ 9 -#define __UINT_FAST16_MAX__ 0xffff -#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 -#define __INT_LEAST64_WIDTH__ 64 -#define __UINT_FAST8_TYPE__ unsigned char -#define __WIN64__ 1 -#define __ATOMIC_ACQ_REL 4 -#define __ATOMIC_RELEASE 3 -#define __declspec(x) __attribute__((x)) diff --git a/JAERO/tmp/release/stuff/moc_predefs.h b/JAERO/tmp/release/stuff/moc_predefs.h deleted file mode 100644 index 04320b0..0000000 --- a/JAERO/tmp/release/stuff/moc_predefs.h +++ /dev/null @@ -1,383 +0,0 @@ -#define __DBL_MIN_EXP__ (-1021) -#define __FLT32X_MAX_EXP__ 1024 -#define __cpp_attributes 200809 -#define __UINT_LEAST16_MAX__ 0xffff -#define __ATOMIC_ACQUIRE 2 -#define __FLT128_MAX_10_EXP__ 4932 -#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F -#define __GCC_IEC_559_COMPLEX 2 -#define __UINT_LEAST8_TYPE__ unsigned char -#define __SIZEOF_FLOAT80__ 16 -#define _WIN32 1 -#define __INTMAX_C(c) c ## LL -#define __CHAR_BIT__ 8 -#define __UINT8_MAX__ 0xff -#define _WIN64 1 -#define __WINT_MAX__ 0xffff -#define __FLT32_MIN_EXP__ (-125) -#define __cpp_static_assert 200410 -#define __ORDER_LITTLE_ENDIAN__ 1234 -#define __SIZE_MAX__ 0xffffffffffffffffULL -#define __WCHAR_MAX__ 0xffff -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 -#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L) -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 -#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 -#define __GCC_IEC_559 2 -#define __FLT32X_DECIMAL_DIG__ 17 -#define __FLT_EVAL_METHOD__ 0 -#define __cpp_binary_literals 201304 -#define __FLT64_DECIMAL_DIG__ 17 -#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 -#define __x86_64 1 -#define __cpp_variadic_templates 200704 -#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL -#define __SIG_ATOMIC_TYPE__ int -#define __DBL_MIN_10_EXP__ (-307) -#define __FINITE_MATH_ONLY__ 0 -#define __GNUC_PATCHLEVEL__ 0 -#define __FLT32_HAS_DENORM__ 1 -#define __UINT_FAST8_MAX__ 0xff -#define __cpp_rvalue_reference 200610 -#define __has_include(STR) __has_include__(STR) -#define __DEC64_MAX_EXP__ 385 -#define __INT8_C(c) c -#define __INT_LEAST8_WIDTH__ 8 -#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL -#define __SHRT_MAX__ 0x7fff -#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L -#define __FLT64X_MAX_10_EXP__ 4932 -#define __UINT_LEAST8_MAX__ 0xff -#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 -#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128 -#define __UINTMAX_TYPE__ long long unsigned int -#define __DEC32_EPSILON__ 1E-6DF -#define __FLT_EVAL_METHOD_TS_18661_3__ 0 -#define __OPTIMIZE__ 1 -#define __UINT32_MAX__ 0xffffffffU -#define __GXX_EXPERIMENTAL_CXX0X__ 1 -#define __LDBL_MAX_EXP__ 16384 -#define __FLT128_MIN_EXP__ (-16381) -#define __WINT_MIN__ 0 -#define __FLT128_MIN_10_EXP__ (-4931) -#define __INT_LEAST16_WIDTH__ 16 -#define __SCHAR_MAX__ 0x7f -#define __FLT128_MANT_DIG__ 113 -#define __WCHAR_MIN__ 0 -#define __INT64_C(c) c ## LL -#define __DBL_DIG__ 15 -#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 -#define __FLT64X_MANT_DIG__ 64 -#define __SIZEOF_INT__ 4 -#define __SIZEOF_POINTER__ 8 -#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 -#define __USER_LABEL_PREFIX__ -#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x -#define __STDC_HOSTED__ 1 -#define __WIN32 1 -#define __LDBL_HAS_INFINITY__ 1 -#define __WIN64 1 -#define __FLT32_DIG__ 6 -#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F -#define __GXX_WEAK__ 1 -#define __SHRT_WIDTH__ 16 -#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L -#define __DEC32_MAX__ 9.999999E96DF -#define __cpp_threadsafe_static_init 200806 -#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x -#define __MINGW32__ 1 -#define __FLT32X_HAS_INFINITY__ 1 -#define __INT32_MAX__ 0x7fffffff -#define __INT_WIDTH__ 32 -#define __SIZEOF_LONG__ 4 -#define __UINT16_C(c) c -#define __PTRDIFF_WIDTH__ 64 -#define __DECIMAL_DIG__ 21 -#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64 -#define __INTMAX_WIDTH__ 64 -#define __FLT64_MIN_EXP__ (-1021) -#define __has_include_next(STR) __has_include_next__(STR) -#define __FLT64X_MIN_10_EXP__ (-4931) -#define __LDBL_HAS_QUIET_NAN__ 1 -#define __FLT64_MANT_DIG__ 53 -#define _REENTRANT 1 -#define __GNUC__ 9 -#define __GXX_RTTI 1 -#define __MMX__ 1 -#define __cpp_delegating_constructors 200604 -#define __FLT_HAS_DENORM__ 1 -#define __SIZEOF_LONG_DOUBLE__ 16 -#define __BIGGEST_ALIGNMENT__ 16 -#define __STDC_UTF_16__ 1 -#define __FLT64_MAX_10_EXP__ 308 -#define __FLT32_HAS_INFINITY__ 1 -#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L) -#define __cpp_raw_strings 200710 -#define __INT_FAST32_MAX__ 0x7fffffff -#define __WINNT 1 -#define __DBL_HAS_INFINITY__ 1 -#define __WINNT__ 1 -#define __HAVE_SPECULATION_SAFE_VALUE 1 -#define __DEC32_MIN_EXP__ (-94) -#define __INTPTR_WIDTH__ 64 -#define __FLT32X_HAS_DENORM__ 1 -#define __INT_FAST16_TYPE__ short int -#define __STRICT_ANSI__ 1 -#define __LDBL_HAS_DENORM__ 1 -#define __cplusplus 201103L -#define __cpp_ref_qualifiers 200710 -#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL -#define __INT_LEAST32_MAX__ 0x7fffffff -#define __DEC32_MIN__ 1E-95DF -#define __DEPRECATED 1 -#define __cpp_rvalue_references 200610 -#define __DBL_MAX_EXP__ 1024 -#define __WCHAR_WIDTH__ 16 -#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32 -#define __DEC128_EPSILON__ 1E-33DL -#define __SSE2_MATH__ 1 -#define __ATOMIC_HLE_RELEASE 131072 -#define __WIN32__ 1 -#define __PTRDIFF_MAX__ 0x7fffffffffffffffLL -#define __amd64 1 -#define __ATOMIC_HLE_ACQUIRE 65536 -#define __FLT32_HAS_QUIET_NAN__ 1 -#define __GNUG__ 9 -#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL -#define __SIZEOF_SIZE_T__ 8 -#define __cpp_nsdmi 200809 -#define __FLT64X_MIN_EXP__ (-16381) -#define __SIZEOF_WINT_T__ 2 -#define __LONG_LONG_WIDTH__ 64 -#define __cpp_initializer_lists 200806 -#define __FLT32_MAX_EXP__ 128 -#define __cpp_hex_float 201603 -#define __GXX_ABI_VERSION 1013 -#define __FLT128_HAS_INFINITY__ 1 -#define __FLT_MIN_EXP__ (-125) -#define __cpp_lambdas 200907 -#define __FLT64X_HAS_QUIET_NAN__ 1 -#define __INT_FAST64_TYPE__ long long int -#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64 -#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L) -#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x -#define __DECIMAL_BID_FORMAT__ 1 -#define __GXX_TYPEINFO_EQUALITY_INLINE 0 -#define __FLT64_MIN_10_EXP__ (-307) -#define __FLT64X_DECIMAL_DIG__ 21 -#define __DEC128_MIN__ 1E-6143DL -#define __REGISTER_PREFIX__ -#define __UINT16_MAX__ 0xffff -#define __cdecl __attribute__((__cdecl__)) -#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32 -#define __UINT8_TYPE__ unsigned char -#define __FLT_MANT_DIG__ 24 -#define __LDBL_DECIMAL_DIG__ 21 -#define __VERSION__ "9.2.0" -#define __UINT64_C(c) c ## ULL -#define __cpp_unicode_characters 200704 -#define __GCC_ATOMIC_INT_LOCK_FREE 2 -#define __FLT128_MAX_EXP__ 16384 -#define __FLT32_MANT_DIG__ 24 -#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __FLT128_HAS_DENORM__ 1 -#define __FLT128_DIG__ 33 -#define __SCHAR_WIDTH__ 8 -#define __INT32_C(c) c -#define __DEC64_EPSILON__ 1E-15DD -#define __ORDER_PDP_ENDIAN__ 3412 -#define __DEC128_MIN_EXP__ (-6142) -#define __FLT32_MAX_10_EXP__ 38 -#define __INT_FAST32_TYPE__ int -#define __UINT_LEAST16_TYPE__ short unsigned int -#define __FLT64X_HAS_INFINITY__ 1 -#define __DBL_HAS_DENORM__ 1 -#define __INT16_MAX__ 0x7fff -#define __cpp_rtti 199711 -#define __SIZE_TYPE__ long long unsigned int -#define __UINT64_MAX__ 0xffffffffffffffffULL -#define __FLT64X_DIG__ 18 -#define __INT8_TYPE__ signed char -#define __GCC_ASM_FLAG_OUTPUTS__ 1 -#define __FLT_RADIX__ 2 -#define __INT_LEAST16_TYPE__ short int -#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L -#define __UINTMAX_C(c) c ## ULL -#define __k8 1 -#define __SEH__ 1 -#define __SIG_ATOMIC_MAX__ 0x7fffffff -#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 -#define __SIZEOF_PTRDIFF_T__ 8 -#define __FLT32X_MANT_DIG__ 53 -#define __x86_64__ 1 -#define __FLT32X_MIN_EXP__ (-1021) -#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF -#define __MSVCRT__ 1 -#define __INT_FAST16_MAX__ 0x7fff -#define __FLT64_DIG__ 15 -#define __UINT_FAST32_MAX__ 0xffffffffU -#define __UINT_LEAST64_TYPE__ long long unsigned int -#define __FLT_HAS_QUIET_NAN__ 1 -#define __FLT_MAX_10_EXP__ 38 -#define __LONG_MAX__ 0x7fffffffL -#define __FLT64X_HAS_DENORM__ 1 -#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL -#define __FLT_HAS_INFINITY__ 1 -#define __cpp_unicode_literals 200710 -#define __UINT_FAST16_TYPE__ short unsigned int -#define __DEC64_MAX__ 9.999999999999999E384DD -#define __INT_FAST32_WIDTH__ 32 -#define __CHAR16_TYPE__ short unsigned int -#define __PRAGMA_REDEFINE_EXTNAME 1 -#define __SIZE_WIDTH__ 64 -#define __SEG_FS 1 -#define __INT_LEAST16_MAX__ 0x7fff -#define __DEC64_MANT_DIG__ 16 -#define __INT64_MAX__ 0x7fffffffffffffffLL -#define __UINT_LEAST32_MAX__ 0xffffffffU -#define __SEG_GS 1 -#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32 -#define __GCC_ATOMIC_LONG_LOCK_FREE 2 -#define __SIG_ATOMIC_WIDTH__ 32 -#define __INT_LEAST64_TYPE__ long long int -#define __INT16_TYPE__ short int -#define __INT_LEAST8_TYPE__ signed char -#define __DEC32_MAX_EXP__ 97 -#define __INT_FAST8_MAX__ 0x7f -#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 -#define __INTPTR_MAX__ 0x7fffffffffffffffLL -#define __GXX_MERGED_TYPEINFO_NAMES 0 -#define __cpp_range_based_for 200907 -#define __FLT64_HAS_QUIET_NAN__ 1 -#define __stdcall __attribute__((__stdcall__)) -#define __FLT32_MIN_10_EXP__ (-37) -#define __SSE2__ 1 -#define __EXCEPTIONS 1 -#define __LDBL_MANT_DIG__ 64 -#define __DBL_HAS_QUIET_NAN__ 1 -#define __FLT64_HAS_INFINITY__ 1 -#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x -#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) -#define __k8__ 1 -#define __INTPTR_TYPE__ long long int -#define __UINT16_TYPE__ short unsigned int -#define __WCHAR_TYPE__ short unsigned int -#define __SIZEOF_FLOAT__ 4 -#define __pic__ 1 -#define __UINTPTR_MAX__ 0xffffffffffffffffULL -#define __INT_FAST64_WIDTH__ 64 -#define __DEC64_MIN_EXP__ (-382) -#define __cpp_decltype 200707 -#define __FLT32_DECIMAL_DIG__ 9 -#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL -#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 -#define __FLT_DIG__ 6 -#define __FLT64X_MAX_EXP__ 16384 -#define __UINT_FAST64_TYPE__ long long unsigned int -#define __INT_MAX__ 0x7fffffff -#define __amd64__ 1 -#define __code_model_medium__ 1 -#define __INT64_TYPE__ long long int -#define __FLT_MAX_EXP__ 128 -#define __ORDER_BIG_ENDIAN__ 4321 -#define __DBL_MANT_DIG__ 53 -#define __cpp_inheriting_constructors 201511 -#define __SIZEOF_FLOAT128__ 16 -#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL -#define __DEC64_MIN__ 1E-383DD -#define __WINT_TYPE__ short unsigned int -#define __UINT_LEAST32_TYPE__ unsigned int -#define __SIZEOF_SHORT__ 2 -#define __SSE__ 1 -#define __LDBL_MIN_EXP__ (-16381) -#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64 -#define __WINT_WIDTH__ 16 -#define __INT_LEAST8_MAX__ 0x7f -#define __FLT32X_MAX_10_EXP__ 308 -#define __SIZEOF_INT128__ 16 -#define __WCHAR_UNSIGNED__ 1 -#define __LDBL_MAX_10_EXP__ 4932 -#define __ATOMIC_RELAXED 0 -#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L) -#define __thiscall __attribute__((__thiscall__)) -#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 -#define __UINT8_C(c) c -#define __FLT64_MAX_EXP__ 1024 -#define __INT_LEAST32_TYPE__ int -#define __SIZEOF_WCHAR_T__ 2 -#define __FLT128_HAS_QUIET_NAN__ 1 -#define __INT_FAST8_TYPE__ signed char -#define __fastcall __attribute__((__fastcall__)) -#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x -#define __GNUC_STDC_INLINE__ 1 -#define __FLT64_HAS_DENORM__ 1 -#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32 -#define __DBL_DECIMAL_DIG__ 17 -#define __STDC_UTF_32__ 1 -#define __INT_FAST8_WIDTH__ 8 -#define __FXSR__ 1 -#define __DEC_EVAL_METHOD__ 2 -#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x -#define __MINGW64__ 1 -#define __cpp_runtime_arrays 198712 -#define __UINT64_TYPE__ long long unsigned int -#define __UINT32_C(c) c ## U -#define __INTMAX_MAX__ 0x7fffffffffffffffLL -#define __cpp_alias_templates 200704 -#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F -#define __INT8_MAX__ 0x7f -#define __LONG_WIDTH__ 32 -#define __PIC__ 1 -#define __UINT_FAST32_TYPE__ unsigned int -#define __CHAR32_TYPE__ unsigned int -#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F -#define __cpp_constexpr 200704 -#define __INT32_TYPE__ int -#define __SIZEOF_DOUBLE__ 8 -#define __cpp_exceptions 199711 -#define __FLT_MIN_10_EXP__ (-37) -#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64 -#define __INT_LEAST32_WIDTH__ 32 -#define __INTMAX_TYPE__ long long int -#define _INTEGRAL_MAX_BITS 64 -#define __DEC128_MAX_EXP__ 6145 -#define __FLT32X_HAS_QUIET_NAN__ 1 -#define __ATOMIC_CONSUME 1 -#define __GNUC_MINOR__ 2 -#define __INT_FAST16_WIDTH__ 16 -#define __UINTMAX_MAX__ 0xffffffffffffffffULL -#define __DEC32_MANT_DIG__ 7 -#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x -#define __DBL_MAX_10_EXP__ 308 -#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L -#define __INT16_C(c) c -#define __STDC__ 1 -#define __FLT32X_DIG__ 15 -#define __PTRDIFF_TYPE__ long long int -#define __ATOMIC_SEQ_CST 5 -#define __UINT32_TYPE__ unsigned int -#define __FLT32X_MIN_10_EXP__ (-307) -#define __UINTPTR_TYPE__ long long unsigned int -#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD -#define __DEC128_MANT_DIG__ 34 -#define __LDBL_MIN_10_EXP__ (-4931) -#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 -#define __SSE_MATH__ 1 -#define __SIZEOF_LONG_LONG__ 8 -#define __cpp_user_defined_literals 200809 -#define __FLT128_DECIMAL_DIG__ 36 -#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 -#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x -#define __LDBL_DIG__ 18 -#define __FLT_DECIMAL_DIG__ 9 -#define __UINT_FAST16_MAX__ 0xffff -#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 -#define __INT_LEAST64_WIDTH__ 64 -#define __UINT_FAST8_TYPE__ unsigned char -#define __WIN64__ 1 -#define __ATOMIC_ACQ_REL 4 -#define __ATOMIC_RELEASE 3 -#define __declspec(x) __attribute__((x)) From 096d91b66ee7a1f4a13829382da47678b0d9f555 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jul 2021 13:21:31 +0200 Subject: [PATCH 05/22] removed some build artifacts --- JAERO/.qmake.stash | 22 ---------------------- JAERO/jaero.qrc | 31 ------------------------------- 2 files changed, 53 deletions(-) delete mode 100644 JAERO/.qmake.stash delete mode 100644 JAERO/jaero.qrc diff --git a/JAERO/.qmake.stash b/JAERO/.qmake.stash deleted file mode 100644 index e530957..0000000 --- a/JAERO/.qmake.stash +++ /dev/null @@ -1,22 +0,0 @@ -QMAKE_CXX.QT_COMPILER_STDCXX = 201402L -QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 9 -QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 2 -QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0 -QMAKE_CXX.COMPILER_MACROS = \ - QT_COMPILER_STDCXX \ - QMAKE_GCC_MAJOR_VERSION \ - QMAKE_GCC_MINOR_VERSION \ - QMAKE_GCC_PATCH_VERSION -QMAKE_CXX.INCDIRS = \ - C:/msys64/mingw64/include/c++/9.2.0 \ - C:/msys64/mingw64/include/c++/9.2.0/x86_64-w64-mingw32 \ - C:/msys64/mingw64/include/c++/9.2.0/backward \ - C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/include \ - C:/msys64/mingw64/include \ - C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/include-fixed \ - C:/msys64/mingw64/x86_64-w64-mingw32/include -QMAKE_CXX.LIBDIRS = \ - C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0 \ - C:/msys64/mingw64/lib/gcc \ - C:/msys64/mingw64/x86_64-w64-mingw32/lib \ - C:/msys64/mingw64/lib diff --git a/JAERO/jaero.qrc b/JAERO/jaero.qrc deleted file mode 100644 index 980f79c..0000000 --- a/JAERO/jaero.qrc +++ /dev/null @@ -1,31 +0,0 @@ - - - images/application-exit.png - images/clear.png - images/connect.png - images/disconnect.png - images/settings.png - images/red_led.svg - images/green_led.svg - images/off_led.svg - images/primary-binary.svg - images/primary-modem.svg - images/rx.svg - images/tx.svg - images/eighth note.svg - images/beacon.svg - images/log.png - images/arrow-right-left-512px.svg - images/arrow-up-down-512px.svg - images/stopsort-512px.svg - images/Plane_clip_art.svg - images/globe.svg - sounds/beep.wav - images/export.svg - images/import.svg - images/sound.png - images/sound-off2.png - images/cpu.png - images/green_cpu.png - - From c1f9eddc84088f82fc5ae55b30548657dc139875 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jul 2021 16:13:28 +0200 Subject: [PATCH 06/22] revert pro file --- JAERO/JAERO.pro | 76 ++++++++----------------------------------------- 1 file changed, 12 insertions(+), 64 deletions(-) diff --git a/JAERO/JAERO.pro b/JAERO/JAERO.pro index cf49b36..93b4803 100644 --- a/JAERO/JAERO.pro +++ b/JAERO/JAERO.pro @@ -21,8 +21,7 @@ TARGET = JAERO TEMPLATE = app INSTALL_PATH = /opt/jaero -JFFT_PATH = C:/work/git_repos/JFFT/ -EXT_DEP_PATH=C:/work/svn/JAERO +JFFT_PATH = ../../JFFT/ QMAKE_CXXFLAGS += -std=c++11 @@ -126,6 +125,16 @@ HEADERS += mainwindow.h \ audioreceiver.h +# Tell the qcustomplot header that it will be used as library: +DEFINES += QCUSTOMPLOT_USE_LIBRARY +#qcustom plot is called different names on different systems +win32 { +#message("windows") +LIBS += -lqcustomplot2 +} else { +#message("not windows") +LIBS += -lqcustomplot +} FORMS += mainwindow.ui \ gui_classes/settingsdialog.ui \ @@ -153,46 +162,8 @@ QMAKE_CXXFLAGS_RELEASE += -O3 # add the desired -O3 if not present #QMAKE_CXXFLAGS_RELEASE *= -O3 - - -win32 { -#on windows the libcorrect dlls are here -INCLUDEPATH +=$$EXT_DEP_PATH/libcorrect/include -contains(QT_ARCH, i386) { - #message("32-bit") - LIBS += -L$$EXT_DEP_PATH/libcorrect/lib/32 -} else { - #message("64-bit") - LIBS += -L$$EXT_DEP_PATH/libcorrect/lib/64 -} -LIBS += -llibcorrect -} - -win32 { -# libacars support -INCLUDEPATH +=$$EXT_DEP_PATH/libacars-2.1.2 -LIBS += -L$$EXT_DEP_PATH/libacars-2.1.2/build/libacars -#in windows use the dynamic lib rather than the static one even when stattically compiling - -LIBS += -lacars-2.dll -} else { -LIBS += -lacars-2 -} - -win32: LIBS += -L$$EXT_DEP_PATH/libzmq/lib/ -llibzmq-v120-mt-4_0_4 - -INCLUDEPATH += $$EXT_DEP_PATH/libzmq/include -DEPENDPATH += $$EXT_DEP_PATH/libzmq/include - -#for static building order seems to matter -LIBS += -lcorrect -lvorbis -lvorbisenc -logg - - -#for audio compressor #for static building order seems to matter -INCLUDEPATH += $$EXT_DEP_PATH/libvorbis-1.3.6/include -LIBS += -L$$EXT_DEP_PATH/libvorbis-1.3.6/lib/.libs -lvorbis -lvorbisenc -LIBS += -L$$EXT_DEP_PATH/libogg-1.3.3/src/.libs -logg +LIBS += -lcorrect -lvorbis -lvorbisenc -logg -lacars -llibzmq #desktop desktop.path = /usr/share/applications @@ -218,26 +189,3 @@ INSTALLS += target QMAKE_CXXFLAGS += '-Wno-deprecated-copy' #QMAKE_CXXFLAGS += '-Werror=format-security' - -win32: LIBS += -L$$PWD/../../../svn/build-qcustomplot-Desktop_Qt_MinGW_w64_64bit_MSYS2-Release/release/ -lqcustomplot - -INCLUDEPATH += $$PWD/../../../svn/qcustomplot -DEPENDPATH += $$PWD/../../../svn/qcustomplot - -win32:!win32-g++: PRE_TARGETDEPS += $$PWD/../../../svn/build-qcustomplot-Desktop_Qt_MinGW_w64_64bit_MSYS2-Release/release/qcustomplot.lib -else:win32-g++: PRE_TARGETDEPS += $$PWD/../../../svn/build-qcustomplot-Desktop_Qt_MinGW_w64_64bit_MSYS2-Release/release/libqcustomplot.a - -#define where we store everything so when using the command line we don't make the main directory messy. -CONFIG(debug, debug|release) { - DESTDIR = $$PWD/debug - OBJECTS_DIR = $$PWD/tmp/debug/stuff - MOC_DIR = $$PWD/tmp/debug/stuff - UI_DIR = $$PWD/tmp/debug/stuff - RCC_DIR = $$PWD/tmp/debug/stuff -} else { - DESTDIR = $$PWD/release - OBJECTS_DIR = $$PWD/tmp/release/stuff - MOC_DIR = $$PWD/tmp/release/stuff - UI_DIR = $$PWD/tmp/release/stuff - RCC_DIR = $$PWD/tmp/release/stuff -} From 320e8a1fdb7063552217a185dbd705b3d61d5b5d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jul 2021 16:22:58 +0200 Subject: [PATCH 07/22] added qrc file --- JAERO/jaero.qrc | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 JAERO/jaero.qrc diff --git a/JAERO/jaero.qrc b/JAERO/jaero.qrc new file mode 100644 index 0000000..de6a130 --- /dev/null +++ b/JAERO/jaero.qrc @@ -0,0 +1,31 @@ + + + images/application-exit.png + images/clear.png + images/connect.png + images/disconnect.png + images/settings.png + images/red_led.svg + images/green_led.svg + images/off_led.svg + images/primary-binary.svg + images/primary-modem.svg + images/rx.svg + images/tx.svg + images/eighth note.svg + images/beacon.svg + images/log.png + images/arrow-right-left-512px.svg + images/arrow-up-down-512px.svg + images/stopsort-512px.svg + images/Plane_clip_art.svg + images/globe.svg + sounds/beep.wav + images/export.svg + images/import.svg + images/sound.png + images/sound-off2.png + images/cpu.png + images/green_cpu.png + + \ No newline at end of file From c77d75b5395c879694d0484099bc5c823b64697e Mon Sep 17 00:00:00 2001 From: jeroenbeijer <31091871+jeroenbeijer@users.noreply.github.com> Date: Wed, 21 Jul 2021 16:41:06 +0200 Subject: [PATCH 08/22] Update ci-windows-build.sh --- ci-windows-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-windows-build.sh b/ci-windows-build.sh index 5229612..1a0b2ba 100755 --- a/ci-windows-build.sh +++ b/ci-windows-build.sh @@ -14,7 +14,7 @@ #fail on first error set -e -pacman -S --needed --noconfirm git mingw-w64-x86_64-toolchain autoconf libtool mingw-w64-x86_64-cpputest mingw-w64-x86_64-qt5 mingw-w64-x86_64-cmake mingw-w64-x86_64-libvorbis zip p7zip unzip +pacman -S --needed --noconfirm git mingw-w64-x86_64-toolchain autoconf libtool mingw-w64-x86_64-cpputest mingw-w64-x86_64-qt5 mingw-w64-x86_64-cmake mingw-w64-x86_64-libvorbis zip p7zip unzip zeromq #get script path SCRIPT=$(realpath $0) From 19a3deb8bad28b2d0fd4b14152fdf4771c98e103 Mon Sep 17 00:00:00 2001 From: jeroenbeijer <31091871+jeroenbeijer@users.noreply.github.com> Date: Wed, 21 Jul 2021 16:55:29 +0200 Subject: [PATCH 09/22] Update ci-windows-build.yml --- .github/workflows/ci-windows-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-windows-build.yml b/.github/workflows/ci-windows-build.yml index 51dca61..ed4aef8 100644 --- a/.github/workflows/ci-windows-build.yml +++ b/.github/workflows/ci-windows-build.yml @@ -20,7 +20,7 @@ jobs: with: msystem: MINGW64 update: true - install: git mingw-w64-x86_64-toolchain autoconf libtool mingw-w64-x86_64-cpputest mingw-w64-x86_64-qt5 mingw-w64-x86_64-cmake mingw-w64-x86_64-libvorbis zip p7zip unzip + install: git mingw-w64-x86_64-toolchain autoconf libtool mingw-w64-x86_64-cpputest mingw-w64-x86_64-qt5 mingw-w64-x86_64-cmake mingw-w64-x86_64-libvorbis mingw-w64-x86_64-zeromq zip p7zip unzip # build for windows - name: Windows-CI-Build if: ${{ matrix.os == 'windows-latest' }} From 7df187bd6106a374fdd64ea2456f5299dd1d4b4b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jul 2021 18:47:08 +0200 Subject: [PATCH 10/22] trying to fix the ci build --- ci-windows-build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-windows-build.sh b/ci-windows-build.sh index 1a0b2ba..87e7f18 100755 --- a/ci-windows-build.sh +++ b/ci-windows-build.sh @@ -14,7 +14,7 @@ #fail on first error set -e -pacman -S --needed --noconfirm git mingw-w64-x86_64-toolchain autoconf libtool mingw-w64-x86_64-cpputest mingw-w64-x86_64-qt5 mingw-w64-x86_64-cmake mingw-w64-x86_64-libvorbis zip p7zip unzip zeromq +pacman -S --needed --noconfirm git mingw-w64-x86_64-toolchain autoconf libtool mingw-w64-x86_64-cpputest mingw-w64-x86_64-qt5 mingw-w64-x86_64-cmake mingw-w64-x86_64-libvorbis zip p7zip unzip mingw-w64-x86_64-zeromq #get script path SCRIPT=$(realpath $0) @@ -123,6 +123,7 @@ cp /mingw64/bin/libintl-8.dll $PWD cp /mingw64/bin/libpcre-1.dll $PWD cp /mingw64/bin/libbrotlicommon.dll $PWD cp /mingw64/bin/libiconv-2.dll $PWD +cp /mingw64/bin/libzmq.dll $PWD #7za.exe not needed anymore #cp /usr/lib/p7zip/7za.exe $PWD #cp /usr/bin/msys-stdc++-6.dll $PWD From 08d933da3a577c55210e373643b39170669c7fb6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jul 2021 19:01:55 +0200 Subject: [PATCH 11/22] trying to fix the ci build --- ci-linux-build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-linux-build.sh b/ci-linux-build.sh index c588658..43265c2 100755 --- a/ci-linux-build.sh +++ b/ci-linux-build.sh @@ -17,7 +17,7 @@ set -e if [[ ! $(sudo echo 0) ]]; then exit; fi #install dependancies and build tools -sudo apt-get install qt5-default cpputest build-essential qtmultimedia5-dev cmake libvorbis-dev libogg-dev libqt5multimedia5-plugins checkinstall libqcustomplot-dev libqt5svg5-dev -y +sudo apt-get install qt5-default cpputest build-essential qtmultimedia5-dev cmake libvorbis-dev libogg-dev libqt5multimedia5-plugins checkinstall libqcustomplot-dev libqt5svg5-dev libzmq3-dev -y #get script path SCRIPT=$(realpath $0) @@ -170,7 +170,7 @@ Package: ${PACKAGE_NAME} Source: ${PACKAGE_SOURCE} Section: base Priority: extra -Depends: qt5-default (>= 5.12), qtmultimedia5-dev, libvorbis-dev, libogg-dev, libqt5multimedia5-plugins, libqcustomplot-dev, libqt5svg5-dev +Depends: qt5-default (>= 5.12), qtmultimedia5-dev, libvorbis-dev, libogg-dev, libqt5multimedia5-plugins, libqcustomplot-dev, libqt5svg5-dev, libzmq3-dev Provides: ${PACKAGE_NAME} Maintainer: ${MAINTAINER} Version: ${PACKAGE_VERSION%_*} From 8c7a9e61fd23546123e9a559aae7c92c952bb801 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jul 2021 20:15:25 +0200 Subject: [PATCH 12/22] winsock2 not on unix --- JAERO/mainwindow.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/JAERO/mainwindow.h b/JAERO/mainwindow.h index 71f5696..fa0487b 100644 --- a/JAERO/mainwindow.h +++ b/JAERO/mainwindow.h @@ -5,7 +5,9 @@ #include #include +#ifdef _WIN32 #include "winsock2.h" +#endif #include "audiooqpskdemodulator.h" #include "audiomskdemodulator.h" From 8dfcba454fffce077de199562106bd40b5592372 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jul 2021 20:51:52 +0200 Subject: [PATCH 13/22] trying to fix the ci build --- JAERO/JAERO.pro | 6 +++--- JAERO/mainwindow.cpp | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/JAERO/JAERO.pro b/JAERO/JAERO.pro index 93b4803..4432b56 100644 --- a/JAERO/JAERO.pro +++ b/JAERO/JAERO.pro @@ -130,10 +130,10 @@ DEFINES += QCUSTOMPLOT_USE_LIBRARY #qcustom plot is called different names on different systems win32 { #message("windows") -LIBS += -lqcustomplot2 +LIBS += -lqcustomplot2 -llibzmq } else { #message("not windows") -LIBS += -lqcustomplot +LIBS += -lqcustomplot -lzmq } FORMS += mainwindow.ui \ @@ -163,7 +163,7 @@ QMAKE_CXXFLAGS_RELEASE += -O3 #QMAKE_CXXFLAGS_RELEASE *= -O3 #for static building order seems to matter -LIBS += -lcorrect -lvorbis -lvorbisenc -logg -lacars -llibzmq +LIBS += -lcorrect -lvorbis -lvorbisenc -logg -lacars #desktop desktop.path = /usr/share/applications diff --git a/JAERO/mainwindow.cpp b/JAERO/mainwindow.cpp index 58eebd2..6e8963c 100644 --- a/JAERO/mainwindow.cpp +++ b/JAERO/mainwindow.cpp @@ -13,7 +13,6 @@ #endif #include "databasetext.h" -#include "zmq_utils.h" #include "zmq.h" From 044f1941218aef77058a797836307f1d0bfeac2d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jul 2021 23:19:17 +0200 Subject: [PATCH 14/22] added libsodium to release --- ci-windows-build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-windows-build.sh b/ci-windows-build.sh index 87e7f18..246f745 100755 --- a/ci-windows-build.sh +++ b/ci-windows-build.sh @@ -124,6 +124,7 @@ cp /mingw64/bin/libpcre-1.dll $PWD cp /mingw64/bin/libbrotlicommon.dll $PWD cp /mingw64/bin/libiconv-2.dll $PWD cp /mingw64/bin/libzmq.dll $PWD +cp /mingw64/bin/libsodium-23.dll $PWD #7za.exe not needed anymore #cp /usr/lib/p7zip/7za.exe $PWD #cp /usr/bin/msys-stdc++-6.dll $PWD From f23c9003cabe5aea8252d90344cfeb1fe0fb2e27 Mon Sep 17 00:00:00 2001 From: Jonti Olds Date: Thu, 22 Jul 2021 11:02:05 +1200 Subject: [PATCH 15/22] Update .gitignore .qmake.cache and .qmake.stash need not be in root dir --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ff69e0f..281a0c8 100644 --- a/.gitignore +++ b/.gitignore @@ -32,8 +32,8 @@ qrc_*.cpp Thumbs.db *.res *.rc -/.qmake.cache -/.qmake.stash +.qmake.cache +.qmake.stash # qtcreator generated files *.pro.user* From a1f0470b2646a103c7ee1d8d780d3ab65acc4aa1 Mon Sep 17 00:00:00 2001 From: jontio Date: Thu, 22 Jul 2021 19:35:19 +1200 Subject: [PATCH 16/22] bit of tidying and removal of 96k setting for 10500burst --- JAERO/gui_classes/settingsdialog.cpp | 2 +- JAERO/gui_classes/settingsdialog.ui | 36 ++++--- JAERO/mainwindow.cpp | 135 ++++++--------------------- 3 files changed, 53 insertions(+), 120 deletions(-) diff --git a/JAERO/gui_classes/settingsdialog.cpp b/JAERO/gui_classes/settingsdialog.cpp index c6afab7..68f6a3a 100644 --- a/JAERO/gui_classes/settingsdialog.cpp +++ b/JAERO/gui_classes/settingsdialog.cpp @@ -171,7 +171,7 @@ void SettingsDialog::populatesettings() ui->lineEditZMQBind->setText(settings.value("remoteAudioOutBindAddress", "tcp://*:5551").toString()); ui->lineEditZMQBindTopic->setText(settings.value("remoteAudioOutBindTopic", "JAERO").toString()); - ui->checkBoxZMQ->setChecked(settings.value("zmqAudioInputEnabled", true).toBool()); + ui->checkBoxZMQ->setChecked(settings.value("zmqAudioInputEnabled", false).toBool()); ui->lineEditZmqConnectAddress->setText(settings.value("zmqAudioInputReceiveAddress", "tcp://127.0.0.1:6003").toString()); diff --git a/JAERO/gui_classes/settingsdialog.ui b/JAERO/gui_classes/settingsdialog.ui index 01fa924..2721f6c 100644 --- a/JAERO/gui_classes/settingsdialog.ui +++ b/JAERO/gui_classes/settingsdialog.ui @@ -9,8 +9,8 @@ 0 0 - 453 - 753 + 451 + 720 @@ -203,7 +203,7 @@ eg "localhost:12345 localhost:12346" 10 - 520 + 470 401 151 @@ -239,7 +239,7 @@ eg "localhost:12345 localhost:12346" 10 50 - 70 + 101 41 @@ -262,7 +262,7 @@ eg "localhost:12345 localhost:12346" 120 60 - 51 + 61 25 @@ -290,7 +290,7 @@ eg "localhost:12345 localhost:12346" 130 90 - 31 + 51 25 @@ -394,7 +394,7 @@ eg "localhost:12345 localhost:12346" 10 390 401 - 121 + 71 @@ -556,13 +556,16 @@ eg "localhost:12345 localhost:12346" 20 110 - 101 + 121 16 Socket bind address + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + @@ -587,17 +590,17 @@ eg "localhost:12345 localhost:12346" - - + + 20 30 171 17 - - + + JAERO voice decoding - + @@ -617,13 +620,16 @@ eg "localhost:12345 localhost:12346" 20 150 - 47 - 13 + 121 + 16 Topic + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + diff --git a/JAERO/mainwindow.cpp b/JAERO/mainwindow.cpp index 6e8963c..2de2614 100644 --- a/JAERO/mainwindow.cpp +++ b/JAERO/mainwindow.cpp @@ -23,8 +23,8 @@ MainWindow::MainWindow(QWidget *parent) : ui->setupUi(this); - // Nice with VFO name up on the title - //QTimer::singleShot(100, [this]() { setWindowTitle("JAERO "+QString(JAERO_VERSION)); } ); + // Nice with VFO name up on the title. You mean it would be nice with the VFO name? + QTimer::singleShot(100, [this]() { setWindowTitle("JAERO "+QString(JAERO_VERSION)); } ); beep=new QSound(":/sounds/beep.wav",this); @@ -233,6 +233,8 @@ MainWindow::MainWindow(QWidget *parent) : ui->actionTXRX->setVisible(false);//there is a hidden audio modulator icon. + //for zmq stuff + zmqStatus = -1; context = zmq_ctx_new(); publisher = zmq_socket(context, ZMQ_PUB); @@ -247,12 +249,10 @@ MainWindow::MainWindow(QWidget *parent) : zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE_IDLE,(void*)&keepaliveidle,sizeof(ZMQ_TCP_KEEPALIVE_IDLE)); zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE_INTVL,(void*)&keepaliveintrv,sizeof(ZMQ_TCP_KEEPALIVE_INTVL)); - //set pop and accept settings settingsdialog->populatesettings(); acceptsettings(); - } void MainWindow::selectdemodulatorconnections(DemodType demodtype) @@ -265,7 +265,6 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) audiooqpskdemodulator->invalidatesettings(); audioburstoqpskdemodulator->invalidatesettings(); audioburstmskdemodulator->invalidatesettings(); - } lastdemodtype=demodtype; switch(demodtype) @@ -341,8 +340,6 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); } - - //some msk connections connect(audiomskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); connect(audiomskdemodulator, SIGNAL(SignalStatus(bool)), this,SLOT(SignalStatusSlot(bool))); @@ -446,7 +443,6 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); if(pRecThrd!=0) { - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); } @@ -508,7 +504,6 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); } - //some burstoqpsk connections connect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); connect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)), this,SLOT(SignalStatusSlot(bool))); @@ -644,23 +639,18 @@ void MainWindow::connectZMQ() if(settingsdialog->zmqAudioOutEnabled) { - - QSettings settings("Jontisoft", settings_name); - - QString url = settings.value("remoteAudioOutBindAddress", "tcp://*:5551").toString(); - - connected_url = url.toUtf8().constData(); - - zmqStatus= zmq_bind(publisher, connected_url.c_str() ); + QSettings settings("Jontisoft", settings_name); + QString url = settings.value("remoteAudioOutBindAddress", "tcp://*:5551").toString(); + connected_url = url.toUtf8().constData(); + zmqStatus= zmq_bind(publisher, connected_url.c_str() ); } if(pRecThrd!=0 && pRecThrd->running) { - emit ZMQaudioStop(); - pRecThrd = 0; + emit ZMQaudioStop(); + pRecThrd = 0; } - if(settingsdialog->zmqAudioInputEnabled) { pRecThrd = new AudioReceiver(settingsdialog->zmqAudioInputAddress, settingsdialog->zmqAudioInputTopic); @@ -720,7 +710,6 @@ MainWindow::~MainWindow() delete pRecThrd; } - } void MainWindow::SignalStatusSlot(bool signal) @@ -784,9 +773,8 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) double bitrate_tmp=arg1.split(" ")[0].toDouble(); DemodType lasttypeofdemodtouse=typeofdemodtouse; - if(bitrate_tmp>1200){typeofdemodtouse=OQPSK;} - else {typeofdemodtouse=MSK; - } + if(bitrate_tmp>1200)typeofdemodtouse=OQPSK; + else typeofdemodtouse=MSK; if(arg.contains("burst")&&typeofdemodtouse==OQPSK)typeofdemodtouse=BURSTOQPSK; if(arg.contains("burst")&&typeofdemodtouse==MSK)typeofdemodtouse=BURSTMSK; @@ -796,7 +784,6 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audiooqpskdemodulatorsettings.freq_center=audioburstoqpskdemodulator->getCurrentFreq(); audiomskdemodulatorsettings.freq_center=audioburstoqpskdemodulator->getCurrentFreq(); audioburstmskdemodulatorsettings.freq_center=audioburstoqpskdemodulator->getCurrentFreq(); - } if(lasttypeofdemodtouse==OQPSK) @@ -805,7 +792,6 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audiooqpskdemodulatorsettings.freq_center=audiooqpskdemodulator->getCurrentFreq(); audiomskdemodulatorsettings.freq_center=audiooqpskdemodulator->getCurrentFreq(); audioburstmskdemodulatorsettings.freq_center=audiooqpskdemodulator->getCurrentFreq(); - } if(lasttypeofdemodtouse==MSK) @@ -814,7 +800,6 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audiooqpskdemodulatorsettings.freq_center=audiomskdemodulator->getCurrentFreq(); audiomskdemodulatorsettings.freq_center=audiomskdemodulator->getCurrentFreq(); audioburstmskdemodulatorsettings.freq_center=audiomskdemodulator->getCurrentFreq(); - } if(lasttypeofdemodtouse==BURSTMSK) @@ -823,7 +808,6 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audiooqpskdemodulatorsettings.freq_center=audioburstmskdemodulator->getCurrentFreq(); audiomskdemodulatorsettings.freq_center=audioburstmskdemodulator->getCurrentFreq(); audioburstmskdemodulatorsettings.freq_center=audioburstmskdemodulator->getCurrentFreq(); - } audiomskdemodulatorsettings.fb=bitrate_tmp; @@ -836,7 +820,6 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audioburstoqpskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; audioburstmskdemodulatorsettings.zmqAudio = settingsdialog->zmqAudioInputEnabled; - if(typeofdemodtouse==BURSTOQPSK) { audiomskdemodulator->stop(); @@ -844,16 +827,10 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audioburstmskdemodulator->stop(); selectdemodulatorconnections(BURSTOQPSK); - - if(!settingsdialog->widebandwidthenable) - { - audioburstoqpskdemodulatorsettings.Fs=48000; - - }else - { - audioburstoqpskdemodulatorsettings.Fs=96000; - - } +// BURSTOQPSK can't seem to deal with 96000. not sure why at the moment +// +// if(!settingsdialog->widebandwidthenable)audioburstoqpskdemodulatorsettings.Fs=48000; +// else audioburstoqpskdemodulatorsettings.Fs=96000; int idx=ui->comboBoxlbw->findText(((QString)"%1 Hz").arg(audioburstoqpskdemodulatorsettings.fb*1.0)); if(idx>=0)audioburstoqpskdemodulatorsettings.lockingbw=ui->comboBoxlbw->itemText(idx).split(" ")[0].toDouble(); @@ -863,9 +840,7 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audioburstoqpskdemodulator->setSettings(audioburstoqpskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); - if(pRecThrd != 0) - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - + if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); audioburstoqpskdemodulator->start(); } @@ -891,9 +866,7 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audiooqpskdemodulator->setSettings(audiooqpskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); - if(pRecThrd != 0) - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - + if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); audiooqpskdemodulator->start(); } @@ -921,9 +894,7 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audiomskdemodulator->setSettings(audiomskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); - if(pRecThrd != 0) - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - + if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); audiomskdemodulator->start(); } @@ -942,14 +913,11 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audioburstmskdemodulator->setSettings(audioburstmskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); - if(pRecThrd != 0) - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - + if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); audioburstmskdemodulator->start(); } - } void MainWindow::on_comboBoxlbw_currentIndexChanged(const QString &arg1) @@ -983,7 +951,6 @@ void MainWindow::on_comboBoxafc_currentIndexChanged(const QString &arg1) audiooqpskdemodulator->setAFC(true); audioburstoqpskdemodulator->setAFC(true); audioburstmskdemodulator->setAFC(true); - } else { @@ -991,7 +958,6 @@ void MainWindow::on_comboBoxafc_currentIndexChanged(const QString &arg1) audiooqpskdemodulator->setAFC(false); audioburstoqpskdemodulator->setAFC(false); audioburstmskdemodulator->setAFC(false); - } } @@ -1030,7 +996,6 @@ void MainWindow::on_comboBoxdisplay_currentIndexChanged(const QString &arg1) audiooqpskdemodulator->setScatterPointType(OqpskDemodulator::SPT_constellation); audioburstoqpskdemodulator->setScatterPointType(BurstOqpskDemodulator::SPT_constellation); audioburstmskdemodulator->setScatterPointType(BurstMskDemodulator::SPT_constellation); - } if(arg1=="Symbol phase") { @@ -1046,7 +1011,6 @@ void MainWindow::on_comboBoxdisplay_currentIndexChanged(const QString &arg1) audiooqpskdemodulator->setScatterPointType(OqpskDemodulator::SPT_None); audioburstoqpskdemodulator->setScatterPointType(BurstOqpskDemodulator::SPT_None); audioburstmskdemodulator->setScatterPointType(BurstMskDemodulator::SPT_None); - } } @@ -1058,7 +1022,6 @@ void MainWindow::on_actionConnectToUDPPort_toggled(bool arg1) audioburstoqpskdemodulator->demod2->DisconnectSinkDevice(); audioburstmskdemodulator->DisconnectSinkDevice(); - aerol->DisconnectSinkDevice(); aerol2->DisconnectSinkDevice(); udpsocket->close(); @@ -1132,7 +1095,6 @@ void MainWindow::acceptsettings() connectZMQ(); - //if soundcard rate changed if(typeofdemodtouse==MSK) { @@ -1153,9 +1115,7 @@ void MainWindow::acceptsettings() audiomskdemodulator->setSettings(audiomskdemodulatorsettings); } - if(pRecThrd != 0) - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - + if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); } if(typeofdemodtouse==BURSTMSK)// we only use 48000 @@ -1164,30 +1124,22 @@ void MainWindow::acceptsettings() // audioburstmskdemodulatorsettings.Fs=48000; // audioburstmskdemodulator->setSettings(audioburstmskdemodulatorsettings); - if(pRecThrd != 0) - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - - + if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); } - if(typeofdemodtouse==OQPSK)//OQPSK uses 48000 all the time so not needed { //audiooqpskdemodulatorsettings.Fs=48000; //audiooqpskdemodulator->setSettings(audiooqpskdemodulatorsettings); - if(pRecThrd != 0) - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - + if(pRecThrd != 0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); } if(typeofdemodtouse==BURSTOQPSK)//BURSTOQPSK uses 48000 all the time so not needed { //audioburstoqpskdemodulatorsettings.Fs=48000; //audioburstoqpskdemodulator->setSettings(audioburstoqpskdemodulatorsettings); - if(pRecThrd != 0) - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - + if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); } //if soundcard device changed @@ -1272,29 +1224,11 @@ void MainWindow::acceptsettings() if(settingsdialog->loggingenable)compresseddiskwriter->setLogDir(settingsdialog->loggingdirectory); else compresseddiskwriter->setLogDir(""); + if(settingsdialog->localAudioOutEnabled)connect(aerol,SIGNAL(Voicesignal(QByteArray)),ambe,SLOT(to_decode_slot(QByteArray)),Qt::UniqueConnection); + else disconnect(aerol,SIGNAL(Voicesignal(QByteArray)),ambe,SLOT(to_decode_slot(QByteArray))); - if(settingsdialog->localAudioOutEnabled){ - - connect(aerol,SIGNAL(Voicesignal(QByteArray)),ambe,SLOT(to_decode_slot(QByteArray)),Qt::UniqueConnection); - - }else{ - - disconnect(aerol,SIGNAL(Voicesignal(QByteArray)),ambe,SLOT(to_decode_slot(QByteArray))); - - } - - if(settingsdialog->zmqAudioOutEnabled){ - - connect(aerol,SIGNAL(Voicesignal(QByteArray&, QString&)),this,SLOT(Voiceslot(QByteArray&, QString&)),Qt::UniqueConnection); - - }else - { - - disconnect(aerol,SIGNAL(Voicesignal(QByteArray&, QString&)),this,SLOT(Voiceslot(QByteArray&, QString&))); - - } - - + if(settingsdialog->zmqAudioOutEnabled)connect(aerol,SIGNAL(Voicesignal(QByteArray&, QString&)),this,SLOT(Voiceslot(QByteArray&, QString&)),Qt::UniqueConnection); + else disconnect(aerol,SIGNAL(Voicesignal(QByteArray&, QString&)),this,SLOT(Voiceslot(QByteArray&, QString&))); } @@ -1310,7 +1244,6 @@ void MainWindow::CChannelAssignmentSlot(CChannelAssignmentItem &item) if(item.receive_spotbeam)rx_beam=" Spot Beam "; message += "Receive Freq: " + QString::number(item.receive_freq) + rx_beam + "Transmit " + QString::number(item.transmit_freq); - switch(item.type) { case AEROTypeP::MessageType::C_channel_assignment_distress: @@ -1331,17 +1264,17 @@ void MainWindow::CChannelAssignmentSlot(CChannelAssignmentItem &item) ui->plainTextEdit_cchan_assignment->appendPlainText(message); } + void MainWindow::Voiceslot(QByteArray &data, QString &hex) { std::string topic_text = settingsdialog->zmqAudioOutTopic.toUtf8().constData(); zmq_setsockopt(publisher, ZMQ_IDENTITY, topic_text.c_str(), topic_text.length()); - if(data.length() != 0){ - + if(data.length()!=0) + { zmq_send(publisher, topic_text.c_str(), topic_text.length(), ZMQ_SNDMORE); zmq_send(publisher, data.data(), data.length(), 0 ); - } zmq_send(publisher, topic_text.c_str(), 5, ZMQ_SNDMORE); zmq_send(publisher, hex.toStdString().c_str(), 6, 0 ); @@ -1543,8 +1476,6 @@ void MainWindow::ERRorslot(QString &error) ui->inputwidget->appendHtml(""+error+""); } - - void MainWindow::on_tabWidget_currentChanged(int index) { Q_UNUSED(index); @@ -1574,12 +1505,8 @@ void MainWindow::on_actionSound_Out_toggled(bool mute) } } - void MainWindow::on_actionReduce_CPU_triggered(bool checked) { - audiooqpskdemodulator->setCPUReduce(checked); audiomskdemodulator->setCPUReduce(checked); - } - From f5b5778798718f9af600bd9fbdd79146c0b33150 Mon Sep 17 00:00:00 2001 From: jontio Date: Sat, 24 Jul 2021 14:59:14 +1200 Subject: [PATCH 17/22] changed to QtConcurrent::run, fixed hanging bug in zmq receiver when closed if no source is available --- JAERO/audioreceiver.cpp | 108 ++++++++++++++++++++---------- JAERO/audioreceiver.h | 29 +++++---- JAERO/mainwindow.cpp | 141 +++++++--------------------------------- JAERO/mainwindow.h | 5 +- 4 files changed, 115 insertions(+), 168 deletions(-) diff --git a/JAERO/audioreceiver.cpp b/JAERO/audioreceiver.cpp index c4dba77..cae0dd7 100644 --- a/JAERO/audioreceiver.cpp +++ b/JAERO/audioreceiver.cpp @@ -4,53 +4,95 @@ #include "QDataStream" #include "QDateTime" +#include -void AudioReceiver::process() +void AudioReceiver::ZMQaudioStart(QString address, QString topic) { - running = true; - // allocate enough for 96Khz sampling with 1 buffer per second - int recsize = 192000; - context = zmq_ctx_new(); - subscriber = zmq_socket(context, ZMQ_SUB); - - zmqStatus = zmq_connect(subscriber, _address.toStdString().c_str()); - zmq_setsockopt(subscriber, ZMQ_SUBSCRIBE, _topic.toStdString().c_str(), 5); - - char buf [recsize]; - char topic[20]; - - while(running){ - - - zmq_recv(subscriber, topic, 20, 0); - int received = zmq_recv(subscriber, buf, recsize, ZMQ_DONTWAIT); - - QByteArray qdata(buf, received); + //stop set prams and start thread + ZMQaudioStop(); + setParameters(address,topic); + future = QtConcurrent::run([=]() { + process(); + qDebug()<<"Thread finished"; + return; + }); + //wait till the thread is running so ZMQaudioStop functions correctly + for(int i=0;!running&&i<1000;i++)usleep(1000); + //if it fails after a second then arghhhhh, should not happen + if(!running) + { + qDebug()<<"Failed to start ZMQ receiving thread"; + } +} - emit recAudio(qdata); - } +void AudioReceiver::process() +{ + // allocate enough for 96Khz sampling with 1 buffer per second + int recsize = 192000; + context = zmq_ctx_new(); + subscriber = zmq_socket(context, ZMQ_SUB); + + zmqStatus = zmq_connect(subscriber, _address.toStdString().c_str()); + zmq_setsockopt(subscriber, ZMQ_SUBSCRIBE, _topic.toStdString().c_str(), 5); + + char buf [recsize]; + char topic[20]; + + running = true; + + while(running) + { + zmq_recv(subscriber, topic, 20, 0); + int received = zmq_recv(subscriber, buf, recsize, ZMQ_DONTWAIT); + if(received>=0) + { + QByteArray qdata(buf, received); + emit recAudio(qdata); + } + else + { + if(running) + { + qDebug()<<"zmq_recv error!!!"; + usleep(100000); + } + } + } +} - zmq_disconnect(subscriber,_address.toStdString().c_str()); - zmq_ctx_destroy (context); - emit finished(); +AudioReceiver::AudioReceiver(QObject *parent): + QObject(parent), + running(false), + context(nullptr), + subscriber(nullptr) +{ } - -AudioReceiver::AudioReceiver(QString address, QString topic){ - _address = address; - _topic = topic; +AudioReceiver::~AudioReceiver() +{ + ZMQaudioStop(); } -void AudioReceiver::setParameters(QString address, QString topic){ - _address = address; - _topic = topic; +void AudioReceiver::setParameters(QString address, QString topic) +{ + _address = address; + _topic = topic; } void AudioReceiver::ZMQaudioStop() { -running = false; + running = false; + + if(subscriber)zmq_close(subscriber); + if(context)zmq_ctx_destroy(context); + if(!future.isFinished())future.waitForFinished(); + + subscriber=nullptr; + context=nullptr; + + emit finished(); } diff --git a/JAERO/audioreceiver.h b/JAERO/audioreceiver.h index d53a9cd..af2348a 100644 --- a/JAERO/audioreceiver.h +++ b/JAERO/audioreceiver.h @@ -8,6 +8,7 @@ #include #include #include +#include class AudioReceiver : public QObject @@ -16,16 +17,13 @@ class AudioReceiver : public QObject public: - AudioReceiver(QString address, QString topic); - void setParameters(QString address, QString topic); - - bool running; - + explicit AudioReceiver(QObject *parent = 0);//QString address, QString topic); + ~AudioReceiver(); public slots: - void process(); - void ZMQaudioStop(); + void ZMQaudioStop(); + void ZMQaudioStart(QString address, QString topic); signals: @@ -34,18 +32,21 @@ public slots: private: - void* context; - void* subscriber; - - int zmqStatus; + void setParameters(QString address, QString topic); + volatile bool running; - QString _address; - QString _topic; - int _rate; + void process(); + void * volatile context; + void * volatile subscriber; + int zmqStatus; + QString _address; + QString _topic; + int _rate; + QFuture future; signals: void recAudio(const QByteArray & audio); diff --git a/JAERO/mainwindow.cpp b/JAERO/mainwindow.cpp index 2de2614..b9b3a49 100644 --- a/JAERO/mainwindow.cpp +++ b/JAERO/mainwindow.cpp @@ -31,8 +31,8 @@ MainWindow::MainWindow(QWidget *parent) : //plane logging window planelog = new PlaneLog; - //create areo decoder - pRecThrd = 0; + //create zmq audio receiver + zmq_audio_receiver = new AudioReceiver(this); //create areo decoder aerol = new AeroL(this); //Create Aero sink @@ -82,7 +82,6 @@ MainWindow::MainWindow(QWidget *parent) : //create the burst oqpsk demodulator audioburstoqpskdemodulator = new AudioBurstOqpskDemodulator(this); - //create the burst msk demodulator audioburstmskdemodulator = new AudioBurstMskDemodulator(this); @@ -285,10 +284,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); //some burstoqpsk connections disconnect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -303,10 +299,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); //burstdemod demod2 disconnect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -335,10 +328,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); //some msk connections connect(audiomskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -353,10 +343,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - } + connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); break; case OQPSK: //opqsk @@ -373,10 +360,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); //some burstoqpsk connections disconnect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -391,10 +375,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); //burstdemod demod2 disconnect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -423,10 +404,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); //some oqpsk connections connect(audiooqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -441,11 +419,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - } - + connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); break; case BURSTOQPSK: //burstopqsk @@ -463,10 +437,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); //some oqpsk connections disconnect(audiooqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -481,10 +452,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); //some burst msk connections disconnect(audioburstmskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -499,10 +467,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); //some burstoqpsk connections connect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -517,10 +482,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray))); - } + connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray))); //burstdemod demod2 connect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -553,10 +515,8 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); + //some oqpsk connections disconnect(audiooqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); disconnect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)), this,SLOT(SignalStatusSlot(bool))); @@ -570,10 +530,8 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); + //some burstoqpsk connections disconnect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); disconnect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)), this,SLOT(SignalStatusSlot(bool))); @@ -587,10 +545,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - disconnect(pRecThrd, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); - } + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); //burstdemod demod2 disconnect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -619,10 +574,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)), aerol,SLOT(SignalStatusSlot(bool))); - if(pRecThrd!=0) - { - connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray))); - } + connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray))); break; } @@ -645,28 +597,8 @@ void MainWindow::connectZMQ() zmqStatus= zmq_bind(publisher, connected_url.c_str() ); } - if(pRecThrd!=0 && pRecThrd->running) - { - emit ZMQaudioStop(); - pRecThrd = 0; - } - - if(settingsdialog->zmqAudioInputEnabled) - { - pRecThrd = new AudioReceiver(settingsdialog->zmqAudioInputAddress, settingsdialog->zmqAudioInputTopic); - - QThread* thread = new QThread; - pRecThrd->moveToThread(thread); - - connect(thread, SIGNAL (started()), pRecThrd, SLOT (process())); - connect(pRecThrd, SIGNAL (finished()), pRecThrd, SLOT (deleteLater())); - connect(thread, SIGNAL (finished()), thread, SLOT (deleteLater())); - connect(this, SIGNAL (ZMQaudioStop()), pRecThrd, SLOT (ZMQaudioStop()),Qt::DirectConnection); - - thread->start(); - } - - + if(settingsdialog->zmqAudioInputEnabled)zmq_audio_receiver->ZMQaudioStart(settingsdialog->zmqAudioInputAddress, settingsdialog->zmqAudioInputTopic); + else zmq_audio_receiver->ZMQaudioStop(); } @@ -703,13 +635,6 @@ MainWindow::~MainWindow() delete ambe; delete planelog; delete ui; - - if(pRecThrd!=0 && pRecThrd->running) - { - emit ZMQaudioStop(); - delete pRecThrd; - } - } void MainWindow::SignalStatusSlot(bool signal) @@ -827,11 +752,6 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audioburstmskdemodulator->stop(); selectdemodulatorconnections(BURSTOQPSK); -// BURSTOQPSK can't seem to deal with 96000. not sure why at the moment -// -// if(!settingsdialog->widebandwidthenable)audioburstoqpskdemodulatorsettings.Fs=48000; -// else audioburstoqpskdemodulatorsettings.Fs=96000; - int idx=ui->comboBoxlbw->findText(((QString)"%1 Hz").arg(audioburstoqpskdemodulatorsettings.fb*1.0)); if(idx>=0)audioburstoqpskdemodulatorsettings.lockingbw=ui->comboBoxlbw->itemText(idx).split(" ")[0].toDouble(); audioburstoqpskdemodulatorsettings.audio_device_in=settingsdialog->audioinputdevice; @@ -840,8 +760,6 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audioburstoqpskdemodulator->setSettings(audioburstoqpskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); - if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - audioburstoqpskdemodulator->start(); } @@ -866,8 +784,6 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audiooqpskdemodulator->setSettings(audiooqpskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); - if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - audiooqpskdemodulator->start(); } @@ -894,8 +810,6 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audiomskdemodulator->setSettings(audiomskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); - if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - audiomskdemodulator->start(); } @@ -913,8 +827,6 @@ void MainWindow::on_comboBoxbps_currentIndexChanged(const QString &arg) audioburstmskdemodulator->setSettings(audioburstmskdemodulatorsettings); if(idx>=0)ui->comboBoxlbw->setCurrentIndex(idx); - if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - audioburstmskdemodulator->start(); } @@ -1115,31 +1027,22 @@ void MainWindow::acceptsettings() audiomskdemodulator->setSettings(audiomskdemodulatorsettings); } - if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); - } if(typeofdemodtouse==BURSTMSK)// we only use 48000 { - // audioburstmskdemodulatorsettings.Fs=48000; // audioburstmskdemodulator->setSettings(audioburstmskdemodulatorsettings); - - if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); } if(typeofdemodtouse==OQPSK)//OQPSK uses 48000 all the time so not needed { //audiooqpskdemodulatorsettings.Fs=48000; //audiooqpskdemodulator->setSettings(audiooqpskdemodulatorsettings); - - if(pRecThrd != 0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); } if(typeofdemodtouse==BURSTOQPSK)//BURSTOQPSK uses 48000 all the time so not needed { //audioburstoqpskdemodulatorsettings.Fs=48000; //audioburstoqpskdemodulator->setSettings(audioburstoqpskdemodulatorsettings); - - if(pRecThrd!=0)connect(pRecThrd, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); } //if soundcard device changed diff --git a/JAERO/mainwindow.h b/JAERO/mainwindow.h index fa0487b..f7f5476 100644 --- a/JAERO/mainwindow.h +++ b/JAERO/mainwindow.h @@ -101,7 +101,6 @@ class MainWindow : public QMainWindow QSound *beep; - // zeromq for AMBE void* context; void* publisher; @@ -110,7 +109,8 @@ class MainWindow : public QMainWindow int zmqStatus; std::string connected_url; - AudioReceiver * pRecThrd; + //ZeroMQ Audio Receiver + AudioReceiver *zmq_audio_receiver; protected: void closeEvent(QCloseEvent *event); @@ -143,6 +143,7 @@ private slots: void on_tabWidget_currentChanged(int index); void on_actionSound_Out_toggled(bool mute); void on_actionReduce_CPU_triggered(bool checked); + }; #endif // MAINWINDOW_H From eb768515b2a8b234d959c032e338fe13434fac7d Mon Sep 17 00:00:00 2001 From: jontio Date: Mon, 26 Jul 2021 11:05:32 +1200 Subject: [PATCH 18/22] added bitrate message for zmq receiver. added to msk demodulator attempt to change samplerate depening on zmq bitrate message --- JAERO/audioreceiver.cpp | 13 ++++++------- JAERO/audioreceiver.h | 2 +- JAERO/burstmskdemodulator.cpp | 8 +++++--- JAERO/burstmskdemodulator.h | 2 +- JAERO/burstoqpskdemodulator.cpp | 8 +++++--- JAERO/burstoqpskdemodulator.h | 2 +- JAERO/mainwindow.cpp | 32 ++++++++++++++++---------------- JAERO/mskdemodulator.cpp | 14 ++++++++------ JAERO/mskdemodulator.h | 3 ++- JAERO/oqpskdemodulator.cpp | 10 +++++----- JAERO/oqpskdemodulator.h | 2 +- 11 files changed, 51 insertions(+), 45 deletions(-) diff --git a/JAERO/audioreceiver.cpp b/JAERO/audioreceiver.cpp index cae0dd7..2cffb7d 100644 --- a/JAERO/audioreceiver.cpp +++ b/JAERO/audioreceiver.cpp @@ -1,9 +1,5 @@ #include "audioreceiver.h" #include "QDebug" -#include -#include "QDataStream" -#include "QDateTime" - #include void AudioReceiver::ZMQaudioStart(QString address, QString topic) @@ -13,7 +9,6 @@ void AudioReceiver::ZMQaudioStart(QString address, QString topic) setParameters(address,topic); future = QtConcurrent::run([=]() { process(); - qDebug()<<"Thread finished"; return; }); //wait till the thread is running so ZMQaudioStop functions correctly @@ -37,17 +32,21 @@ void AudioReceiver::process() char buf [recsize]; char topic[20]; + unsigned char rate[4]; + quint32 sampleRate; running = true; while(running) { zmq_recv(subscriber, topic, 20, 0); - int received = zmq_recv(subscriber, buf, recsize, ZMQ_DONTWAIT); + int received = zmq_recv(subscriber, rate, 4, ZMQ_DONTWAIT); + memcpy(&sampleRate, rate, 4); + received = zmq_recv(subscriber, buf, recsize, ZMQ_DONTWAIT); if(received>=0) { QByteArray qdata(buf, received); - emit recAudio(qdata); + emit recAudio(qdata,sampleRate); } else { diff --git a/JAERO/audioreceiver.h b/JAERO/audioreceiver.h index af2348a..9ff13b7 100644 --- a/JAERO/audioreceiver.h +++ b/JAERO/audioreceiver.h @@ -49,7 +49,7 @@ public slots: QFuture future; signals: - void recAudio(const QByteArray & audio); + void recAudio(const QByteArray & audio,quint32 sampleRate); }; diff --git a/JAERO/burstmskdemodulator.cpp b/JAERO/burstmskdemodulator.cpp index 2b739e7..48841a8 100644 --- a/JAERO/burstmskdemodulator.cpp +++ b/JAERO/burstmskdemodulator.cpp @@ -759,9 +759,11 @@ void BurstMskDemodulator::DCDstatSlot(bool _dcd) dcd=_dcd; } -void BurstMskDemodulator::dataReceived(const QByteArray &audio) +void BurstMskDemodulator::dataReceived(const QByteArray &audio,quint32 sampleRate) { - + if(sampleRate!=Fs) + { + qDebug()<<"Sample rate not supported by demodulator"; + } writeData(audio, audio.length()); - } diff --git a/JAERO/burstmskdemodulator.h b/JAERO/burstmskdemodulator.h index f4dd064..51aa633 100644 --- a/JAERO/burstmskdemodulator.h +++ b/JAERO/burstmskdemodulator.h @@ -213,7 +213,7 @@ class BurstMskDemodulator : public QIODevice public slots: void CenterFreqChangedSlot(double freq_center); void DCDstatSlot(bool dcd); - void dataReceived(const QByteArray &audio); + void dataReceived(const QByteArray &audio, quint32 sampleRate); }; diff --git a/JAERO/burstoqpskdemodulator.cpp b/JAERO/burstoqpskdemodulator.cpp index 2d3a82e..6c9a388 100644 --- a/JAERO/burstoqpskdemodulator.cpp +++ b/JAERO/burstoqpskdemodulator.cpp @@ -303,11 +303,13 @@ qint64 BurstOqpskDemodulator::writeData(const char *data, qint64 len) return len; } -void BurstOqpskDemodulator::dataReceived(const QByteArray &audio) +void BurstOqpskDemodulator::dataReceived(const QByteArray &audio,quint32 sampleRate) { - + if(sampleRate!=Fs) + { + qDebug()<<"Sample rate not supported by demodulator"; + } writeData(audio, audio.length()); - } void BurstOqpskDemodulator::writeDataSlot(const char *data, qint64 len) diff --git a/JAERO/burstoqpskdemodulator.h b/JAERO/burstoqpskdemodulator.h index b808340..384f4ac 100644 --- a/JAERO/burstoqpskdemodulator.h +++ b/JAERO/burstoqpskdemodulator.h @@ -225,7 +225,7 @@ class BurstOqpskDemodulator : public QIODevice public slots: void CenterFreqChangedSlot(double freq_center); void writeDataSlot(const char *data, qint64 len); - void dataReceived(const QByteArray &audio); + void dataReceived(const QByteArray &audio, quint32 sampleRate); }; diff --git a/JAERO/mainwindow.cpp b/JAERO/mainwindow.cpp index b9b3a49..0d8064e 100644 --- a/JAERO/mainwindow.cpp +++ b/JAERO/mainwindow.cpp @@ -284,7 +284,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //some burstoqpsk connections disconnect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -299,7 +299,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //burstdemod demod2 disconnect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -328,7 +328,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //some msk connections connect(audiomskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -343,7 +343,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)), audiomskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)), audiomskdemodulator, SLOT(dataReceived(QByteArray,quint32)), Qt::UniqueConnection); break; case OQPSK: //opqsk @@ -360,7 +360,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audiomskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //some burstoqpsk connections disconnect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -375,7 +375,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //burstdemod demod2 disconnect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -404,7 +404,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //some oqpsk connections connect(audiooqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -419,7 +419,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray)), Qt::UniqueConnection); + connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)), audiooqpskdemodulator, SLOT(dataReceived(QByteArray,quint32)), Qt::UniqueConnection); break; case BURSTOQPSK: //burstopqsk @@ -437,7 +437,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audiomskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //some oqpsk connections disconnect(audiooqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -452,7 +452,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //some burst msk connections disconnect(audioburstmskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -467,7 +467,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audioburstmskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //some burstoqpsk connections connect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -482,7 +482,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray))); + connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)), audioburstoqpskdemodulator, SLOT(dataReceived(QByteArray,quint32))); //burstdemod demod2 connect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -515,7 +515,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiomskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiomskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiomskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiomskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audiomskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //some oqpsk connections disconnect(audiooqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -530,7 +530,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audiooqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audiooqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audiooqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audiooqpskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //some burstoqpsk connections disconnect(audioburstoqpskdemodulator, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -545,7 +545,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) disconnect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstoqpskdemodulator,SLOT(CenterFreqChangedSlot(double))); disconnect(audioburstoqpskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); disconnect(audioburstoqpskdemodulator, SIGNAL(SignalStatus(bool)),aerol,SLOT(SignalStatusSlot(bool))); - disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray))); + disconnect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)),audioburstoqpskdemodulator,SLOT(dataReceived(QByteArray,quint32))); //burstdemod demod2 disconnect(audioburstoqpskdemodulator->demod2, SIGNAL(Plottables(double,double,double)), this,SLOT(PlottablesSlot(double,double,double))); @@ -574,7 +574,7 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) connect(ui->spectrumdisplay, SIGNAL(CenterFreqChanged(double)), audioburstmskdemodulator,SLOT(CenterFreqChangedSlot(double))); connect(audioburstmskdemodulator, SIGNAL(BitRateChanged(double,bool)), aerol,SLOT(setSettings(double,bool))); connect(audioburstmskdemodulator, SIGNAL(SignalStatus(bool)), aerol,SLOT(SignalStatusSlot(bool))); - connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray))); + connect(zmq_audio_receiver, SIGNAL(recAudio(const QByteArray&,quint32)), audioburstmskdemodulator, SLOT(dataReceived(QByteArray,quint32))); break; } diff --git a/JAERO/mskdemodulator.cpp b/JAERO/mskdemodulator.cpp index 0224a78..856dfea 100644 --- a/JAERO/mskdemodulator.cpp +++ b/JAERO/mskdemodulator.cpp @@ -134,6 +134,7 @@ void MskDemodulator::invalidatesettings() void MskDemodulator::setSettings(Settings _settings) { + last_applied_settings=_settings; if(_settings.Fs!=Fs)emit SampleRateChanged(_settings.Fs); Fs=_settings.Fs; lockingbw=_settings.lockingbw; @@ -524,12 +525,13 @@ void MskDemodulator::DCDstatSlot(bool _dcd) } - -void MskDemodulator::dataReceived(const QByteArray &audio) +void MskDemodulator::dataReceived(const QByteArray &audio,quint32 sampleRate) { - + if(sampleRate!=Fs) + { + qDebug()<<"Sample rate different than expected. Trying to change demodulator sample rate"; + last_applied_settings.Fs=sampleRate; + setSettings(last_applied_settings); + } writeData(audio, audio.length()); - } - - diff --git a/JAERO/mskdemodulator.h b/JAERO/mskdemodulator.h index ddcfb06..6e5aedc 100644 --- a/JAERO/mskdemodulator.h +++ b/JAERO/mskdemodulator.h @@ -142,6 +142,7 @@ class MskDemodulator : public QIODevice int coarseCounter; bool cpuReduce; + Settings last_applied_settings; signals: void ScatterPoints(const QVector &buffer); @@ -162,7 +163,7 @@ public slots: void FreqOffsetEstimateSlot(double freq_offset_est); void CenterFreqChangedSlot(double freq_center); void DCDstatSlot(bool dcd); - void dataReceived(const QByteArray &audio); + void dataReceived(const QByteArray &audio, quint32 sampleRate); }; diff --git a/JAERO/oqpskdemodulator.cpp b/JAERO/oqpskdemodulator.cpp index a65f650..2b4c149 100644 --- a/JAERO/oqpskdemodulator.cpp +++ b/JAERO/oqpskdemodulator.cpp @@ -679,11 +679,11 @@ void OqpskDemodulator::DCDstatSlot(bool _dcd) } -void OqpskDemodulator::dataReceived(const QByteArray &audio) +void OqpskDemodulator::dataReceived(const QByteArray &audio,quint32 sampleRate) { - + if(sampleRate!=Fs) + { + qDebug()<<"Sample rate not supported by demodulator"; + } writeData(audio, audio.length()); - } - - diff --git a/JAERO/oqpskdemodulator.h b/JAERO/oqpskdemodulator.h index e2422f1..a50a371 100644 --- a/JAERO/oqpskdemodulator.h +++ b/JAERO/oqpskdemodulator.h @@ -147,7 +147,7 @@ public slots: void FreqOffsetEstimateSlot(double freq_offset_est); void CenterFreqChangedSlot(double freq_center); void DCDstatSlot(bool _dcd); - void dataReceived(const QByteArray &audio); + void dataReceived(const QByteArray &audio, quint32 sampleRate); }; From 7b873740dc014c6fa64c680a859c0ac5be6aa1b2 Mon Sep 17 00:00:00 2001 From: jontio Date: Mon, 26 Jul 2021 22:47:15 +1200 Subject: [PATCH 19/22] added zmq_audiosender class and removed the code that was doing the same thing in mainwindow (untested). tidy --- JAERO/JAERO.pro | 10 +- JAERO/audioburstmskdemodulator.cpp | 13 +- JAERO/audioburstoqpskdemodulator.cpp | 13 +- JAERO/audiomskdemodulator.cpp | 13 +- JAERO/audiooqpskdemodulator.cpp | 13 +- JAERO/burstmskdemodulator.cpp | 210 +++++++++--------- JAERO/burstmskdemodulator.h | 1 - JAERO/burstoqpskdemodulator.cpp | 13 -- JAERO/burstoqpskdemodulator.h | 5 +- JAERO/jaero.qrc | 2 +- JAERO/mainwindow.cpp | 82 ++----- JAERO/mainwindow.h | 23 +- ...udioreceiver.cpp => zmq_audioreceiver.cpp} | 19 +- .../{audioreceiver.h => zmq_audioreceiver.h} | 23 +- JAERO/zmq_audiosender.cpp | 55 +++++ JAERO/zmq_audiosender.h | 24 ++ 16 files changed, 257 insertions(+), 262 deletions(-) rename JAERO/{audioreceiver.cpp => zmq_audioreceiver.cpp} (83%) rename JAERO/{audioreceiver.h => zmq_audioreceiver.h} (58%) create mode 100644 JAERO/zmq_audiosender.cpp create mode 100644 JAERO/zmq_audiosender.h diff --git a/JAERO/JAERO.pro b/JAERO/JAERO.pro index 4432b56..2364c64 100644 --- a/JAERO/JAERO.pro +++ b/JAERO/JAERO.pro @@ -85,8 +85,9 @@ SOURCES += mainwindow.cpp \ $$JFFT_PATH/jfft.cpp \ util/stdio_utils.cpp \ util/file_utils.cpp \ - util/RuntimeError.cpp\ - audioreceiver.cpp + util/RuntimeError.cpp \ + zmq_audiosender.cpp \ + zmq_audioreceiver.cpp HEADERS += mainwindow.h \ @@ -121,8 +122,9 @@ HEADERS += mainwindow.h \ $$JFFT_PATH/jfft.h \ util/stdio_utils.h \ util/file_utils.h \ - util/RuntimeError.h\ - audioreceiver.h + util/RuntimeError.h \ + zmq_audioreceiver.h \ + zmq_audiosender.h # Tell the qcustomplot header that it will be used as library: diff --git a/JAERO/audioburstmskdemodulator.cpp b/JAERO/audioburstmskdemodulator.cpp index eecd4a5..ce2189c 100644 --- a/JAERO/audioburstmskdemodulator.cpp +++ b/JAERO/audioburstmskdemodulator.cpp @@ -3,10 +3,10 @@ #include AudioBurstMskDemodulator::AudioBurstMskDemodulator(QObject *parent) -: BurstMskDemodulator(parent), - m_audioInput(NULL) + : BurstMskDemodulator(parent), + m_audioInput(NULL) { -// + // } void AudioBurstMskDemodulator::start() @@ -14,16 +14,15 @@ void AudioBurstMskDemodulator::start() BurstMskDemodulator::start(); if(!settings.zmqAudio) { - if(m_audioInput)m_audioInput->start(this); -} + if(m_audioInput)m_audioInput->start(this); + } } void AudioBurstMskDemodulator::stop() { if(!settings.zmqAudio) { - if(m_audioInput)m_audioInput->stop(); - + if(m_audioInput)m_audioInput->stop(); } BurstMskDemodulator::stop(); } diff --git a/JAERO/audioburstoqpskdemodulator.cpp b/JAERO/audioburstoqpskdemodulator.cpp index 11b1614..39246ae 100644 --- a/JAERO/audioburstoqpskdemodulator.cpp +++ b/JAERO/audioburstoqpskdemodulator.cpp @@ -2,8 +2,8 @@ #include AudioBurstOqpskDemodulator::AudioBurstOqpskDemodulator(QObject *parent) -: BurstOqpskDemodulator(parent), - m_audioInput(NULL) + : BurstOqpskDemodulator(parent), + m_audioInput(NULL) { demod2=new BurstOqpskDemodulator(this); demod2->channel_select_other=true; @@ -17,8 +17,8 @@ void AudioBurstOqpskDemodulator::start() demod2->start(); if(!settings.zmqAudio) { - if(m_audioInput)m_audioInput->start(this); -} + if(m_audioInput)m_audioInput->start(this); + } } void AudioBurstOqpskDemodulator::stop() @@ -26,8 +26,7 @@ void AudioBurstOqpskDemodulator::stop() if(m_audioInput)m_audioInput->stop(); if(!settings.zmqAudio) { - - BurstOqpskDemodulator::stop(); + BurstOqpskDemodulator::stop(); } demod2->stop(); } @@ -47,7 +46,7 @@ void AudioBurstOqpskDemodulator::setSettings(Settings _settings) //set the format m_format.setSampleRate(settings.Fs); if(settings.channel_stereo)m_format.setChannelCount(2); - else m_format.setChannelCount(1); + else m_format.setChannelCount(1); m_format.setSampleSize(16); m_format.setCodec("audio/pcm"); m_format.setByteOrder(QAudioFormat::LittleEndian); diff --git a/JAERO/audiomskdemodulator.cpp b/JAERO/audiomskdemodulator.cpp index 46bb98f..d368841 100644 --- a/JAERO/audiomskdemodulator.cpp +++ b/JAERO/audiomskdemodulator.cpp @@ -3,10 +3,10 @@ #include AudioMskDemodulator::AudioMskDemodulator(QObject *parent) -: MskDemodulator(parent), - m_audioInput(NULL) + : MskDemodulator(parent), + m_audioInput(NULL) { -// + // } void AudioMskDemodulator::start() @@ -14,16 +14,15 @@ void AudioMskDemodulator::start() MskDemodulator::start(); if(!settings.zmqAudio) { - if(m_audioInput)m_audioInput->start(this); -} + if(m_audioInput)m_audioInput->start(this); + } } void AudioMskDemodulator::stop() { if(!settings.zmqAudio) { - if(m_audioInput)m_audioInput->stop(); - + if(m_audioInput)m_audioInput->stop(); } MskDemodulator::stop(); } diff --git a/JAERO/audiooqpskdemodulator.cpp b/JAERO/audiooqpskdemodulator.cpp index eb06ef7..ee05bdb 100644 --- a/JAERO/audiooqpskdemodulator.cpp +++ b/JAERO/audiooqpskdemodulator.cpp @@ -3,10 +3,10 @@ #include AudioOqpskDemodulator::AudioOqpskDemodulator(QObject *parent) -: OqpskDemodulator(parent), - m_audioInput(NULL) + : OqpskDemodulator(parent), + m_audioInput(NULL) { -// + // } void AudioOqpskDemodulator::start() @@ -15,8 +15,8 @@ void AudioOqpskDemodulator::start() if(!settings.zmqAudio) { - if(m_audioInput)m_audioInput->start(this); -} + if(m_audioInput)m_audioInput->start(this); + } } @@ -24,8 +24,7 @@ void AudioOqpskDemodulator::stop() { if(!settings.zmqAudio) { - if(m_audioInput)m_audioInput->stop(); - + if(m_audioInput)m_audioInput->stop(); } OqpskDemodulator::stop(); } diff --git a/JAERO/burstmskdemodulator.cpp b/JAERO/burstmskdemodulator.cpp index 48841a8..26efcca 100644 --- a/JAERO/burstmskdemodulator.cpp +++ b/JAERO/burstmskdemodulator.cpp @@ -599,154 +599,154 @@ qint64 BurstMskDemodulator::writeData(const char *data, qint64 len) if(startstop > 0 || mse < signalthreshold) { - cval= mixer2.WTCISValue()*(val_to_demod)*vol_gain; + cval= mixer2.WTCISValue()*(val_to_demod)*vol_gain; - cpx_type sig2 = cpx_type(matchedfilter_re->FIRUpdateAndProcess(cval.real()),matchedfilter_im->FIRUpdateAndProcess(cval.imag())); + cpx_type sig2 = cpx_type(matchedfilter_re->FIRUpdateAndProcess(cval.real()),matchedfilter_im->FIRUpdateAndProcess(cval.imag())); - if(cntr>(startProcessing*SamplesPerSymbol) && cntr(startProcessing*SamplesPerSymbol) && cntrUpdate(std::abs(sig2)); + //Measure ebno + ebnomeasure->Update(std::abs(sig2)); - //send ebno when right time - if(cntr== endRotation + (200*SamplesPerSymbol)) - { - emit EbNoMeasurmentSignal(ebnomeasure->EbNo); - } + //send ebno when right time + if(cntr== endRotation + (200*SamplesPerSymbol)) + { + emit EbNoMeasurmentSignal(ebnomeasure->EbNo); + } - //AGC - sig2*=agc2->Update(std::abs(sig2)); + //AGC + sig2*=agc2->Update(std::abs(sig2)); - //clipping - double abval=std::abs(sig2); - if(abval>2.84)sig2=(2.84/abval)*sig2; + //clipping + double abval=std::abs(sig2); + if(abval>2.84)sig2=(2.84/abval)*sig2; - //normal symbol timer - cpx_type pt_d = delayedsmpl.update_dont_touch(sig2); - cpx_type pt_msk=cpx_type(sig2.real(), pt_d.imag()); + //normal symbol timer + cpx_type pt_d = delayedsmpl.update_dont_touch(sig2); + cpx_type pt_msk=cpx_type(sig2.real(), pt_d.imag()); - double st_eta = std::abs(pt_msk); - st_eta=st_iir_resonator.update(st_eta); + double st_eta = std::abs(pt_msk); + st_eta=st_iir_resonator.update(st_eta); - cpx_type st_m1=cpx_type(st_eta,-delayt8.update(st_eta)); - cpx_type st_out=st_osc.WTCISValue()*st_m1; + cpx_type st_m1=cpx_type(st_eta,-delayt8.update(st_eta)); + cpx_type st_out=st_osc.WTCISValue()*st_m1; - double st_angle_error=std::arg(st_out); - //acquire the symbol oscillation - if(cntr>endRotation) - { - st_osc.AdvanceFractionOfWave(-st_angle_error*0.002/360.0); - } + double st_angle_error=std::arg(st_out); + //acquire the symbol oscillation + if(cntr>endRotation) + { + st_osc.AdvanceFractionOfWave(-st_angle_error*0.002/360.0); + } - //sample times - if(st_osc.IfHavePassedPoint(ee)) - { + //sample times + if(st_osc.IfHavePassedPoint(ee)) + { - //carrier tracking - double ct_xt=tanh(sig2.imag())*sig2.real(); - double ct_xt_d=tanh(pt_d.real())*pt_d.imag(); + //carrier tracking + double ct_xt=tanh(sig2.imag())*sig2.real(); + double ct_xt_d=tanh(pt_d.real())*pt_d.imag(); - double ct_ec=ct_xt_d-ct_xt; - if(ct_ec>M_PI)ct_ec=M_PI; - if(ct_ec<-M_PI)ct_ec=-M_PI; - if(ct_ec>M_PI_2)ct_ec=M_PI_2; - if(ct_ec<-M_PI_2)ct_ec=-M_PI_2; - if(cntr>(startProcessing*SamplesPerSymbol)) - { - rotator=rotator*std::exp(imag*ct_ec*0.25);//correct carrier phase - if(cntr>endRotation) + double ct_ec=ct_xt_d-ct_xt; + if(ct_ec>M_PI)ct_ec=M_PI; + if(ct_ec<-M_PI)ct_ec=-M_PI; + if(ct_ec>M_PI_2)ct_ec=M_PI_2; + if(ct_ec<-M_PI_2)ct_ec=-M_PI_2; + if(cntr>(startProcessing*SamplesPerSymbol)) { - rotator_freq=rotator_freq+ct_ec*0.0001;//correct carrier frequency + rotator=rotator*std::exp(imag*ct_ec*0.25);//correct carrier phase + if(cntr>endRotation) + { + rotator_freq=rotator_freq+ct_ec*0.0001;//correct carrier frequency + } } - } - //gui feedback - if(cntr >= (endRotation + 100*SamplesPerSymbol) && pointbuff_ptr= (endRotation + 100*SamplesPerSymbol) && pointbuff_ptr(startProcessing*SamplesPerSymbol)) { - pointbuff_ptr++; - emit ScatterPoints(pointbuff); + double tda=(fabs((pt_msk*0.75).real())-1.0); + double tdb=(fabs((pt_msk*0.75).imag())-1.0); + mse=msema->Update((tda*tda)+(tdb*tdb)); } - } - //calc MSE of the points - if(cntr>(startProcessing*SamplesPerSymbol)) - { - double tda=(fabs((pt_msk*0.75).real())-1.0); - double tdb=(fabs((pt_msk*0.75).imag())-1.0); - mse=msema->Update((tda*tda)+(tdb*tdb)); - } + //soft bits + double imagin = diffdecode.UpdateSoft(pt_msk.imag()); - //soft bits - double imagin = diffdecode.UpdateSoft(pt_msk.imag()); + int ibit=qRound((imagin)*127.0+128.0); + if(ibit>255)ibit=255; + if(ibit<0)ibit=0; - int ibit=qRound((imagin)*127.0+128.0); - if(ibit>255)ibit=255; - if(ibit<0)ibit=0; + RxDataBits.push_back((uchar)ibit); - RxDataBits.push_back((uchar)ibit); + double real = diffdecode.UpdateSoft(pt_msk.real()); - double real = diffdecode.UpdateSoft(pt_msk.real()); + real =- real; - real =- real; + ibit=qRound((real)*127.0+128.0); - ibit=qRound((real)*127.0+128.0); + if(ibit>255)ibit=255; + if(ibit<0)ibit=0; - if(ibit>255)ibit=255; - if(ibit<0)ibit=0; + RxDataBits.push_back((uchar)ibit); - RxDataBits.push_back((uchar)ibit); + // push them out to decode + if(RxDataBits.size() >= 12) + { + emit processDemodulatedSoftBits(RxDataBits); + RxDataBits.clear(); + } - // push them out to decode - if(RxDataBits.size() >= 12) - { - emit processDemodulatedSoftBits(RxDataBits); - RxDataBits.clear(); } - } - - st_osc.WTnextFrame(); - st_osc_half.WTnextFrame(); + st_osc.WTnextFrame(); + st_osc_half.WTnextFrame(); - mixer2.WTnextFrame(); - mixer_center.WTnextFrame(); + mixer2.WTnextFrame(); + mixer_center.WTnextFrame(); - } + } } return len; diff --git a/JAERO/burstmskdemodulator.h b/JAERO/burstmskdemodulator.h index 51aa633..bf3f6c2 100644 --- a/JAERO/burstmskdemodulator.h +++ b/JAERO/burstmskdemodulator.h @@ -143,7 +143,6 @@ class BurstMskDemodulator : public QIODevice //delay for trident detection DelayThing d2; - //trident shape thing QVector tridentbuffer; int tridentbuffer_ptr; diff --git a/JAERO/burstoqpskdemodulator.cpp b/JAERO/burstoqpskdemodulator.cpp index 6c9a388..88fa6f7 100644 --- a/JAERO/burstoqpskdemodulator.cpp +++ b/JAERO/burstoqpskdemodulator.cpp @@ -389,7 +389,6 @@ void BurstOqpskDemodulator::writeDataSlot(const char *data, qint64 len) if(pdet.update(bt_sig)) { tridentbuffer_ptr=0; - } if(tridentbuffer_ptrZero(); - } - }//end of trident check //mix @@ -528,14 +521,11 @@ void BurstOqpskDemodulator::writeDataSlot(const char *data, qint64 len) startstop=startstopstart; } - - } if(startstop==0) { startstop--; emit SignalStatus(false); - } if((cntr>((256-10)*SamplesPerSymbol))&&insertpreamble) @@ -569,7 +559,6 @@ void BurstOqpskDemodulator::writeDataSlot(const char *data, qint64 len) //correct carrier phase - sig2*=symboltone_averotator; rotator=rotator*std::exp(imag*rotator_freq); @@ -590,8 +579,6 @@ void BurstOqpskDemodulator::writeDataSlot(const char *data, qint64 len) double abval=std::abs(sig2); if(abval>2.84)sig2=(2.84/abval)*sig2; - - //normal symbol timer double st_diff=delays.update(abval*abval)-(abval*abval); double st_d1out=delayt41.update(st_diff); diff --git a/JAERO/burstoqpskdemodulator.h b/JAERO/burstoqpskdemodulator.h index 384f4ac..db73e5c 100644 --- a/JAERO/burstoqpskdemodulator.h +++ b/JAERO/burstoqpskdemodulator.h @@ -60,10 +60,7 @@ class BurstOqpskDemodulator : public QIODevice void setScatterPointType(ScatterPointType type); //--L/R channel selection - bool channel_select_other; - - static int sample; - // + bool channel_select_other; signals: void ScatterPoints(const QVector &buffer); diff --git a/JAERO/jaero.qrc b/JAERO/jaero.qrc index de6a130..980f79c 100644 --- a/JAERO/jaero.qrc +++ b/JAERO/jaero.qrc @@ -28,4 +28,4 @@ images/cpu.png images/green_cpu.png - \ No newline at end of file + diff --git a/JAERO/mainwindow.cpp b/JAERO/mainwindow.cpp index 0d8064e..9f6d811 100644 --- a/JAERO/mainwindow.cpp +++ b/JAERO/mainwindow.cpp @@ -13,8 +13,6 @@ #endif #include "databasetext.h" -#include "zmq.h" - MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), @@ -32,7 +30,9 @@ MainWindow::MainWindow(QWidget *parent) : planelog = new PlaneLog; //create zmq audio receiver - zmq_audio_receiver = new AudioReceiver(this); + zmq_audio_receiver = new ZMQAudioReceiver(this); + //create zmq audio sender + zmq_audio_sender = new ZMQAudioSender(this); //create areo decoder aerol = new AeroL(this); //Create Aero sink @@ -101,7 +101,6 @@ MainWindow::MainWindow(QWidget *parent) : //connect(&arincparser,SIGNAL(DownlinkBasicReportGroupSignal(DownlinkBasicReportGroup&)),sbs1,SLOT(DownlinkBasicReportGroupSlot(DownlinkBasicReportGroup&))); //connect(&arincparser,SIGNAL(DownlinkEarthReferenceGroupSignal(DownlinkEarthReferenceGroup&)),sbs1,SLOT(DownlinkEarthReferenceGroupSlot(DownlinkEarthReferenceGroup&))); - //default sink is the aerol device audiomskdemodulator->ConnectSinkDevice(aerol); audiooqpskdemodulator->ConnectSinkDevice(aerol); @@ -128,7 +127,6 @@ MainWindow::MainWindow(QWidget *parent) : connect(ambe,SIGNAL(decoded_signal(QByteArray)),compresseddiskwriter,SLOT(audioin(QByteArray))); connect(ambe,SIGNAL(decoded_signal(QByteArray)),audioout,SLOT(audioin(QByteArray))); - //statusbar setup freqlabel = new QLabel(); ebnolabel = new QLabel(); @@ -232,22 +230,6 @@ MainWindow::MainWindow(QWidget *parent) : ui->actionTXRX->setVisible(false);//there is a hidden audio modulator icon. - //for zmq stuff - - zmqStatus = -1; - context = zmq_ctx_new(); - publisher = zmq_socket(context, ZMQ_PUB); - - int keepalive = 1; - int keepalivecnt = 10; - int keepaliveidle = 1; - int keepaliveintrv = 1; - - zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE,(void*)&keepalive, sizeof(ZMQ_TCP_KEEPALIVE)); - zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE_CNT,(void*)&keepalivecnt,sizeof(ZMQ_TCP_KEEPALIVE_CNT)); - zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE_IDLE,(void*)&keepaliveidle,sizeof(ZMQ_TCP_KEEPALIVE_IDLE)); - zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE_INTVL,(void*)&keepaliveintrv,sizeof(ZMQ_TCP_KEEPALIVE_INTVL)); - //set pop and accept settings settingsdialog->populatesettings(); acceptsettings(); @@ -580,28 +562,6 @@ void MainWindow::selectdemodulatorconnections(DemodType demodtype) } } -void MainWindow::connectZMQ() -{ - // bind socket - - if(zmqStatus == 0) - { - zmq_disconnect(publisher, connected_url.c_str()); - } - - if(settingsdialog->zmqAudioOutEnabled) - { - QSettings settings("Jontisoft", settings_name); - QString url = settings.value("remoteAudioOutBindAddress", "tcp://*:5551").toString(); - connected_url = url.toUtf8().constData(); - zmqStatus= zmq_bind(publisher, connected_url.c_str() ); - } - - if(settingsdialog->zmqAudioInputEnabled)zmq_audio_receiver->ZMQaudioStart(settingsdialog->zmqAudioInputAddress, settingsdialog->zmqAudioInputTopic); - else zmq_audio_receiver->ZMQaudioStop(); - -} - void MainWindow::closeEvent(QCloseEvent *event) { @@ -1005,8 +965,6 @@ void MainWindow::acceptsettings() if(settingsdialog->tcp_for_ads_messages_enabled)sbs1->starttcpconnection(settingsdialog->tcp_for_ads_messages_address,settingsdialog->tcp_for_ads_messages_port,settingsdialog->tcp_as_client_enabled); else sbs1->stoptcpconnection(); - connectZMQ(); - //if soundcard rate changed if(typeofdemodtouse==MSK) { @@ -1127,11 +1085,25 @@ void MainWindow::acceptsettings() if(settingsdialog->loggingenable)compresseddiskwriter->setLogDir(settingsdialog->loggingdirectory); else compresseddiskwriter->setLogDir(""); + //zmq audio in from remote sdr + if(settingsdialog->zmqAudioInputEnabled)zmq_audio_receiver->Start(settingsdialog->zmqAudioInputAddress, settingsdialog->zmqAudioInputTopic); + else zmq_audio_receiver->Stop(); + + //local audio decode if(settingsdialog->localAudioOutEnabled)connect(aerol,SIGNAL(Voicesignal(QByteArray)),ambe,SLOT(to_decode_slot(QByteArray)),Qt::UniqueConnection); else disconnect(aerol,SIGNAL(Voicesignal(QByteArray)),ambe,SLOT(to_decode_slot(QByteArray))); - if(settingsdialog->zmqAudioOutEnabled)connect(aerol,SIGNAL(Voicesignal(QByteArray&, QString&)),this,SLOT(Voiceslot(QByteArray&, QString&)),Qt::UniqueConnection); - else disconnect(aerol,SIGNAL(Voicesignal(QByteArray&, QString&)),this,SLOT(Voiceslot(QByteArray&, QString&))); + //zmq compressed audio output + if(settingsdialog->zmqAudioOutEnabled) + { + zmq_audio_sender->Start(settingsdialog->zmqAudioOutBind,settingsdialog->zmqAudioOutTopic); + connect(aerol,SIGNAL(Voicesignal(QByteArray&, QString&)),zmq_audio_sender,SLOT(Voiceslot(QByteArray&, QString&)),Qt::UniqueConnection); + } + else + { + zmq_audio_sender->Stop(); + disconnect(aerol,SIGNAL(Voicesignal(QByteArray&, QString&)),zmq_audio_sender,SLOT(Voiceslot(QByteArray&, QString&))); + } } @@ -1168,22 +1140,6 @@ void MainWindow::CChannelAssignmentSlot(CChannelAssignmentItem &item) ui->plainTextEdit_cchan_assignment->appendPlainText(message); } -void MainWindow::Voiceslot(QByteArray &data, QString &hex) -{ - - std::string topic_text = settingsdialog->zmqAudioOutTopic.toUtf8().constData(); - zmq_setsockopt(publisher, ZMQ_IDENTITY, topic_text.c_str(), topic_text.length()); - - if(data.length()!=0) - { - zmq_send(publisher, topic_text.c_str(), topic_text.length(), ZMQ_SNDMORE); - zmq_send(publisher, data.data(), data.length(), 0 ); - } - zmq_send(publisher, topic_text.c_str(), 5, ZMQ_SNDMORE); - zmq_send(publisher, hex.toStdString().c_str(), 6, 0 ); - -} - //--new method of mainwindow getting second channel from aerol void MainWindow::ACARSslot(ACARSItem &acarsitem) diff --git a/JAERO/mainwindow.h b/JAERO/mainwindow.h index f7f5476..0e96b09 100644 --- a/JAERO/mainwindow.h +++ b/JAERO/mainwindow.h @@ -5,10 +5,6 @@ #include #include -#ifdef _WIN32 -#include "winsock2.h" -#endif - #include "audiooqpskdemodulator.h" #include "audiomskdemodulator.h" #include "audioburstoqpskdemodulator.h" @@ -23,11 +19,11 @@ #include "databasetext.h" #include "arincparse.h" -#include "zmq.h" #include "audiooutdevice.h" #include "compressedaudiodiskwriter.h" -#include "audioreceiver.h" +#include "zmq_audioreceiver.h" +#include "zmq_audiosender.h" namespace Ui { @@ -44,8 +40,6 @@ class MainWindow : public QMainWindow signals: - void ZMQaudioStop(); - private: enum DemodType{NoDemodType,MSK,OQPSK,BURSTOQPSK,BURSTMSK}; Ui::MainWindow *ui; @@ -69,7 +63,6 @@ class MainWindow : public QMainWindow AudioBurstMskDemodulator *audioburstmskdemodulator; AudioBurstMskDemodulator::Settings audioburstmskdemodulatorsettings; - //bottom textedit output QList > udpsockets_bottom_textedit; @@ -101,16 +94,9 @@ class MainWindow : public QMainWindow QSound *beep; - // zeromq for AMBE - void* context; - void* publisher; - - void connectZMQ(); - int zmqStatus; - std::string connected_url; - //ZeroMQ Audio Receiver - AudioReceiver *zmq_audio_receiver; + ZMQAudioReceiver *zmq_audio_receiver; + ZMQAudioSender *zmq_audio_sender; protected: void closeEvent(QCloseEvent *event); @@ -134,7 +120,6 @@ private slots: void on_action_Settings_triggered(); void on_action_PlaneLog_triggered(); void ACARSslot(ACARSItem &acarsitem); - void Voiceslot(QByteArray &data, QString &hex); void CChannelAssignmentSlot(CChannelAssignmentItem &item); void ERRorslot(QString &error); diff --git a/JAERO/audioreceiver.cpp b/JAERO/zmq_audioreceiver.cpp similarity index 83% rename from JAERO/audioreceiver.cpp rename to JAERO/zmq_audioreceiver.cpp index 2cffb7d..595c062 100644 --- a/JAERO/audioreceiver.cpp +++ b/JAERO/zmq_audioreceiver.cpp @@ -1,11 +1,12 @@ -#include "audioreceiver.h" +#include "zmq_audioreceiver.h" #include "QDebug" #include +#include -void AudioReceiver::ZMQaudioStart(QString address, QString topic) +void ZMQAudioReceiver::Start(QString address, QString topic) { //stop set prams and start thread - ZMQaudioStop(); + Stop(); setParameters(address,topic); future = QtConcurrent::run([=]() { process(); @@ -20,7 +21,7 @@ void AudioReceiver::ZMQaudioStart(QString address, QString topic) } } -void AudioReceiver::process() +void ZMQAudioReceiver::process() { // allocate enough for 96Khz sampling with 1 buffer per second int recsize = 192000; @@ -60,7 +61,7 @@ void AudioReceiver::process() } -AudioReceiver::AudioReceiver(QObject *parent): +ZMQAudioReceiver::ZMQAudioReceiver(QObject *parent): QObject(parent), running(false), context(nullptr), @@ -69,18 +70,18 @@ AudioReceiver::AudioReceiver(QObject *parent): } -AudioReceiver::~AudioReceiver() +ZMQAudioReceiver::~ZMQAudioReceiver() { - ZMQaudioStop(); + Stop(); } -void AudioReceiver::setParameters(QString address, QString topic) +void ZMQAudioReceiver::setParameters(QString address, QString topic) { _address = address; _topic = topic; } -void AudioReceiver::ZMQaudioStop() +void ZMQAudioReceiver::Stop() { running = false; diff --git a/JAERO/audioreceiver.h b/JAERO/zmq_audioreceiver.h similarity index 58% rename from JAERO/audioreceiver.h rename to JAERO/zmq_audioreceiver.h index 9ff13b7..ffa958c 100644 --- a/JAERO/audioreceiver.h +++ b/JAERO/zmq_audioreceiver.h @@ -1,35 +1,28 @@ -#ifndef AUDIORECEIVER_H -#define AUDIORECEIVER_H - - -#include "audioreceiver.h" +#ifndef ZMQ_AUDIORECEIVER_H +#define ZMQ_AUDIORECEIVER_H #include -#include -#include -#include +#include #include - -class AudioReceiver : public QObject +class ZMQAudioReceiver : public QObject { Q_OBJECT public: - explicit AudioReceiver(QObject *parent = 0);//QString address, QString topic); - ~AudioReceiver(); + explicit ZMQAudioReceiver(QObject *parent = 0); + ~ZMQAudioReceiver(); public slots: - void ZMQaudioStop(); - void ZMQaudioStart(QString address, QString topic); + void Stop(); + void Start(QString address, QString topic); signals: void finished(); - private: void setParameters(QString address, QString topic); diff --git a/JAERO/zmq_audiosender.cpp b/JAERO/zmq_audiosender.cpp new file mode 100644 index 0000000..729e025 --- /dev/null +++ b/JAERO/zmq_audiosender.cpp @@ -0,0 +1,55 @@ +#include "zmq_audiosender.h" +#include "zmq.h" +#include + +ZMQAudioSender::ZMQAudioSender(QObject *parent) : QObject(parent) +{ + zmqStatus = -1; + context = zmq_ctx_new(); + publisher = zmq_socket(context, ZMQ_PUB); + + int keepalive = 1; + int keepalivecnt = 10; + int keepaliveidle = 1; + int keepaliveintrv = 1; + + zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE,(void*)&keepalive, sizeof(ZMQ_TCP_KEEPALIVE)); + zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE_CNT,(void*)&keepalivecnt,sizeof(ZMQ_TCP_KEEPALIVE_CNT)); + zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE_IDLE,(void*)&keepaliveidle,sizeof(ZMQ_TCP_KEEPALIVE_IDLE)); + zmq_setsockopt(publisher, ZMQ_TCP_KEEPALIVE_INTVL,(void*)&keepaliveintrv,sizeof(ZMQ_TCP_KEEPALIVE_INTVL)); +} + +void ZMQAudioSender::Start(QString &address, QString &topic) +{ + Stop(); + // bind socket + this->topic=topic; + connected_url=address.toUtf8().constData(); + zmqStatus=zmq_bind(publisher, connected_url.c_str() ); + qDebug()<<"ZMQAudioSender::Start"; +} + +void ZMQAudioSender::Stop() +{ + qDebug()<<"ZMQAudioSender::Stop"; + if(zmqStatus == 0) + { + zmqStatus = zmq_disconnect(publisher, connected_url.c_str()); + } +} + +void ZMQAudioSender::Voiceslot(QByteArray &data, QString &hex) +{ + qDebug()<<"ZMQAudioSender::Voiceslot"; + std::string topic_text = topic.toUtf8().constData(); + zmq_setsockopt(publisher, ZMQ_IDENTITY, topic_text.c_str(), topic_text.length()); + + if(data.length()!=0) + { + zmq_send(publisher, topic_text.c_str(), topic_text.length(), ZMQ_SNDMORE); + zmq_send(publisher, data.data(), data.length(), 0 ); + } + zmq_send(publisher, topic_text.c_str(), 5, ZMQ_SNDMORE); + zmq_send(publisher, hex.toStdString().c_str(), 6, 0 ); +} + diff --git a/JAERO/zmq_audiosender.h b/JAERO/zmq_audiosender.h new file mode 100644 index 0000000..f95eea3 --- /dev/null +++ b/JAERO/zmq_audiosender.h @@ -0,0 +1,24 @@ +#ifndef ZMQ_AUDIOSENDER_H +#define ZMQ_AUDIOSENDER_H + +#include + +class ZMQAudioSender : public QObject +{ + Q_OBJECT +public: + explicit ZMQAudioSender(QObject *parent = 0); + void Start(QString &address,QString &topic); + void Stop(); +signals: +public slots: + void Voiceslot(QByteArray &data, QString &hex); +private: + void* context; + void* publisher; + int zmqStatus; + std::string connected_url; + QString topic; +}; + +#endif // ZMQ_AUDIOSENDER_H From d9794d41df6fd45d2ae035d32c76064d09b30e9f Mon Sep 17 00:00:00 2001 From: jontio Date: Wed, 28 Jul 2021 10:25:12 +1200 Subject: [PATCH 20/22] removed if statments from closeing audio --- JAERO/audioburstmskdemodulator.cpp | 5 +---- JAERO/audioburstoqpskdemodulator.cpp | 5 +---- JAERO/audiomskdemodulator.cpp | 5 +---- JAERO/audiooqpskdemodulator.cpp | 5 +---- JAERO/oqpskdemodulator.cpp | 4 +++- JAERO/zmq_audiosender.cpp | 4 ---- 6 files changed, 7 insertions(+), 21 deletions(-) diff --git a/JAERO/audioburstmskdemodulator.cpp b/JAERO/audioburstmskdemodulator.cpp index ce2189c..1549c88 100644 --- a/JAERO/audioburstmskdemodulator.cpp +++ b/JAERO/audioburstmskdemodulator.cpp @@ -20,10 +20,7 @@ void AudioBurstMskDemodulator::start() void AudioBurstMskDemodulator::stop() { - if(!settings.zmqAudio) - { - if(m_audioInput)m_audioInput->stop(); - } + if(m_audioInput)m_audioInput->stop(); BurstMskDemodulator::stop(); } diff --git a/JAERO/audioburstoqpskdemodulator.cpp b/JAERO/audioburstoqpskdemodulator.cpp index 39246ae..2b482d9 100644 --- a/JAERO/audioburstoqpskdemodulator.cpp +++ b/JAERO/audioburstoqpskdemodulator.cpp @@ -24,10 +24,7 @@ void AudioBurstOqpskDemodulator::start() void AudioBurstOqpskDemodulator::stop() { if(m_audioInput)m_audioInput->stop(); - if(!settings.zmqAudio) - { - BurstOqpskDemodulator::stop(); - } + BurstOqpskDemodulator::stop(); demod2->stop(); } diff --git a/JAERO/audiomskdemodulator.cpp b/JAERO/audiomskdemodulator.cpp index d368841..9329d43 100644 --- a/JAERO/audiomskdemodulator.cpp +++ b/JAERO/audiomskdemodulator.cpp @@ -20,10 +20,7 @@ void AudioMskDemodulator::start() void AudioMskDemodulator::stop() { - if(!settings.zmqAudio) - { - if(m_audioInput)m_audioInput->stop(); - } + if(m_audioInput)m_audioInput->stop(); MskDemodulator::stop(); } diff --git a/JAERO/audiooqpskdemodulator.cpp b/JAERO/audiooqpskdemodulator.cpp index ee05bdb..adab832 100644 --- a/JAERO/audiooqpskdemodulator.cpp +++ b/JAERO/audiooqpskdemodulator.cpp @@ -22,10 +22,7 @@ void AudioOqpskDemodulator::start() void AudioOqpskDemodulator::stop() { - if(!settings.zmqAudio) - { - if(m_audioInput)m_audioInput->stop(); - } + if(m_audioInput)m_audioInput->stop(); OqpskDemodulator::stop(); } diff --git a/JAERO/oqpskdemodulator.cpp b/JAERO/oqpskdemodulator.cpp index 2b4c149..e8c4475 100644 --- a/JAERO/oqpskdemodulator.cpp +++ b/JAERO/oqpskdemodulator.cpp @@ -461,7 +461,9 @@ qint64 OqpskDemodulator::writeData(const char *data, qint64 len) ebnomeasure->Update(dabval); //AGC - sig2*=agc->Update(dabval); //clipping + sig2*=agc->Update(dabval); + + //clipping double abval=std::abs(sig2); if(abval>2.84)sig2=(2.84/abval)*sig2; diff --git a/JAERO/zmq_audiosender.cpp b/JAERO/zmq_audiosender.cpp index 729e025..c60c8bf 100644 --- a/JAERO/zmq_audiosender.cpp +++ b/JAERO/zmq_audiosender.cpp @@ -26,12 +26,10 @@ void ZMQAudioSender::Start(QString &address, QString &topic) this->topic=topic; connected_url=address.toUtf8().constData(); zmqStatus=zmq_bind(publisher, connected_url.c_str() ); - qDebug()<<"ZMQAudioSender::Start"; } void ZMQAudioSender::Stop() { - qDebug()<<"ZMQAudioSender::Stop"; if(zmqStatus == 0) { zmqStatus = zmq_disconnect(publisher, connected_url.c_str()); @@ -40,7 +38,6 @@ void ZMQAudioSender::Stop() void ZMQAudioSender::Voiceslot(QByteArray &data, QString &hex) { - qDebug()<<"ZMQAudioSender::Voiceslot"; std::string topic_text = topic.toUtf8().constData(); zmq_setsockopt(publisher, ZMQ_IDENTITY, topic_text.c_str(), topic_text.length()); @@ -52,4 +49,3 @@ void ZMQAudioSender::Voiceslot(QByteArray &data, QString &hex) zmq_send(publisher, topic_text.c_str(), 5, ZMQ_SNDMORE); zmq_send(publisher, hex.toStdString().c_str(), 6, 0 ); } - From 71389d77f0ef2c2d9a7abbf7234fec000670a6a0 Mon Sep 17 00:00:00 2001 From: jontio Date: Wed, 28 Jul 2021 20:11:18 +1200 Subject: [PATCH 21/22] release version update --- JAERO/JAERO.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JAERO/JAERO.pro b/JAERO/JAERO.pro index 2364c64..e4be479 100644 --- a/JAERO/JAERO.pro +++ b/JAERO/JAERO.pro @@ -11,7 +11,7 @@ #if you are having trubbles focus on things like "LIBS += -L$$OGG_PATH/src/.libs" #remember to compile libvorbis,libogg, and libcorrect before compiling this -DEFINES += JAERO_VERSION=\\\"v1.0.4.12-alpha\\\" +DEFINES += JAERO_VERSION=\\\"v1.0.4.13-alpha\\\" QT += multimedia core network gui svg sql From 8c7ec7e7fe4460c8db6cb2787cbc227f0232110b Mon Sep 17 00:00:00 2001 From: jontio Date: Thu, 29 Jul 2021 22:01:31 +1200 Subject: [PATCH 22/22] zmq receiver changed from blocking to nonblocking --- JAERO/zmq_audioreceiver.cpp | 55 +++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/JAERO/zmq_audioreceiver.cpp b/JAERO/zmq_audioreceiver.cpp index 595c062..0f700c4 100644 --- a/JAERO/zmq_audioreceiver.cpp +++ b/JAERO/zmq_audioreceiver.cpp @@ -21,6 +21,13 @@ void ZMQAudioReceiver::Start(QString address, QString topic) } } +void ZMQAudioReceiver::Stop() +{ + running = false; + if(!future.isFinished())future.waitForFinished(); + emit finished(); +} + void ZMQAudioReceiver::process() { // allocate enough for 96Khz sampling with 1 buffer per second @@ -32,34 +39,44 @@ void ZMQAudioReceiver::process() zmq_setsockopt(subscriber, ZMQ_SUBSCRIBE, _topic.toStdString().c_str(), 5); char buf [recsize]; - char topic[20]; unsigned char rate[4]; quint32 sampleRate; + int received; running = true; while(running) { - zmq_recv(subscriber, topic, 20, 0); - int received = zmq_recv(subscriber, rate, 4, ZMQ_DONTWAIT); + + //blocking call alternative for topic, here we wait for the topic. + //I guess the sleep has to be less then the idle period between messages??? + while(((received = zmq_recv(subscriber, nullptr, 0, ZMQ_DONTWAIT))<0)&&running) + { + usleep(10000); + } + if(!running)break; + + //rate message is next + received = zmq_recv(subscriber, rate, 4, ZMQ_DONTWAIT); + if(!running)break; memcpy(&sampleRate, rate, 4); + + //then audio data received = zmq_recv(subscriber, buf, recsize, ZMQ_DONTWAIT); + if(!running)break; if(received>=0) { QByteArray qdata(buf, received); emit recAudio(qdata,sampleRate); } - else - { - if(running) - { - qDebug()<<"zmq_recv error!!!"; - usleep(100000); - } - } + } -} + if(subscriber)zmq_close(subscriber); + if(context)zmq_ctx_destroy(context); + subscriber=nullptr; + context=nullptr; +} ZMQAudioReceiver::ZMQAudioReceiver(QObject *parent): QObject(parent), @@ -81,18 +98,4 @@ void ZMQAudioReceiver::setParameters(QString address, QString topic) _topic = topic; } -void ZMQAudioReceiver::Stop() -{ - running = false; - - if(subscriber)zmq_close(subscriber); - if(context)zmq_ctx_destroy(context); - if(!future.isFinished())future.waitForFinished(); - - subscriber=nullptr; - context=nullptr; - - emit finished(); - -}