├── .circleci
├── config.yml
└── scripts
│ ├── build_cubicsdr.sh
│ ├── build_liquiddsp.sh
│ ├── build_soapysdr.sh
│ └── build_wxwidgets.sh
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── README.md
├── cmake
├── CubicSDR.desktop.in
├── CubicSDRInfo.plist.in
├── Modules
│ ├── FindJack.cmake
│ ├── FindLiquid.cmake
│ ├── FindRtAudio.cmake
│ └── Findhamlib.cmake
├── cmake_uninstall.cmake.in
├── code_sign.sh.in
└── dmg_sign.sh.in
├── cubicsdr.rc
├── external
├── cubicvr2
│ └── math
│ │ ├── aabb.h
│ │ ├── cubic_math.cpp
│ │ ├── cubic_math.h
│ │ ├── cubic_types.h
│ │ ├── frustum.h
│ │ ├── mat3.h
│ │ ├── mat4.h
│ │ ├── plane.h
│ │ ├── quaternion.h
│ │ ├── sphere.h
│ │ ├── transform.h
│ │ ├── triangle.h
│ │ ├── vec2.h
│ │ ├── vec3.h
│ │ └── vec4.h
├── deb
│ └── deb_post.sh.in
├── hamlib
│ ├── 32
│ │ ├── libhamlib-4.def
│ │ ├── libhamlib-4.dll
│ │ ├── libhamlib-4.exp
│ │ └── libhamlib-4.lib
│ ├── 64
│ │ ├── libhamlib-4.def
│ │ ├── libhamlib-4.dll
│ │ ├── libhamlib-4.exp
│ │ └── libhamlib-4.lib
│ ├── Hamlib_deps_on_Windows.txt
│ └── hamlib
│ │ ├── amplifier.h
│ │ ├── amplist.h
│ │ ├── rig.h
│ │ ├── rig_dll.h
│ │ ├── riglist.h
│ │ ├── rotator.h
│ │ └── rotlist.h
├── liquid-dsp
│ ├── COPYING
│ ├── How_to_build_liquid_dsp_for_Windows.txt
│ ├── config.h
│ ├── gcc
│ │ ├── 32
│ │ │ ├── libliquid.a
│ │ │ └── libliquid.dll
│ │ └── 64
│ │ │ ├── libliquid.a
│ │ │ └── libliquid.dll
│ ├── include
│ │ └── liquid
│ │ │ └── liquid.h
│ ├── makefile.mingw32
│ ├── makefile.mingw64
│ └── msvc
│ │ ├── 32
│ │ ├── libliquid.def
│ │ ├── libliquid.dll
│ │ └── libliquid.lib
│ │ └── 64
│ │ ├── libliquid.def
│ │ ├── libliquid.dll
│ │ └── libliquid.lib
├── lodepng
│ ├── lodepng.cpp
│ └── lodepng.h
├── msvc
│ ├── x64
│ │ └── libwinpthread-1.dll
│ └── x86
│ │ ├── libgcc_s_dw2-1.dll
│ │ ├── libgcc_s_sjlj-1.dll
│ │ └── libwinpthread-1.dll
├── rs232
│ ├── README
│ ├── README.md
│ ├── rs232-linux.cpp
│ ├── rs232-win.cpp
│ └── rs232.h
├── rtaudio
│ ├── README.md
│ ├── RtAudio.cpp
│ └── RtAudio.h
├── tinyxml
│ ├── tinystr.cpp
│ ├── tinystr.h
│ ├── tinyxml.cpp
│ ├── tinyxml.h
│ ├── tinyxmlerror.cpp
│ ├── tinyxmlparser.cpp
│ └── xmltest.cpp
└── wglext
│ └── wglext.h
├── font
├── vera_sans_mono12.bmfc
├── vera_sans_mono12.fnt
├── vera_sans_mono12_0.png
├── vera_sans_mono16.bmfc
├── vera_sans_mono16.fnt
├── vera_sans_mono16_0.png
├── vera_sans_mono18.bmfc
├── vera_sans_mono18.fnt
├── vera_sans_mono18_0.png
├── vera_sans_mono24.bmfc
├── vera_sans_mono24.fnt
├── vera_sans_mono24_0.png
├── vera_sans_mono27.bmfc
├── vera_sans_mono27.fnt
├── vera_sans_mono27_0.png
├── vera_sans_mono32.bmfc
├── vera_sans_mono32.fnt
├── vera_sans_mono32_0.png
├── vera_sans_mono36.bmfc
├── vera_sans_mono36.fnt
├── vera_sans_mono36_0.png
├── vera_sans_mono48.bmfc
├── vera_sans_mono48.fnt
├── vera_sans_mono48_0.png
├── vera_sans_mono64.bmfc
├── vera_sans_mono64.fnt
├── vera_sans_mono64_0.png
├── vera_sans_mono72.bmfc
├── vera_sans_mono72.fnt
├── vera_sans_mono72_0.png
├── vera_sans_mono96.bmfc
├── vera_sans_mono96.fnt
└── vera_sans_mono96_0.png
├── icon
├── CubicSDR.icns
├── CubicSDR.ico
└── NSIS_Header.bmp
└── src
├── AppConfig.cpp
├── AppConfig.h
├── AppFrame.cpp
├── AppFrame.h
├── BookmarkMgr.cpp
├── BookmarkMgr.h
├── CubicSDR.cpp
├── CubicSDR.h
├── CubicSDR.png
├── CubicSDR.xpm
├── CubicSDRDefs.h
├── DemodLabelDialog.cpp
├── DemodLabelDialog.h
├── FrequencyDialog.cpp
├── FrequencyDialog.h
├── IOThread.cpp
├── IOThread.h
├── ModemProperties.cpp
├── ModemProperties.h
├── SessionMgr.cpp
├── SessionMgr.h
├── audio
├── AudioFile.cpp
├── AudioFile.h
├── AudioFileWAV.cpp
├── AudioFileWAV.h
├── AudioSinkFileThread.cpp
├── AudioSinkFileThread.h
├── AudioSinkThread.cpp
├── AudioSinkThread.h
├── AudioThread.cpp
└── AudioThread.h
├── demod
├── DemodDefs.h
├── DemodulatorInstance.cpp
├── DemodulatorInstance.h
├── DemodulatorMgr.cpp
├── DemodulatorMgr.h
├── DemodulatorPreThread.cpp
├── DemodulatorPreThread.h
├── DemodulatorThread.cpp
├── DemodulatorThread.h
├── DemodulatorWorkerThread.cpp
└── DemodulatorWorkerThread.h
├── forms
├── Bookmark
│ ├── BookmarkPanel.cpp
│ ├── BookmarkPanel.fbp
│ ├── BookmarkPanel.h
│ ├── BookmarkView.cpp
│ └── BookmarkView.h
├── Dialog
│ ├── AboutDialog.cpp
│ ├── AboutDialog.fbp
│ ├── AboutDialog.h
│ ├── AboutDialogBase.cpp
│ ├── AboutDialogBase.h
│ ├── ActionDialog.cpp
│ ├── ActionDialog.h
│ ├── ActionDialogBase.cpp
│ ├── ActionDialogBase.fbp
│ ├── ActionDialogBase.h
│ ├── PortSelectorDialog.cpp
│ ├── PortSelectorDialog.fbp
│ ├── PortSelectorDialog.h
│ ├── PortSelectorDialogBase.cpp
│ └── PortSelectorDialogBase.h
├── DigitalConsole
│ ├── DigitalConsole.cpp
│ ├── DigitalConsole.fbp
│ ├── DigitalConsole.h
│ ├── DigitalConsoleFrame.cpp
│ └── DigitalConsoleFrame.h
└── SDRDevices
│ ├── SDRDeviceAdd.cpp
│ ├── SDRDeviceAdd.fbp
│ ├── SDRDeviceAdd.h
│ ├── SDRDeviceAddForm.cpp
│ ├── SDRDeviceAddForm.h
│ ├── SDRDevices.cpp
│ ├── SDRDevices.fbp
│ ├── SDRDevices.h
│ ├── SDRDevicesForm.cpp
│ └── SDRDevicesForm.h
├── modules
└── modem
│ ├── Modem.cpp
│ ├── Modem.h
│ ├── ModemAnalog.cpp
│ ├── ModemAnalog.h
│ ├── ModemDigital.cpp
│ ├── ModemDigital.h
│ ├── analog
│ ├── ModemAM.cpp
│ ├── ModemAM.h
│ ├── ModemCW.cpp
│ ├── ModemCW.h
│ ├── ModemDSB.cpp
│ ├── ModemDSB.h
│ ├── ModemFM.cpp
│ ├── ModemFM.h
│ ├── ModemFMStereo.cpp
│ ├── ModemFMStereo.h
│ ├── ModemIQ.cpp
│ ├── ModemIQ.h
│ ├── ModemLSB.cpp
│ ├── ModemLSB.h
│ ├── ModemNBFM.cpp
│ ├── ModemNBFM.h
│ ├── ModemUSB.cpp
│ └── ModemUSB.h
│ └── digital
│ ├── ModemAPSK.cpp
│ ├── ModemAPSK.h
│ ├── ModemASK.cpp
│ ├── ModemASK.h
│ ├── ModemBPSK.cpp
│ ├── ModemBPSK.h
│ ├── ModemDPSK.cpp
│ ├── ModemDPSK.h
│ ├── ModemFSK.cpp
│ ├── ModemFSK.h
│ ├── ModemGMSK.cpp
│ ├── ModemGMSK.h
│ ├── ModemOOK.cpp
│ ├── ModemOOK.h
│ ├── ModemPSK.cpp
│ ├── ModemPSK.h
│ ├── ModemQAM.cpp
│ ├── ModemQAM.h
│ ├── ModemQPSK.cpp
│ ├── ModemQPSK.h
│ ├── ModemSQAM.cpp
│ ├── ModemSQAM.h
│ ├── ModemST.cpp
│ └── ModemST.h
├── panel
├── MeterPanel.cpp
├── MeterPanel.h
├── ScopePanel.cpp
├── ScopePanel.h
├── SpectrumPanel.cpp
├── SpectrumPanel.h
├── WaterfallPanel.cpp
└── WaterfallPanel.h
├── process
├── FFTDataDistributor.cpp
├── FFTDataDistributor.h
├── FFTVisualDataThread.cpp
├── FFTVisualDataThread.h
├── ScopeVisualProcessor.cpp
├── ScopeVisualProcessor.h
├── SpectrumVisualDataThread.cpp
├── SpectrumVisualDataThread.h
├── SpectrumVisualProcessor.cpp
├── SpectrumVisualProcessor.h
├── VisualProcessor.cpp
└── VisualProcessor.h
├── rig
├── RigThread.cpp
└── RigThread.h
├── sdr
├── SDRDeviceInfo.cpp
├── SDRDeviceInfo.h
├── SDREnumerator.cpp
├── SDREnumerator.h
├── SDRPostThread.cpp
├── SDRPostThread.h
├── SoapySDRThread.cpp
└── SoapySDRThread.h
├── ui
├── GLPanel.cpp
├── GLPanel.h
├── UITestCanvas.cpp
├── UITestCanvas.h
├── UITestContext.cpp
└── UITestContext.h
├── util
├── DataTree.cpp
├── DataTree.h
├── GLExt.cpp
├── GLExt.h
├── GLFont.cpp
├── GLFont.h
├── Gradient.cpp
├── Gradient.h
├── MouseTracker.cpp
├── MouseTracker.h
├── SpinMutex.h
├── ThreadBlockingQueue.cpp
├── ThreadBlockingQueue.h
├── Timer.cpp
└── Timer.h
└── visual
├── ColorTheme.cpp
├── ColorTheme.h
├── GainCanvas.cpp
├── GainCanvas.h
├── ImagePanel.cpp
├── ImagePanel.h
├── InteractiveCanvas.cpp
├── InteractiveCanvas.h
├── MeterCanvas.cpp
├── MeterCanvas.h
├── MeterContext.cpp
├── MeterContext.h
├── ModeSelectorCanvas.cpp
├── ModeSelectorCanvas.h
├── ModeSelectorContext.cpp
├── ModeSelectorContext.h
├── PrimaryGLContext.cpp
├── PrimaryGLContext.h
├── ScopeCanvas.cpp
├── ScopeCanvas.h
├── ScopeContext.cpp
├── ScopeContext.h
├── SpectrumCanvas.cpp
├── SpectrumCanvas.h
├── TuningCanvas.cpp
├── TuningCanvas.h
├── TuningContext.cpp
├── TuningContext.h
├── WaterfallCanvas.cpp
└── WaterfallCanvas.h
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | version: 2.1
2 | jobs:
3 | build:
4 | docker:
5 | - image: cimg/base:current-22.04
6 | resource_class: medium
7 | environment:
8 | - CACHE_DIR: ~/build/wxWidgets/staticlib
9 | steps:
10 | - checkout
11 | - restore_cache:
12 | keys:
13 | - cache-{{ checksum ".circleci/scripts/build_wxwidgets.sh" }}
14 | - run:
15 | name: Install Dependencies
16 | command: |
17 | sudo apt-get update
18 | sudo apt-get install -y build-essential cmake libpulse-dev libgtk-3-dev freeglut3 freeglut3-dev libhamlib-dev
19 | - run:
20 | name: Build wxWidgets
21 | command: bash .circleci/scripts/build_wxwidgets.sh
22 | - run:
23 | name: Build LiquidDSP
24 | command: bash .circleci/scripts/build_liquiddsp.sh
25 | - run:
26 | name: Build SoapySDR
27 | command: bash .circleci/scripts/build_soapysdr.sh
28 | - run:
29 | name: Build CubicSDR
30 | command: bash .circleci/scripts/build_cubicsdr.sh
31 | - save_cache:
32 | key: cache-{{ checksum ".circleci/scripts/build_wxwidgets.sh" }}
33 | paths:
34 | - ~/build/wxWidgets/staticlib
35 |
--------------------------------------------------------------------------------
/.circleci/scripts/build_cubicsdr.sh:
--------------------------------------------------------------------------------
1 | # CubicSDR
2 | mkdir -p $HOME/build/cjcliffe/CubicSDR-build
3 | cd $HOME/build/cjcliffe/CubicSDR-build
4 | cmake ~/project -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=$HOME/build/wxWidgets/staticlib/bin/wx-config -DUSE_HAMLIB=1 -DENABLE_DIGITAL_LAB=1
5 | make -j2
6 |
--------------------------------------------------------------------------------
/.circleci/scripts/build_liquiddsp.sh:
--------------------------------------------------------------------------------
1 | # Liquid-DSP
2 | mkdir -p $HOME/build/jgaeddert
3 | cd $HOME/build/jgaeddert
4 | git clone https://github.com/jgaeddert/liquid-dsp.git
5 |
6 | cd $HOME/build/jgaeddert/liquid-dsp
7 | ./bootstrap.sh
8 |
9 | echo "Configuring liquid-dsp.."
10 | ./configure > /dev/null
11 |
12 | echo "Building liquid-dsp.."
13 | make -j2 > /dev/null
14 | sudo make install
15 |
--------------------------------------------------------------------------------
/.circleci/scripts/build_soapysdr.sh:
--------------------------------------------------------------------------------
1 | # Soapy SDR
2 | mkdir -p $HOME/build/pothosware/SoapySDR-build
3 |
4 | cd $HOME/build/pothosware
5 | git clone https://github.com/pothosware/SoapySDR.git
6 |
7 | cd $HOME/build/pothosware/SoapySDR-build
8 | cmake $HOME/build/pothosware/SoapySDR -DCMAKE_BUILD_TYPE=Release
9 |
10 | echo "Building SoapySDR.."
11 | make -j2 > /dev/null
12 |
13 | sudo make install
14 |
--------------------------------------------------------------------------------
/.circleci/scripts/build_wxwidgets.sh:
--------------------------------------------------------------------------------
1 | # wxWidgets
2 | if [ -f "$HOME/build/wxWidgets/staticlib/bin/wx-config" ]; then
3 | echo "wxWidgets cache found; skipping.."
4 | exit 0
5 | else
6 | echo "wxWidgets cache not found; building.."
7 | fi
8 |
9 |
10 | echo "Fetch wxWidgets.."
11 | mkdir -p $HOME/build/wxWidgets/staticlib
12 | cd $HOME/build/wxWidgets
13 | wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1.tar.bz2 > /dev/null
14 |
15 | echo "Unpacking wxWidgets.."
16 | tar -xvjf wxWidgets-3.2.1.tar.bz2 > /dev/null
17 | cd wxWidgets-3.2.1/
18 | ./autogen.sh
19 |
20 |
21 | if [ "$(uname)" == "Linux" ]; then
22 | ./configure --with-opengl --disable-glcanvasegl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webview --disable-webviewwebkit --prefix=`echo $HOME/build/wxWidgets/staticlib` CXXFLAGS="-std=c++0x"
23 | elif [ "$(uname)" == "Darwin" ]; then
24 | ./configure --with-opengl --disable-glcanvasegl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --with-mac --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webkit --disable-webview --disable-webviewwebkit --prefix=`echo $HOME/build/wxWidgets/staticlib` CXXFLAGS="-std=c++0x" --with-libiconv=/usr
25 | fi
26 |
27 | echo "Building wxWidgets.."
28 | make V=1 -j2
29 | make install
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build/
2 | cmake_build/
3 | dist/
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | CubicSDR [](https://dl.circleci.com/status-badge/redirect/gh/cjcliffe/CubicSDR/tree/master)
2 | ========
3 |
4 | Cross-Platform Software-Defined Radio Application
5 |
6 | - The latest releases are available on the [CubicSDR Releases](https://github.com/cjcliffe/CubicSDR/releases) page.
7 | - Build instructions can be found at the [CubicSDR Wiki](https://github.com/cjcliffe/CubicSDR/wiki) page.
8 | - Manual is available at [cubicsdr.readthedocs.io](http://cubicsdr.readthedocs.io).
9 | - Manual contributions can be submitted to the [CubicSDR-Manual](https://github.com/cjcliffe/CubicSDR-Manual) repository.
10 |
11 | Utilizes:
12 | --------
13 | - liquid-dsp (http://liquidsdr.org/ -- https://github.com/jgaeddert/liquid-dsp)
14 | - SoapySDR (http://www.pothosware.com/ -- https://github.com/pothosware/SoapySDR)
15 | - RtAudio (http://www.music.mcgill.ca/~gary/rtaudio/ -- http://github.com/thestk/rtaudio/)
16 | - LodePNG (http://lodev.org/lodepng/)
17 | - BMFont (http://www.angelcode.com/ -- http://www.angelcode.com/products/bmfont/)
18 | - Bitstream Vera font (http://en.wikipedia.org/wiki/Bitstream_Vera)
19 | - OpenGL (https://www.opengl.org/)
20 | - wxWidgets (https://www.wxwidgets.org/)
21 | - CMake (http://www.cmake.org/)
22 |
23 | Optional Libs:
24 | --------
25 | - FFTW3 (can be compiled into liquid-dsp if desired) (http://www.fftw.org/ -- https://github.com/FFTW/fftw3)
26 | - hamlib (https://github.com/Hamlib/Hamlib)
27 |
28 | Recommended minimum requirements:
29 | --------------------
30 | - Multi-core processor system with at least 1GB RAM.
31 | - Graphics card with at least 128MB video memory and OpenGL 3.x or ES 2.0 support.
32 | - OSX 10.9+ for Mac binary releases.
33 | - Windows 7+ for 64 or 32-bit Windows binary releases.
34 | - Linux and other embedded distribution support yet to be indexed, known to at least work on Debian 8+ and Ubuntu 14+.
35 |
36 | Platform build scripts and test builds:
37 | --------------------------------------
38 | - MacOS (https://github.com/cjcliffe/CubicSDR-macOSBuild)
39 | - Windows (https://github.com/cjcliffe/CubicSDR-WinBuild)
40 | - Linux (AppImage) (https://github.com/cjcliffe/CubicSDR-AppImageKit)
41 |
42 |
43 | License:
44 | -------
45 | - GPL-2.0+
46 |
--------------------------------------------------------------------------------
/cmake/CubicSDR.desktop.in:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Type=Application
3 | Exec=CubicSDR %u
4 | Icon=@CMAKE_INSTALL_PREFIX@/share/cubicsdr/CubicSDR
5 | Terminal=false
6 | Name=CubicSDR
7 | GenericName=CubicSDR
8 | Comment=Software-Defined Radio Application
9 | Categories=Science;HamRadio;DataVisualization;
10 |
--------------------------------------------------------------------------------
/cmake/CubicSDRInfo.plist.in:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${MACOSX_BUNDLE_EXECUTABLE_NAME}
9 | CFBundleGetInfoString
10 | ${MACOSX_BUNDLE_INFO_STRING}
11 | CFBundleIconFile
12 | ${MACOSX_BUNDLE_ICON_FILE}
13 | CFBundleIdentifier
14 | ${MACOSX_BUNDLE_GUI_IDENTIFIER}
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleLongVersionString
18 | ${MACOSX_BUNDLE_LONG_VERSION_STRING}
19 | CFBundleName
20 | ${MACOSX_BUNDLE_BUNDLE_NAME}
21 | CFBundlePackageType
22 | APPL
23 | CFBundleShortVersionString
24 | ${MACOSX_BUNDLE_SHORT_VERSION_STRING}
25 | CFBundleSignature
26 | ????
27 | CFBundleVersion
28 | ${MACOSX_BUNDLE_BUNDLE_VERSION}
29 | CSResourcesFileMapped
30 |
31 | LSRequiresCarbon
32 |
33 | NSHumanReadableCopyright
34 | ${MACOSX_BUNDLE_COPYRIGHT}
35 | NSHighResolutionCapable
36 |
37 | NSSupportsAutomaticGraphicsSwitching
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/cmake/Modules/FindJack.cmake:
--------------------------------------------------------------------------------
1 | # Try to find JACK
2 | # This will define the following variables:
3 | #
4 | # JACK_FOUND - Whether Jack was found.
5 | # JACK_INCLUDE_DIRS - Jack include directories.
6 | # JACK_LIBRARIES - Jack libraries.
7 |
8 | include(FindPackageHandleStandardArgs)
9 |
10 | if(JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
11 |
12 | # in cache already
13 | set(JACK_FOUND TRUE)
14 |
15 | else()
16 |
17 | find_package(PkgConfig)
18 | if(PKG_CONFIG_FOUND)
19 | pkg_check_modules(_JACK jack)
20 | endif(PKG_CONFIG_FOUND)
21 |
22 | find_path(JACK_INCLUDE_DIR
23 | NAMES
24 | jack/jack.h
25 | PATHS
26 | ${_JACK_INCLUDEDIR}
27 | )
28 |
29 | find_library(JACK_LIBRARY
30 | NAMES
31 | jack
32 | PATHS
33 | ${_JACK_LIBDIR}
34 | )
35 |
36 | set(JACK_INCLUDE_DIRS
37 | ${JACK_INCLUDE_DIR}
38 | )
39 |
40 | set(JACK_LIBRARIES
41 | ${JACK_LIBRARY}
42 | )
43 |
44 | find_package_handle_standard_args(Jack DEFAULT_MSG JACK_LIBRARIES JACK_INCLUDE_DIRS)
45 |
46 | # show the JACK_INCLUDE_DIRS and JACK_LIBRARIES variables only in the advanced view
47 | mark_as_advanced(JACK_INCLUDE_DIR JACK_LIBRARY JACK_INCLUDE_DIRS JACK_LIBRARIES)
48 |
49 | endif()
50 |
51 |
--------------------------------------------------------------------------------
/cmake/Modules/FindLiquid.cmake:
--------------------------------------------------------------------------------
1 | # - Find LIQUID
2 | # Find the native LIQUID includes and library
3 | #
4 | # LIQUID_INCLUDES - where to find LIQUID.h
5 | # LIQUID_LIBRARIES - List of libraries when using LIQUID.
6 | # LIQUID_FOUND - True if LIQUID found.
7 |
8 | if (LIQUID_INCLUDES)
9 | # Already in cache, be silent
10 | set (LIQUID_FIND_QUIETLY TRUE)
11 | endif (LIQUID_INCLUDES)
12 |
13 | find_path (LIQUID_INCLUDES liquid/liquid.h)
14 |
15 | find_library (LIQUID_LIBRARIES NAMES liquid)
16 |
17 | # handle the QUIETLY and REQUIRED arguments and set LIQUID_FOUND to TRUE if
18 | # all listed variables are TRUE
19 | include (FindPackageHandleStandardArgs)
20 | find_package_handle_standard_args (LIQUID DEFAULT_MSG LIQUID_LIBRARIES LIQUID_INCLUDES)
21 |
22 | #mark_as_advanced (LIQUID_LIBRARIES LIQUID_INCLUDES)
23 |
--------------------------------------------------------------------------------
/cmake/Modules/FindRtAudio.cmake:
--------------------------------------------------------------------------------
1 | # https://github.com/idiap/juicer/blob/master/cmake/FindRtAudio.cmake
2 | #
3 | # Copyright 2015 by Idiap Research Institute
4 | #
5 | # Licensed under 3-clause BSD.
6 | #
7 | # Author(s):
8 | # Phil Garner, November 2015
9 | #
10 | # ...but basically copied from FindSndFile in libube, in turn from the examples
11 | # on the web.
12 | #
13 |
14 | #
15 | # Try to find RtAudio
16 | # Once done this will define
17 | # RTAUDIO_FOUND - System has RtAudio
18 | # RTAUDIO_INCLUDE_DIR - The RtAudio include directories
19 | # RTAUDIO_LIBRARIES - The libraries needed to use RtAudio
20 | # RTAUDIO_DEFINITIONS - Compiler switches required for using RtAudio
21 | # RTAUDIO_VERSION_STRING - the version of RtAudio found
22 | #
23 |
24 | find_package(PkgConfig)
25 | pkg_check_modules(PC_RTAUDIO rtaudio)
26 |
27 | set(RTAUDIO_DEFINITIONS ${PC_RTAUDIO_CFLAGS_OTHER})
28 | set(RTAUDIO_VERSION_STRING ${PC_RTAUDIO_VERSION})
29 |
30 | find_path(
31 | RTAUDIO_INCLUDE_DIR RtAudio.h
32 | HINTS ${PC_RTAUDIO_INCLUDEDIR} ${PC_RTAUDIO_INCLUDE_DIRS}
33 | )
34 |
35 | find_library(
36 | RTAUDIO_LIBRARIES NAMES rtaudio
37 | HINTS ${PC_RTAUDIO_LIBDIR} ${PC_RTAUDIO_LIBRARY_DIRS}
38 | )
39 |
40 | include(FindPackageHandleStandardArgs)
41 | find_package_handle_standard_args(
42 | RtAudio
43 | REQUIRED_VARS RTAUDIO_LIBRARIES RTAUDIO_INCLUDE_DIR
44 | VERSION_VAR RTAUDIO_VERSION_STRING
45 | )
46 |
47 | #mark_as_advanced(RTAUDIO_INCLUDE_DIR RTAUDIO_LIBRARIES)
48 |
49 |
--------------------------------------------------------------------------------
/cmake/Modules/Findhamlib.cmake:
--------------------------------------------------------------------------------
1 | # - Try to find Hamlib
2 | # Author: George L. Emigh - AB4BD
3 | #
4 | # Change Log: Charles J. Cliffe
5 | # Updates:
6 | # Jan 2015 - Add /opt/ paths for OSX MacPorts
7 | # - Fix HAMLIB_INCLUDE_DIR absolute search
8 | # - Add static lib support
9 | # TODO:
10 | # Windows support
11 | #
12 | # HAMLIB_FOUND - system has Hamlib
13 | # HAMLIB_LIBRARY - location of the library for hamlib
14 | # HAMLIB_INCLUDE_DIR - location of the include files for hamlib
15 |
16 | set(HAMLIB_FOUND FALSE)
17 |
18 | find_path(HAMLIB_INCLUDE_DIR
19 | NAMES hamlib/rig.h
20 | PATHS
21 | /usr/include
22 | /usr/local/include
23 | /opt/local/include
24 | )
25 |
26 | find_library(HAMLIB_LIBRARY
27 | NAMES hamlib
28 | PATHS
29 | /usr/lib64/hamlib
30 | /usr/lib/hamlib
31 | /usr/lib64
32 | /usr/lib
33 | /usr/local/lib64/hamlib
34 | /usr/local/lib/hamlib
35 | /usr/local/lib64
36 | /usr/local/lib
37 | /opt/local/lib
38 | /opt/local/lib/hamlib
39 | )
40 |
41 | find_library(HAMLIB_STATIC_LIBRARY
42 | NAMES libhamlib.a
43 | PATHS
44 | /usr/lib64/hamlib
45 | /usr/lib/hamlib
46 | /usr/lib64
47 | /usr/lib
48 | /usr/local/lib64/hamlib
49 | /usr/local/lib/hamlib
50 | /usr/local/lib64
51 | /usr/local/lib
52 | /opt/local/lib
53 | /opt/local/lib/hamlib
54 | )
55 |
56 | GET_FILENAME_COMPONENT(HAMLIB_LIB_FOLDER ${HAMLIB_STATIC_LIBRARY} DIRECTORY)
57 |
58 | file(GLOB HAMLIB_STATIC_MODS ${HAMLIB_LIB_FOLDER}/hamlib-*.a)
59 |
60 | if(HAMLIB_INCLUDE_DIR AND HAMLIB_LIBRARY)
61 | set(HAMLIB_FOUND TRUE)
62 | # message(STATUS "Hamlib version: ${VERSION}")
63 | message(STATUS "Found hamlib library at: ${HAMLIB_LIBRARY}")
64 | message(STATUS "Found hamlib static library at: ${HAMLIB_STATIC_LIBRARY}")
65 | message(STATUS "Found hamlib static modules: ${HAMLIB_STATIC_MODS}")
66 | message(STATUS "Found hamlib include directory at: ${HAMLIB_INCLUDE_DIR}")
67 | endif(HAMLIB_INCLUDE_DIR AND HAMLIB_LIBRARY)
68 |
69 | IF(NOT HAMLIB_FOUND)
70 | IF(NOT HAMLIB_FIND_QUIETLY)
71 | MESSAGE(STATUS "HAMLIB was not found.")
72 | ELSE(NOT HAMLIB_FIND_QUIETLY)
73 | IF(HAMLIB_FIND_REQUIRED)
74 | MESSAGE(FATAL_ERROR "HAMLIB was not found.")
75 | ENDIF(HAMLIB_FIND_REQUIRED)
76 | ENDIF(NOT HAMLIB_FIND_QUIETLY)
77 | ENDIF(NOT HAMLIB_FOUND)
--------------------------------------------------------------------------------
/cmake/cmake_uninstall.cmake.in:
--------------------------------------------------------------------------------
1 | IF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
2 | MESSAGE(FATAL_ERROR "Cannot find install manifest: '${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt'")
3 | ENDIF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
4 |
5 | FILE(READ "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt" files)
6 | STRING(REGEX REPLACE " " ";" files "${files}")
7 | STRING(REGEX REPLACE "\n" ";" files "${files}")
8 | FOREACH(file ${files})
9 | MESSAGE(STATUS "Uninstalling '$ENV{DESTDIR}${file}'")
10 | IF(EXISTS "$ENV{DESTDIR}${file}")
11 | EXEC_PROGRAM(
12 | "${CMAKE_COMMAND}" ARGS "-E remove '$ENV{DESTDIR}${file}'"
13 | OUTPUT_VARIABLE rm_out
14 | RETURN_VALUE rm_retval
15 | )
16 | IF(NOT "${rm_retval}" STREQUAL 0)
17 | MESSAGE(FATAL_ERROR "Problem when removing '$ENV{DESTDIR}${file}'")
18 | ENDIF(NOT "${rm_retval}" STREQUAL 0)
19 | ELSE(EXISTS "$ENV{DESTDIR}${file}")
20 | MESSAGE(STATUS "File '$ENV{DESTDIR}${file}' does not exist.")
21 | ENDIF(EXISTS "$ENV{DESTDIR}${file}")
22 | ENDFOREACH(file)
--------------------------------------------------------------------------------
/cmake/code_sign.sh.in:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | for f in ${APPS}/Contents/**/*.dylib
3 | do
4 | /usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" $f
5 | done
6 | for f in ${APPS}/Contents/MacOS/modules/*.so
7 | do
8 | /usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" $f
9 | done
10 |
11 | /usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" ${APPS}
12 |
--------------------------------------------------------------------------------
/cmake/dmg_sign.sh.in:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | /usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" CubicSDR-${CPACK_PACKAGE_VERSION}-Darwin.dmg
3 |
--------------------------------------------------------------------------------
/cubicsdr.rc:
--------------------------------------------------------------------------------
1 | id ICON "icon/CubicSDR.ico"
2 | frame_icon ICON "icon/CubicSDR.ico"
--------------------------------------------------------------------------------
/external/cubicvr2/math/cubic_math.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // math.cpp
3 | // CubicVR2
4 | //
5 | // Created by Charles J. Cliffe on 2013-02-22.
6 | // Copyright (c) 2013 Charles J. Cliffe. All rights reserved.
7 | //
8 |
9 | #include "cubic_math.h"
10 |
11 | namespace CubicVR {
12 | std::ostream& operator<<(std::ostream &strm, const vec4 &v) {
13 | return strm << "{" << v.x << ", " << v.y << ", " << v.z << ", " << v.w << "}";
14 | }
15 | std::ostream& operator<<(std::ostream &strm, const vec3 &v) {
16 | return strm << "{" << v.x << ", " << v.y << ", " << v.z << "}";
17 | }
18 | std::ostream& operator<<(std::ostream &strm, const vec2 &v) {
19 | return strm << "{" << v.x << ", " << v.y << "}";
20 | }
21 | std::ostream& operator<<(std::ostream &strm, const mat4 &m) {
22 | return strm << "{ " << m[0] << ", " << m[1] << ", " << m[2] << ", " << m[3] << endl
23 | << " " << m[4] << ", " << m[5] << ", " << m[6] << ", " << m[7] << endl
24 | << " " << m[8] << ", " << m[9] << ", " << m[10] << ", " << m[11] << endl
25 | << " " << m[12] << ", " << m[13] << ", " << m[14] << ", " << m[15] << " }" << endl;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/external/cubicvr2/math/cubic_math.h:
--------------------------------------------------------------------------------
1 | //
2 | // math.h
3 | // CubicVR2
4 | //
5 | // Created by Charles J. Cliffe on 2013-02-22.
6 | // Copyright (c) 2013 Charles J. Cliffe. All rights reserved.
7 | //
8 |
9 | #ifndef __CubicVR2__math__
10 | #define __CubicVR2__math__
11 |
12 | #include
13 |
14 | #include "aabb.h"
15 | #include "mat3.h"
16 | #include "mat4.h"
17 | #include "quaternion.h"
18 | #include "transform.h"
19 | #include "triangle.h"
20 | #include "vec2.h"
21 | #include "vec3.h"
22 | #include "vec4.h"
23 | #include "plane.h"
24 | #include "sphere.h"
25 | #include "frustum.h"
26 |
27 | namespace CubicVR {
28 | std::ostream& operator<<(std::ostream &strm, const vec4 &v);
29 | std::ostream& operator<<(std::ostream &strm, const vec3 &v);
30 | std::ostream& operator<<(std::ostream &strm, const vec2 &v);
31 | std::ostream& operator<<(std::ostream &strm, const mat4 &m);
32 | }
33 |
34 |
35 | #endif /* defined(__CubicVR2__math__) */
36 |
--------------------------------------------------------------------------------
/external/cubicvr2/math/cubic_types.h:
--------------------------------------------------------------------------------
1 | //
2 | // types.h
3 | // CubicVR2
4 | //
5 | // Created by Charles J. Cliffe on 2013-02-21.
6 | // Copyright (c) 2013 Charles J. Cliffe. All rights reserved.
7 | //
8 |
9 | #ifndef CubicVR2_types_h
10 | #define CubicVR2_types_h
11 |
12 | namespace CubicVR {
13 |
14 | typedef double __float64;
15 | typedef float __float32;
16 |
17 | typedef __float32 __float;
18 |
19 | #define COMBINE(x,y) x ## y
20 | #define floatSG(c, x,y) \
21 | __float COMBINE(get,x)() { return y; } \
22 | c & COMBINE(set,x)(__float value) { y = value; return *this; }
23 | #define intSG(c, x,y) \
24 | int COMBINE(get,x)() { return y; } \
25 | c & COMBINE(set,x)(int value) { y = value; return *this; }
26 | #define uintSG(c, x,y) \
27 | unsigned int COMBINE(get,x)() { return y; } \
28 | c & COMBINE(set,x)(unsigned int value) { y = value; return *this; }
29 | #define boolSG(c,x,y) \
30 | bool COMBINE(get,x)() { return y; } \
31 | c & COMBINE(set,x)(bool value) { y = value; return *this; }
32 | #define stringSG(c,x,y) \
33 | string COMBINE(get,x)() { return y; } \
34 | c & COMBINE(set,x)(string value) { y = value; return *this; }
35 | #define isBoolSG(c,x,y) \
36 | bool COMBINE(is,x)() { return y; } \
37 | c & COMBINE(set,x)(bool value) { y = value; return *this; }
38 |
39 | }
40 |
41 | #include
42 | #ifndef M_PI
43 | #define M_PI 3.14159265358979323846
44 | #endif
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/external/cubicvr2/math/mat3.h:
--------------------------------------------------------------------------------
1 | //
2 | // mat3.h
3 | // CubicVR2
4 | //
5 | // Created by Charles J. Cliffe on 2013-02-22.
6 | // Copyright (c) 2013 Charles J. Cliffe. All rights reserved.
7 | //
8 |
9 | #ifndef __CubicVR2__mat3__
10 | #define __CubicVR2__mat3__
11 |
12 | #include
13 | #include "vec3.h"
14 | #include
15 | #include
16 | namespace CubicVR {
17 |
18 | #define mat3SG(c,x,y) \
19 | mat3 COMBINE(get,x)() { return y; } \
20 | c & COMBINE(set,x)(mat3 value) { y = value; return *this; }
21 |
22 | struct mat3 {
23 |
24 | __float a,b,c,d,e,f,g,h,i;
25 |
26 | //access as-array:
27 | inline __float& operator [] (size_t i) {
28 | __float* as_array = (__float*)this;
29 | return (as_array[i]);
30 | }
31 |
32 | inline const __float& operator [] (size_t i) const {
33 | __float* as_array = (__float*)this;
34 | return (as_array[i]);
35 | }
36 |
37 | mat3(__float ai,__float bi,__float ci,__float di,__float ei,__float fi,__float gi,__float hi,__float ii) {
38 | a = ai; b = bi; c = ci; d = di; e = ei; f = fi; g = gi; h = hi; i = ii;
39 | };
40 |
41 | mat3() { memset((__float *)this, 0, sizeof(mat3)); }
42 | // mat3 operator* (mat4 m) { return mat3::multiply(*this,m); };
43 | // void operator*= (mat4 m) { *this = mat3::multiply(*this,m); };
44 |
45 |
46 | static mat3 identity() {
47 | return mat3(1.0f, 0.0f, 0.0f,
48 | 0.0f, 1.0f, 0.0f,
49 | 0.0f, 0.0f, 1.0f);
50 | }
51 |
52 | static void transpose_inline(mat3 &mat) {
53 | __float a01 = mat[1], a02 = mat[2], a12 = mat[5];
54 |
55 | mat[1] = mat[3];
56 | mat[2] = mat[6];
57 | mat[3] = a01;
58 | mat[5] = mat[7];
59 | mat[6] = a02;
60 | mat[7] = a12;
61 | };
62 |
63 | static mat3 transpose(mat3 mat_in) {
64 | __float a01 = mat_in[1], a02 = mat_in[2], a12 = mat_in[5];
65 |
66 | mat3 mat;
67 |
68 | mat[1] = mat_in[3];
69 | mat[2] = mat_in[6];
70 | mat[3] = a01;
71 | mat[5] = mat_in[7];
72 | mat[6] = a02;
73 | mat[7] = a12;
74 |
75 | return mat;
76 | };
77 |
78 | static vec3 multiply(mat3 m1, vec3 m2) {
79 | vec3 mOut;
80 |
81 | mOut[0] = m2[0] * m1[0] + m2[3] * m1[1] + m2[6] * m1[2] ;
82 | mOut[1] = m2[1] * m1[0] + m2[4] * m1[1] + m2[7] * m1[2] ;
83 | mOut[2] = m2[2] * m1[0] + m2[5] * m1[1] + m2[8] * m1[2];
84 |
85 | return mOut;
86 | };
87 | };
88 |
89 |
90 | }
91 |
92 | #endif /* defined(__CubicVR2__mat3__) */
93 |
--------------------------------------------------------------------------------
/external/cubicvr2/math/plane.h:
--------------------------------------------------------------------------------
1 | //
2 | // plane.h
3 | // CubicVR2
4 | //
5 | // Created by Charles J. Cliffe on 2013-02-22.
6 | // Copyright (c) 2013 Charles J. Cliffe. All rights reserved.
7 | //
8 |
9 | #ifndef CubicVR2_plane_h
10 | #define CubicVR2_plane_h
11 |
12 | #include "vec4.h"
13 | #include "vec3.h"
14 |
15 | namespace CubicVR {
16 |
17 | struct plane : vec4 {
18 | static int classifyPoint(vec4 plane, vec3 pt) {
19 | __float dist = (plane[0] * pt[0]) + (plane[1] * pt[1]) + (plane[2] * pt[2]) + (plane[3]);
20 | if (dist < 0) {
21 | return -1;
22 | }
23 | else if (dist > 0) {
24 | return 1;
25 | }
26 | return 0;
27 | };
28 | };
29 |
30 | }
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/external/cubicvr2/math/sphere.h:
--------------------------------------------------------------------------------
1 | //
2 | // sphere.h
3 | // CubicVR2
4 | //
5 | // Created by Charles J. Cliffe on 2013-02-22.
6 | // Copyright (c) 2013 Charles J. Cliffe. All rights reserved.
7 | //
8 |
9 | #ifndef CubicVR2_sphere_h
10 | #define CubicVR2_sphere_h
11 |
12 | #include "vec3.h"
13 | #include "vec4.h"
14 |
15 | namespace CubicVR {
16 |
17 | struct sphere {
18 | bool intersects(vec4 sphere, vec4 other) {
19 | vec3 spherePos(sphere[0], sphere[1], sphere[2]);
20 | vec3 otherPos(other[0], other[1], other[2]);
21 | vec3 diff = vec3::subtract(spherePos, otherPos);
22 |
23 | __float mag = sqrtf(diff[0] * diff[0] + diff[1] * diff[1] + diff[2] * diff[2]);
24 | __float sum_radii = sphere[3] + other[3];
25 |
26 | if (mag * mag < sum_radii * sum_radii) {
27 | return true;
28 | }
29 | return false;
30 | }
31 | };
32 | }
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/external/cubicvr2/math/triangle.h:
--------------------------------------------------------------------------------
1 | //
2 | // triangle.h
3 | // CubicVR2
4 | //
5 | // Created by Charles J. Cliffe on 2013-02-22.
6 | // Copyright (c) 2013 Charles J. Cliffe. All rights reserved.
7 | //
8 |
9 | #ifndef __CubicVR2__triangle__
10 | #define __CubicVR2__triangle__
11 |
12 | #include
13 | #include "vec3.h"
14 |
15 | namespace CubicVR {
16 |
17 | struct triangle {
18 | static vec3 normal(vec3 pt1, vec3 pt2, vec3 pt3) {
19 |
20 | __float v10 = pt1[0] - pt2[0];
21 | __float v11 = pt1[1] - pt2[1];
22 | __float v12 = pt1[2] - pt2[2];
23 | __float v20 = pt2[0] - pt3[0];
24 | __float v21 = pt2[1] - pt3[1];
25 | __float v22 = pt2[2] - pt3[2];
26 |
27 | vec3 mOut;
28 |
29 | mOut[0] = v11 * v22 - v12 * v21;
30 | mOut[1] = v12 * v20 - v10 * v22;
31 | mOut[2] = v10 * v21 - v11 * v20;
32 |
33 | return mOut;
34 | };
35 | };
36 |
37 | }
38 |
39 |
40 | #endif /* defined(__CubicVR2__triangle__) */
41 |
--------------------------------------------------------------------------------
/external/cubicvr2/math/vec4.h:
--------------------------------------------------------------------------------
1 | //
2 | // vec4.h
3 | // CubicVR2
4 | //
5 | // Created by Charles J. Cliffe on 2013-02-22.
6 | // Copyright (c) 2013 Charles J. Cliffe. All rights reserved.
7 | //
8 |
9 | #ifndef __CubicVR2__vec4__
10 | #define __CubicVR2__vec4__
11 |
12 | #include
13 | #include "cubic_types.h"
14 | #include
15 | #include
16 |
17 | namespace CubicVR {
18 |
19 | #define vec4SG(c,x,y) \
20 | vec3 COMBINE(get,x)() { return y; } \
21 | c & COMBINE(set,x)(vec3 value) { y = value; return *this; }
22 |
23 | struct vec4 {
24 |
25 | __float x, y, z, w;
26 |
27 | public:
28 | __float& r() { return x; }
29 | __float& g() { return y; }
30 | __float& b() { return z; }
31 | __float& a() { return w; }
32 |
33 | //access as-array:
34 | inline __float& operator [] (size_t i) {
35 | __float* as_array = (__float*)this;
36 | return (as_array[i]);
37 | }
38 |
39 | inline const __float& operator [] (size_t i) const {
40 | __float* as_array = (__float*)this;
41 | return (as_array[i]);
42 | }
43 |
44 | vec4 (__float xi,__float yi,__float zi,__float wi) { x = xi; y = yi; z = zi; w = wi; }
45 | vec4 () { x = y = z = w = 0.0f; }
46 |
47 | vec4 operator*(__float v) { return vec4(x*v, y*v, z*v, w*v); }
48 | // vec4 operator*(vec4 v) { return vec4::cross(*this,v); }
49 | // vec4 operator+(vec4 v) { return vec4::add(*this,v); }
50 | // vec4 operator-(vec4 v) { return vec4::subtract(*this,v); }
51 |
52 | static __float length(vec4 a, vec4 b) {
53 | __float v[4] = {a[0]-b[0],a[1]-b[1],a[2]-b[2],a[3]-b[3]};
54 | return sqrtf(v[0] * v[0] + v[1] * v[1] + v[2] * v[2] + v[3] * v[3]);
55 | };
56 |
57 | static __float length(vec4 v) {
58 | return sqrtf(v[0] * v[0] + v[1] * v[1] + v[2] * v[2] + v[3] * v[3]);
59 | };
60 |
61 | static vec4 normalize(vec4 v) {
62 | __float n = sqrtf(vec4::length(v));
63 |
64 | v[0] /= n;
65 | v[1] /= n;
66 | v[2] /= n;
67 | v[3] /= n;
68 |
69 | return v;
70 | };
71 |
72 | static __float dot(vec4 v1, vec4 v2) {
73 | return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2] + v1[3] * v2[3];
74 | };
75 |
76 | };
77 |
78 | }
79 |
80 | #endif /* defined(__CubicVR2__vec4__) */
81 |
--------------------------------------------------------------------------------
/external/deb/deb_post.sh.in:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # found at https://github.com/paralect/robomongo/blob/master/install/linux/fixup_deb.sh.in
3 | set -e
4 | mkdir fix_up_deb
5 | dpkg-deb -x @CPACK_PACKAGE_FILE_NAME@.deb fix_up_deb
6 | dpkg-deb --control @CPACK_PACKAGE_FILE_NAME@.deb fix_up_deb/DEBIAN
7 | rm @CPACK_PACKAGE_FILE_NAME@.deb
8 | chmod 0644 fix_up_deb/DEBIAN/md5sums
9 | find -type d -print0 | xargs -0 chmod 755
10 | fakeroot dpkg -b fix_up_deb @CPACK_PACKAGE_FILE_NAME@.deb
11 | rm -rf fix_up_deb
12 |
--------------------------------------------------------------------------------
/external/hamlib/32/libhamlib-4.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/hamlib/32/libhamlib-4.dll
--------------------------------------------------------------------------------
/external/hamlib/32/libhamlib-4.exp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/hamlib/32/libhamlib-4.exp
--------------------------------------------------------------------------------
/external/hamlib/32/libhamlib-4.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/hamlib/32/libhamlib-4.lib
--------------------------------------------------------------------------------
/external/hamlib/64/libhamlib-4.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/hamlib/64/libhamlib-4.dll
--------------------------------------------------------------------------------
/external/hamlib/64/libhamlib-4.exp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/hamlib/64/libhamlib-4.exp
--------------------------------------------------------------------------------
/external/hamlib/64/libhamlib-4.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/hamlib/64/libhamlib-4.lib
--------------------------------------------------------------------------------
/external/hamlib/Hamlib_deps_on_Windows.txt:
--------------------------------------------------------------------------------
1 | The Hamlib specific dependencies on Windows platforms are:
2 | - libwinpthread-1.dll
3 | for both x86 and x64,
4 | and also
5 | - libgcc_s_sjlj-1.dll for x86 targets only.
6 |
7 | Those dependencies are installed from external/msvc/[x86|x64] dirs.
8 |
9 | In addition, Hamlib also uses libusb but since it is a common
10 | dependency with SoapySDR, it is not included in the external dirs.
11 |
12 | For Hamlib v4.x releases, only the export file 'libhamlib-4.def' is provided, so we need to re-generate .lib to work on Visual Studio projects:
13 | - Open the 'Developper Command Prompt for VS 2022'
14 | - For Win32, go to hamlib/32 directory and run 'LIB /DEF:libhamlib-4.def /MACHINE:X86'
15 | - For Win64, go to hamlib/64 directory and run 'LIB /DEF:libhamlib-4.def /MACHINE:X64'
16 |
--------------------------------------------------------------------------------
/external/hamlib/hamlib/rig_dll.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Hamlib Win32 DLL build definitions
3 | * Copyright (c) 2001-2009 by Stephane Fillod
4 | *
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | *
20 | */
21 |
22 | /*
23 | * Provide definitions to compile in Windows
24 | * using C-friendly options, e.g.
25 | *
26 | * HAMLIB_API -> __cdecl
27 | * HAMLIB_EXPORT, HAMLIB_EXPORT_VAR -> __declspec(dllexport)
28 | * BACKEND_EXPORT, BACKEND_EXPORT_VAR -> __declspec(dllexport)
29 | *
30 | * No effect in non-Windows environments.
31 | */
32 |
33 | #if defined(_WIN32) && !defined(__CYGWIN__)
34 | # undef HAMLIB_IMPEXP
35 | # undef HAMLIB_CPP_IMPEXP
36 | # undef HAMLIB_API
37 | # undef HAMLIB_EXPORT
38 | # undef HAMLIB_EXPORT_VAR
39 | # undef BACKEND_EXPORT
40 | # undef BACKEND_EXPORT_VAR
41 | # undef HAMLIB_DLL_IMPORT
42 | # undef HAMLIB_DLL_EXPORT
43 |
44 | # if defined (__BORLANDC__)
45 | # define HAMLIB_DLL_IMPORT __import
46 | # define HAMLIB_DLL_EXPORT __export
47 | # else
48 | # define HAMLIB_DLL_IMPORT __declspec(dllimport)
49 | # define HAMLIB_DLL_EXPORT __declspec(dllexport)
50 | # endif
51 |
52 | # ifdef DLL_EXPORT
53 | /* HAMLIB_API may be set to __stdcall for VB, .. */
54 | # define HAMLIB_API __cdecl
55 | # ifdef IN_HAMLIB
56 | # define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT
57 | # define HAMLIB_IMPEXP HAMLIB_DLL_EXPORT
58 | # else
59 | # define HAMLIB_CPP_IMPEXP HAMLIB_DLL_IMPORT
60 | # define HAMLIB_IMPEXP HAMLIB_DLL_IMPORT
61 | # endif
62 | # else
63 | /* static build, only export the backend entry points for lt_dlsym */
64 | # define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT
65 | # endif
66 | #endif
67 |
68 |
69 | /* Take care of non-cygwin platforms */
70 | #if !defined(HAMLIB_IMPEXP)
71 | # define HAMLIB_IMPEXP
72 | #endif
73 | #if !defined(HAMLIB_CPP_IMPEXP)
74 | # define HAMLIB_CPP_IMPEXP
75 | #endif
76 | #if !defined(HAMLIB_API)
77 | # define HAMLIB_API
78 | #endif
79 | #if !defined(HAMLIB_EXPORT)
80 | # define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API
81 | #endif
82 | #if !defined(HAMLIB_EXPORT_VAR)
83 | # define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type
84 | #endif
85 | #if !defined(BACKEND_EXPORT)
86 | # define BACKEND_EXPORT(type) HAMLIB_CPP_IMPEXP type HAMLIB_API
87 | #endif
88 | #if !defined(BACKEND_EXPORT_VAR)
89 | # define BACKEND_EXPORT_VAR(type) HAMLIB_CPP_IMPEXP type
90 | #endif
91 |
--------------------------------------------------------------------------------
/external/liquid-dsp/How_to_build_liquid_dsp_for_Windows.txt:
--------------------------------------------------------------------------------
1 | - Building libliquid.dll and libliquid.a:
2 | -----------------------------------------
3 | - Install the Msys2 distribution as described on their site (https://msys2.github.io/)
4 | - Add mingw32 and mingw64 compiler to the Msys2 installation.
5 | - Copy config.h, makefile.mingw32, makefile.mingw64 in the liquid-dsp root directory.
6 | - Run a Msys2 Win32 shell (mingw32.exe) and execute 'make -f makefile.mingw32 -j clean' then 'make -f makefile.mingw32 -j' to compile a libliquid.dll 32bit Windows Dll.
7 | - Run a Msys2 Win64 shell (mingw64.exe) and execute 'make -f makefile.mingw64 -j clean' then 'make -f makefile.mingw64 -j' to compile a libliquid.dll 64bit Windows Dll.
8 |
9 | This process generates a .dll, .a together with libliquid.def the listing exported functions, and libliquid.lib the import lib matching the dll.
10 |
11 | In order to develop with Visual Studio, you need both the include/liquid.h at source level, and the libliquid.lib import library referenced in your project.
--------------------------------------------------------------------------------
/external/liquid-dsp/gcc/32/libliquid.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/liquid-dsp/gcc/32/libliquid.a
--------------------------------------------------------------------------------
/external/liquid-dsp/gcc/32/libliquid.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/liquid-dsp/gcc/32/libliquid.dll
--------------------------------------------------------------------------------
/external/liquid-dsp/gcc/64/libliquid.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/liquid-dsp/gcc/64/libliquid.a
--------------------------------------------------------------------------------
/external/liquid-dsp/gcc/64/libliquid.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/liquid-dsp/gcc/64/libliquid.dll
--------------------------------------------------------------------------------
/external/liquid-dsp/msvc/32/libliquid.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/liquid-dsp/msvc/32/libliquid.dll
--------------------------------------------------------------------------------
/external/liquid-dsp/msvc/32/libliquid.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/liquid-dsp/msvc/32/libliquid.lib
--------------------------------------------------------------------------------
/external/liquid-dsp/msvc/64/libliquid.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/liquid-dsp/msvc/64/libliquid.dll
--------------------------------------------------------------------------------
/external/liquid-dsp/msvc/64/libliquid.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/liquid-dsp/msvc/64/libliquid.lib
--------------------------------------------------------------------------------
/external/msvc/x64/libwinpthread-1.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/msvc/x64/libwinpthread-1.dll
--------------------------------------------------------------------------------
/external/msvc/x86/libgcc_s_dw2-1.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/msvc/x86/libgcc_s_dw2-1.dll
--------------------------------------------------------------------------------
/external/msvc/x86/libgcc_s_sjlj-1.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/msvc/x86/libgcc_s_sjlj-1.dll
--------------------------------------------------------------------------------
/external/msvc/x86/libwinpthread-1.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/msvc/x86/libwinpthread-1.dll
--------------------------------------------------------------------------------
/external/rs232/README:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/rs232/README
--------------------------------------------------------------------------------
/external/rs232/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/rs232/README.md
--------------------------------------------------------------------------------
/external/rs232/rs232-win.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/rs232/rs232-win.cpp
--------------------------------------------------------------------------------
/external/rs232/rs232.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/rs232/rs232.h
--------------------------------------------------------------------------------
/external/tinyxml/tinystr.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | www.sourceforge.net/projects/tinyxml
3 |
4 | This software is provided 'as-is', without any express or implied
5 | warranty. In no event will the authors be held liable for any
6 | damages arising from the use of this software.
7 |
8 | Permission is granted to anyone to use this software for any
9 | purpose, including commercial applications, and to alter it and
10 | redistribute it freely, subject to the following restrictions:
11 |
12 | 1. The origin of this software must not be misrepresented; you must
13 | not claim that you wrote the original software. If you use this
14 | software in a product, an acknowledgment in the product documentation
15 | would be appreciated but is not required.
16 |
17 | 2. Altered source versions must be plainly marked as such, and
18 | must not be misrepresented as being the original software.
19 |
20 | 3. This notice may not be removed or altered from any source
21 | distribution.
22 | */
23 |
24 |
25 | #ifndef TIXML_USE_STL
26 |
27 | #include "tinystr.h"
28 |
29 | // Error value for find primitive
30 | const TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1);
31 |
32 |
33 | // Null rep.
34 | TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\0' } };
35 |
36 |
37 | void TiXmlString::reserve (size_type cap)
38 | {
39 | if (cap > capacity())
40 | {
41 | TiXmlString tmp;
42 | tmp.init(length(), cap);
43 | memcpy(tmp.start(), data(), length());
44 | swap(tmp);
45 | }
46 | }
47 |
48 |
49 | TiXmlString& TiXmlString::assign(const char* str, size_type len)
50 | {
51 | size_type cap = capacity();
52 | if (len > cap || cap > 3*(len + 8))
53 | {
54 | TiXmlString tmp;
55 | tmp.init(len);
56 | memcpy(tmp.start(), str, len);
57 | swap(tmp);
58 | }
59 | else
60 | {
61 | memmove(start(), str, len);
62 | set_size(len);
63 | }
64 | return *this;
65 | }
66 |
67 |
68 | TiXmlString& TiXmlString::append(const char* str, size_type len)
69 | {
70 | size_type newsize = length() + len;
71 | if (newsize > capacity())
72 | {
73 | reserve (newsize + capacity());
74 | }
75 | memmove(finish(), str, len);
76 | set_size(newsize);
77 | return *this;
78 | }
79 |
80 |
81 | TiXmlString operator + (const TiXmlString & a, const TiXmlString & b)
82 | {
83 | TiXmlString tmp;
84 | tmp.reserve(a.length() + b.length());
85 | tmp += a;
86 | tmp += b;
87 | return tmp;
88 | }
89 |
90 | TiXmlString operator + (const TiXmlString & a, const char* b)
91 | {
92 | TiXmlString tmp;
93 | TiXmlString::size_type b_len = static_cast( strlen(b) );
94 | tmp.reserve(a.length() + b_len);
95 | tmp += a;
96 | tmp.append(b, b_len);
97 | return tmp;
98 | }
99 |
100 | TiXmlString operator + (const char* a, const TiXmlString & b)
101 | {
102 | TiXmlString tmp;
103 | TiXmlString::size_type a_len = static_cast( strlen(a) );
104 | tmp.reserve(a_len + b.length());
105 | tmp.append(a, a_len);
106 | tmp += b;
107 | return tmp;
108 | }
109 |
110 |
111 | #endif // TIXML_USE_STL
112 |
--------------------------------------------------------------------------------
/external/tinyxml/tinyxmlerror.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | www.sourceforge.net/projects/tinyxml
3 | Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any
7 | damages arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any
10 | purpose, including commercial applications, and to alter it and
11 | redistribute it freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must
14 | not claim that you wrote the original software. If you use this
15 | software in a product, an acknowledgment in the product documentation
16 | would be appreciated but is not required.
17 |
18 | 2. Altered source versions must be plainly marked as such, and
19 | must not be misrepresented as being the original software.
20 |
21 | 3. This notice may not be removed or altered from any source
22 | distribution.
23 | */
24 |
25 | #include "tinyxml.h"
26 |
27 | // The goal of the seperate error file is to make the first
28 | // step towards localization. tinyxml (currently) only supports
29 | // english error messages, but the could now be translated.
30 | //
31 | // It also cleans up the code a bit.
32 | //
33 |
34 | const char* TiXmlBase::errorString[ TiXmlBase::TIXML_ERROR_STRING_COUNT ] =
35 | {
36 | "No error",
37 | "Error",
38 | "Failed to open file",
39 | "Error parsing Element.",
40 | "Failed to read Element name",
41 | "Error reading Element value.",
42 | "Error reading Attributes.",
43 | "Error: empty tag.",
44 | "Error reading end tag.",
45 | "Error parsing Unknown.",
46 | "Error parsing Comment.",
47 | "Error parsing Declaration.",
48 | "Error document empty.",
49 | "Error null (0) or unexpected EOF found in input stream.",
50 | "Error parsing CDATA.",
51 | "Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.",
52 | };
53 |
--------------------------------------------------------------------------------
/external/tinyxml/xmltest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/external/tinyxml/xmltest.cpp
--------------------------------------------------------------------------------
/font/vera_sans_mono12.bmfc:
--------------------------------------------------------------------------------
1 | # AngelCode Bitmap Font Generator configuration file
2 | fileVersion=1
3 |
4 | # font settings
5 | fontName=Bitstream Vera Sans Mono
6 | fontFile=VeraMono.ttf
7 | charSet=0
8 | fontSize=12
9 | aa=1
10 | scaleH=100
11 | useSmoothing=0
12 | isBold=0
13 | isItalic=0
14 | useUnicode=1
15 | disableBoxChars=1
16 | outputInvalidCharGlyph=0
17 | dontIncludeKerningPairs=0
18 | useHinting=1
19 | renderFromOutline=0
20 | useClearType=0
21 |
22 | # character alignment
23 | paddingDown=0
24 | paddingUp=0
25 | paddingRight=0
26 | paddingLeft=0
27 | spacingHoriz=1
28 | spacingVert=1
29 | useFixedHeight=1
30 | forceZero=0
31 |
32 | # output file
33 | outWidth=256
34 | outHeight=128
35 | outBitDepth=32
36 | fontDescFormat=0
37 | fourChnlPacked=0
38 | textureFormat=png
39 | textureCompression=0
40 | alphaChnl=1
41 | redChnl=0
42 | greenChnl=0
43 | blueChnl=0
44 | invA=0
45 | invR=0
46 | invG=0
47 | invB=0
48 |
49 | # outline
50 | outlineThickness=0
51 |
52 | # selected chars
53 | chars=32-126,160-255,262-263,268-269,273,286-287,304-305,321-322,338-339,350-353,376,381-382,402,710-711
54 | chars=728-733,937,960,8211-8212,8216-8218,8220-8222,8224-8226,8230,8240,8249-8250,8364,8482,8706,8710
55 | chars=8719,8721-8722,8725,8729-8730,8734,8747,8776,8800,8804-8805,9674
56 |
57 | # imported icon images
58 |
--------------------------------------------------------------------------------
/font/vera_sans_mono12_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/font/vera_sans_mono12_0.png
--------------------------------------------------------------------------------
/font/vera_sans_mono16.bmfc:
--------------------------------------------------------------------------------
1 | # AngelCode Bitmap Font Generator configuration file
2 | fileVersion=1
3 |
4 | # font settings
5 | fontName=Bitstream Vera Sans Mono
6 | fontFile=VeraMono.ttf
7 | charSet=0
8 | fontSize=16
9 | aa=1
10 | scaleH=100
11 | useSmoothing=1
12 | isBold=0
13 | isItalic=0
14 | useUnicode=1
15 | disableBoxChars=1
16 | outputInvalidCharGlyph=0
17 | dontIncludeKerningPairs=0
18 | useHinting=1
19 | renderFromOutline=0
20 | useClearType=0
21 |
22 | # character alignment
23 | paddingDown=0
24 | paddingUp=0
25 | paddingRight=0
26 | paddingLeft=0
27 | spacingHoriz=1
28 | spacingVert=1
29 | useFixedHeight=1
30 | forceZero=0
31 |
32 | # output file
33 | outWidth=256
34 | outHeight=128
35 | outBitDepth=32
36 | fontDescFormat=0
37 | fourChnlPacked=0
38 | textureFormat=png
39 | textureCompression=0
40 | alphaChnl=1
41 | redChnl=0
42 | greenChnl=0
43 | blueChnl=0
44 | invA=0
45 | invR=0
46 | invG=0
47 | invB=0
48 |
49 | # outline
50 | outlineThickness=0
51 |
52 | # selected chars
53 | chars=32-126,160-255,262-263,268-269,273,286-287,304-305,321-322,338-339,350-353,376,381-382,402,710-711
54 | chars=728-733,937,960,8211-8212,8216-8218,8220-8222,8224-8226,8230,8240,8249-8250,8364,8482,8706,8710
55 | chars=8719,8721-8722,8725,8729-8730,8734,8747,8776,8800,8804-8805,9674
56 |
57 | # imported icon images
58 |
--------------------------------------------------------------------------------
/font/vera_sans_mono16_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/font/vera_sans_mono16_0.png
--------------------------------------------------------------------------------
/font/vera_sans_mono18.bmfc:
--------------------------------------------------------------------------------
1 | # AngelCode Bitmap Font Generator configuration file
2 | fileVersion=1
3 |
4 | # font settings
5 | fontName=Bitstream Vera Sans Mono
6 | fontFile=VeraMono.ttf
7 | charSet=0
8 | fontSize=18
9 | aa=1
10 | scaleH=100
11 | useSmoothing=1
12 | isBold=0
13 | isItalic=0
14 | useUnicode=1
15 | disableBoxChars=1
16 | outputInvalidCharGlyph=0
17 | dontIncludeKerningPairs=0
18 | useHinting=1
19 | renderFromOutline=0
20 | useClearType=1
21 |
22 | # character alignment
23 | paddingDown=0
24 | paddingUp=0
25 | paddingRight=0
26 | paddingLeft=0
27 | spacingHoriz=1
28 | spacingVert=1
29 | useFixedHeight=1
30 | forceZero=0
31 |
32 | # output file
33 | outWidth=256
34 | outHeight=256
35 | outBitDepth=32
36 | fontDescFormat=0
37 | fourChnlPacked=0
38 | textureFormat=png
39 | textureCompression=0
40 | alphaChnl=1
41 | redChnl=0
42 | greenChnl=0
43 | blueChnl=0
44 | invA=0
45 | invR=0
46 | invG=0
47 | invB=0
48 |
49 | # outline
50 | outlineThickness=0
51 |
52 | # selected chars
53 | chars=32-126,160-255,262-263,268-269,273,286-287,304-305,321-322,338-339,350-353,376,381-382,402,710-711
54 | chars=728-733,937,960,8211-8212,8216-8218,8220-8222,8224-8226,8230,8240,8249-8250,8364,8482,8706,8710
55 | chars=8719,8721-8722,8725,8729-8730,8734,8747,8776,8800,8804-8805,9674
56 |
57 | # imported icon images
58 |
--------------------------------------------------------------------------------
/font/vera_sans_mono18_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/font/vera_sans_mono18_0.png
--------------------------------------------------------------------------------
/font/vera_sans_mono24.bmfc:
--------------------------------------------------------------------------------
1 | # AngelCode Bitmap Font Generator configuration file
2 | fileVersion=1
3 |
4 | # font settings
5 | fontName=Bitstream Vera Sans Mono
6 | fontFile=VeraMono.ttf
7 | charSet=0
8 | fontSize=24
9 | aa=1
10 | scaleH=100
11 | useSmoothing=1
12 | isBold=0
13 | isItalic=0
14 | useUnicode=1
15 | disableBoxChars=1
16 | outputInvalidCharGlyph=0
17 | dontIncludeKerningPairs=0
18 | useHinting=1
19 | renderFromOutline=0
20 | useClearType=1
21 |
22 | # character alignment
23 | paddingDown=0
24 | paddingUp=0
25 | paddingRight=0
26 | paddingLeft=0
27 | spacingHoriz=1
28 | spacingVert=1
29 | useFixedHeight=1
30 | forceZero=0
31 |
32 | # output file
33 | outWidth=512
34 | outHeight=256
35 | outBitDepth=32
36 | fontDescFormat=0
37 | fourChnlPacked=0
38 | textureFormat=png
39 | textureCompression=0
40 | alphaChnl=1
41 | redChnl=0
42 | greenChnl=0
43 | blueChnl=0
44 | invA=0
45 | invR=0
46 | invG=0
47 | invB=0
48 |
49 | # outline
50 | outlineThickness=0
51 |
52 | # selected chars
53 | chars=32-126,160-255,262-263,268-269,273,286-287,304-305,321-322,338-339,350-353,376,381-382,402,710-711
54 | chars=728-733,937,960,8211-8212,8216-8218,8220-8222,8224-8226,8230,8240,8249-8250,8364,8482,8706,8710
55 | chars=8719,8721-8722,8725,8729-8730,8734,8747,8776,8800,8804-8805,9674
56 |
57 | # imported icon images
58 |
--------------------------------------------------------------------------------
/font/vera_sans_mono24_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/font/vera_sans_mono24_0.png
--------------------------------------------------------------------------------
/font/vera_sans_mono27.bmfc:
--------------------------------------------------------------------------------
1 | # AngelCode Bitmap Font Generator configuration file
2 | fileVersion=1
3 |
4 | # font settings
5 | fontName=Bitstream Vera Sans Mono
6 | fontFile=VeraMoBd.ttf
7 | charSet=0
8 | fontSize=27
9 | aa=1
10 | scaleH=100
11 | useSmoothing=1
12 | isBold=0
13 | isItalic=0
14 | useUnicode=1
15 | disableBoxChars=1
16 | outputInvalidCharGlyph=0
17 | dontIncludeKerningPairs=0
18 | useHinting=1
19 | renderFromOutline=0
20 | useClearType=1
21 |
22 | # character alignment
23 | paddingDown=0
24 | paddingUp=0
25 | paddingRight=0
26 | paddingLeft=0
27 | spacingHoriz=1
28 | spacingVert=1
29 | useFixedHeight=1
30 | forceZero=0
31 |
32 | # output file
33 | outWidth=512
34 | outHeight=256
35 | outBitDepth=32
36 | fontDescFormat=0
37 | fourChnlPacked=0
38 | textureFormat=png
39 | textureCompression=0
40 | alphaChnl=1
41 | redChnl=0
42 | greenChnl=0
43 | blueChnl=0
44 | invA=0
45 | invR=0
46 | invG=0
47 | invB=0
48 |
49 | # outline
50 | outlineThickness=0
51 |
52 | # selected chars
53 | chars=32-126,160-255,262-263,268-269,273,286-287,304-305,321-322,338-339,350-353,376,381-382,402,710-711
54 | chars=728-733,937,960,8211-8212,8216-8218,8220-8222,8224-8226,8230,8240,8249-8250,8364,8482,8706,8710
55 | chars=8719,8721-8722,8725,8729-8730,8734,8747,8776,8800,8804-8805,9674
56 |
57 | # imported icon images
58 |
--------------------------------------------------------------------------------
/font/vera_sans_mono27_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/font/vera_sans_mono27_0.png
--------------------------------------------------------------------------------
/font/vera_sans_mono32.bmfc:
--------------------------------------------------------------------------------
1 | # AngelCode Bitmap Font Generator configuration file
2 | fileVersion=1
3 |
4 | # font settings
5 | fontName=Bitstream Vera Sans Mono
6 | fontFile=VeraMono.ttf
7 | charSet=0
8 | fontSize=32
9 | aa=1
10 | scaleH=100
11 | useSmoothing=1
12 | isBold=0
13 | isItalic=0
14 | useUnicode=1
15 | disableBoxChars=1
16 | outputInvalidCharGlyph=0
17 | dontIncludeKerningPairs=0
18 | useHinting=1
19 | renderFromOutline=0
20 | useClearType=0
21 |
22 | # character alignment
23 | paddingDown=0
24 | paddingUp=0
25 | paddingRight=0
26 | paddingLeft=0
27 | spacingHoriz=1
28 | spacingVert=1
29 | useFixedHeight=1
30 | forceZero=0
31 |
32 | # output file
33 | outWidth=512
34 | outHeight=256
35 | outBitDepth=32
36 | fontDescFormat=0
37 | fourChnlPacked=0
38 | textureFormat=png
39 | textureCompression=0
40 | alphaChnl=1
41 | redChnl=0
42 | greenChnl=0
43 | blueChnl=0
44 | invA=0
45 | invR=0
46 | invG=0
47 | invB=0
48 |
49 | # outline
50 | outlineThickness=0
51 |
52 | # selected chars
53 | chars=32-126,160-255,262-263,268-269,273,286-287,304-305,321-322,338-339,350-353,376,381-382,402,710-711
54 | chars=728-733,937,960,8211-8212,8216-8218,8220-8222,8224-8226,8230,8240,8249-8250,8364,8482,8706,8710
55 | chars=8719,8721-8722,8725,8729-8730,8734,8747,8776,8800,8804-8805,9674
56 |
57 | # imported icon images
58 |
--------------------------------------------------------------------------------
/font/vera_sans_mono32_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/font/vera_sans_mono32_0.png
--------------------------------------------------------------------------------
/font/vera_sans_mono36.bmfc:
--------------------------------------------------------------------------------
1 | # AngelCode Bitmap Font Generator configuration file
2 | fileVersion=1
3 |
4 | # font settings
5 | fontName=Bitstream Vera Sans Mono
6 | fontFile=VeraMoBd.ttf
7 | charSet=0
8 | fontSize=36
9 | aa=1
10 | scaleH=100
11 | useSmoothing=1
12 | isBold=0
13 | isItalic=0
14 | useUnicode=1
15 | disableBoxChars=1
16 | outputInvalidCharGlyph=0
17 | dontIncludeKerningPairs=0
18 | useHinting=1
19 | renderFromOutline=0
20 | useClearType=1
21 |
22 | # character alignment
23 | paddingDown=0
24 | paddingUp=0
25 | paddingRight=0
26 | paddingLeft=0
27 | spacingHoriz=1
28 | spacingVert=1
29 | useFixedHeight=1
30 | forceZero=0
31 |
32 | # output file
33 | outWidth=512
34 | outHeight=512
35 | outBitDepth=32
36 | fontDescFormat=0
37 | fourChnlPacked=0
38 | textureFormat=png
39 | textureCompression=0
40 | alphaChnl=1
41 | redChnl=0
42 | greenChnl=0
43 | blueChnl=0
44 | invA=0
45 | invR=0
46 | invG=0
47 | invB=0
48 |
49 | # outline
50 | outlineThickness=0
51 |
52 | # selected chars
53 | chars=32-126,160-255,262-263,268-269,273,286-287,304-305,321-322,338-339,350-353,376,381-382,402,710-711
54 | chars=728-733,937,960,8211-8212,8216-8218,8220-8222,8224-8226,8230,8240,8249-8250,8364,8482,8706,8710
55 | chars=8719,8721-8722,8725,8729-8730,8734,8747,8776,8800,8804-8805,9674
56 |
57 | # imported icon images
58 |
--------------------------------------------------------------------------------
/font/vera_sans_mono36_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/font/vera_sans_mono36_0.png
--------------------------------------------------------------------------------
/font/vera_sans_mono48.bmfc:
--------------------------------------------------------------------------------
1 | # AngelCode Bitmap Font Generator configuration file
2 | fileVersion=1
3 |
4 | # font settings
5 | fontName=Bitstream Vera Sans Mono
6 | fontFile=VeraMono.ttf
7 | charSet=0
8 | fontSize=48
9 | aa=1
10 | scaleH=100
11 | useSmoothing=1
12 | isBold=0
13 | isItalic=0
14 | useUnicode=1
15 | disableBoxChars=1
16 | outputInvalidCharGlyph=0
17 | dontIncludeKerningPairs=0
18 | useHinting=1
19 | renderFromOutline=0
20 | useClearType=1
21 |
22 | # character alignment
23 | paddingDown=0
24 | paddingUp=0
25 | paddingRight=0
26 | paddingLeft=0
27 | spacingHoriz=1
28 | spacingVert=1
29 | useFixedHeight=1
30 | forceZero=0
31 |
32 | # output file
33 | outWidth=1024
34 | outHeight=512
35 | outBitDepth=32
36 | fontDescFormat=0
37 | fourChnlPacked=0
38 | textureFormat=png
39 | textureCompression=0
40 | alphaChnl=1
41 | redChnl=0
42 | greenChnl=0
43 | blueChnl=0
44 | invA=0
45 | invR=0
46 | invG=0
47 | invB=0
48 |
49 | # outline
50 | outlineThickness=0
51 |
52 | # selected chars
53 | chars=32-126,160-255,262-263,268-269,273,286-287,304-305,321-322,338-339,350-353,376,381-382,402,710-711
54 | chars=728-733,937,960,8211-8212,8216-8218,8220-8222,8224-8226,8230,8240,8249-8250,8364,8482,8706,8710
55 | chars=8719,8721-8722,8725,8729-8730,8734,8747,8776,8800,8804-8805,9674
56 |
57 | # imported icon images
58 |
--------------------------------------------------------------------------------
/font/vera_sans_mono48_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/font/vera_sans_mono48_0.png
--------------------------------------------------------------------------------
/font/vera_sans_mono64.bmfc:
--------------------------------------------------------------------------------
1 | # AngelCode Bitmap Font Generator configuration file
2 | fileVersion=1
3 |
4 | # font settings
5 | fontName=Bitstream Vera Sans Mono
6 | fontFile=VeraMoBd.ttf
7 | charSet=0
8 | fontSize=64
9 | aa=1
10 | scaleH=100
11 | useSmoothing=1
12 | isBold=0
13 | isItalic=0
14 | useUnicode=1
15 | disableBoxChars=1
16 | outputInvalidCharGlyph=0
17 | dontIncludeKerningPairs=0
18 | useHinting=1
19 | renderFromOutline=0
20 | useClearType=1
21 |
22 | # character alignment
23 | paddingDown=0
24 | paddingUp=0
25 | paddingRight=0
26 | paddingLeft=0
27 | spacingHoriz=1
28 | spacingVert=1
29 | useFixedHeight=1
30 | forceZero=0
31 |
32 | # output file
33 | outWidth=1024
34 | outHeight=512
35 | outBitDepth=32
36 | fontDescFormat=0
37 | fourChnlPacked=0
38 | textureFormat=png
39 | textureCompression=0
40 | alphaChnl=1
41 | redChnl=0
42 | greenChnl=0
43 | blueChnl=0
44 | invA=0
45 | invR=0
46 | invG=0
47 | invB=0
48 |
49 | # outline
50 | outlineThickness=0
51 |
52 | # selected chars
53 | chars=32-126,160-255,262-263,268-269,273,286-287,304-305,321-322,338-339,350-353,376,381-382,402,710-711
54 | chars=728-733,937,960,8211-8212,8216-8218,8220-8222,8224-8226,8230,8240,8249-8250,8364,8482,8706,8710
55 | chars=8719,8721-8722,8725,8729-8730,8734,8747,8776,8800,8804-8805,9674
56 |
57 | # imported icon images
58 |
--------------------------------------------------------------------------------
/font/vera_sans_mono64_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/font/vera_sans_mono64_0.png
--------------------------------------------------------------------------------
/font/vera_sans_mono72.bmfc:
--------------------------------------------------------------------------------
1 | # AngelCode Bitmap Font Generator configuration file
2 | fileVersion=1
3 |
4 | # font settings
5 | fontName=Bitstream Vera Sans Mono
6 | fontFile=VeraMoBd.ttf
7 | charSet=0
8 | fontSize=72
9 | aa=1
10 | scaleH=100
11 | useSmoothing=1
12 | isBold=0
13 | isItalic=0
14 | useUnicode=1
15 | disableBoxChars=1
16 | outputInvalidCharGlyph=0
17 | dontIncludeKerningPairs=0
18 | useHinting=1
19 | renderFromOutline=0
20 | useClearType=1
21 |
22 | # character alignment
23 | paddingDown=0
24 | paddingUp=0
25 | paddingRight=0
26 | paddingLeft=0
27 | spacingHoriz=1
28 | spacingVert=1
29 | useFixedHeight=1
30 | forceZero=0
31 |
32 | # output file
33 | outWidth=1024
34 | outHeight=1024
35 | outBitDepth=32
36 | fontDescFormat=0
37 | fourChnlPacked=0
38 | textureFormat=png
39 | textureCompression=0
40 | alphaChnl=1
41 | redChnl=0
42 | greenChnl=0
43 | blueChnl=0
44 | invA=0
45 | invR=0
46 | invG=0
47 | invB=0
48 |
49 | # outline
50 | outlineThickness=0
51 |
52 | # selected chars
53 | chars=32-126,160-255,262-263,268-269,273,286-287,304-305,321-322,338-339,350-353,376,381-382,402,710-711
54 | chars=728-733,937,960,8211-8212,8216-8218,8220-8222,8224-8226,8230,8240,8249-8250,8364,8482,8706,8710
55 | chars=8719,8721-8722,8725,8729-8730,8734,8747,8776,8800,8804-8805,9674
56 |
57 | # imported icon images
58 |
--------------------------------------------------------------------------------
/font/vera_sans_mono72_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/font/vera_sans_mono72_0.png
--------------------------------------------------------------------------------
/font/vera_sans_mono96.bmfc:
--------------------------------------------------------------------------------
1 | # AngelCode Bitmap Font Generator configuration file
2 | fileVersion=1
3 |
4 | # font settings
5 | fontName=Bitstream Vera Sans Mono
6 | fontFile=VeraMoBd.ttf
7 | charSet=0
8 | fontSize=96
9 | aa=1
10 | scaleH=100
11 | useSmoothing=1
12 | isBold=0
13 | isItalic=0
14 | useUnicode=1
15 | disableBoxChars=1
16 | outputInvalidCharGlyph=0
17 | dontIncludeKerningPairs=0
18 | useHinting=1
19 | renderFromOutline=0
20 | useClearType=1
21 |
22 | # character alignment
23 | paddingDown=0
24 | paddingUp=0
25 | paddingRight=0
26 | paddingLeft=0
27 | spacingHoriz=1
28 | spacingVert=1
29 | useFixedHeight=1
30 | forceZero=0
31 |
32 | # output file
33 | outWidth=1024
34 | outHeight=1024
35 | outBitDepth=32
36 | fontDescFormat=0
37 | fourChnlPacked=0
38 | textureFormat=png
39 | textureCompression=0
40 | alphaChnl=1
41 | redChnl=0
42 | greenChnl=0
43 | blueChnl=0
44 | invA=0
45 | invR=0
46 | invG=0
47 | invB=0
48 |
49 | # outline
50 | outlineThickness=0
51 |
52 | # selected chars
53 | chars=32-126,160-255,262-263,268-269,273,286-287,304-305,321-322,338-339,350-353,376,381-382,402,710-711
54 | chars=728-733,937,960,8211-8212,8216-8218,8220-8222,8224-8226,8230,8240,8249-8250,8364,8482,8706,8710
55 | chars=8719,8721-8722,8725,8729-8730,8734,8747,8776,8800,8804-8805,9674
56 |
57 | # imported icon images
58 |
--------------------------------------------------------------------------------
/font/vera_sans_mono96_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/font/vera_sans_mono96_0.png
--------------------------------------------------------------------------------
/icon/CubicSDR.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/icon/CubicSDR.icns
--------------------------------------------------------------------------------
/icon/CubicSDR.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/icon/CubicSDR.ico
--------------------------------------------------------------------------------
/icon/NSIS_Header.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/icon/NSIS_Header.bmp
--------------------------------------------------------------------------------
/src/CubicSDR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjcliffe/CubicSDR/033330367cd179d7b04503027d41afa7514036f4/src/CubicSDR.png
--------------------------------------------------------------------------------
/src/CubicSDRDefs.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #if defined(__linux__) || defined(__FreeBSD__)
7 | #include
8 | #endif
9 |
10 | #define CUBICSDR_TITLE "" CUBICSDR_BUILD_TITLE
11 |
12 | #ifndef __BYTE_ORDER
13 | #ifdef _WIN32
14 | #define ATTRIBUTE
15 | #define __LITTLE_ENDIAN 1234
16 | #define __BIG_ENDIAN 4321
17 | #define __PDP_ENDIAN 3412
18 | #define __BYTE_ORDER __LITTLE_ENDIAN
19 | #else
20 | #ifdef __APPLE__
21 | #include
22 | #else
23 | #ifdef __FreeBSD__
24 | #include
25 | #else
26 | #include
27 | #endif
28 | #endif
29 | #endif
30 | #endif
31 |
32 | const char filePathSeparator =
33 | #ifdef _WIN32
34 | '\\';
35 | #else
36 | '/';
37 | #endif
38 |
39 | #define BUF_SIZE (16384*6)
40 |
41 | #define DEFAULT_SAMPLE_RATE 2500000
42 |
43 | //
44 | #define DEFAULT_FFT_SIZE 2048
45 | #define DEFAULT_DMOD_FFT_SIZE (DEFAULT_FFT_SIZE / 2)
46 | #define DEFAULT_SCOPE_FFT_SIZE (DEFAULT_FFT_SIZE / 2)
47 |
48 | //Both must be a power of 2 to prevent terrible OpenGL performance.
49 | //TODO: Make the waterfall resolutions an option.
50 | #define DEFAULT_MAIN_WATERFALL_LINES_NB 512 // 1024
51 | #define DEFAULT_DEMOD_WATERFALL_LINES_NB 256
52 |
53 | #define DEFAULT_DEMOD_TYPE "FM"
54 | #define DEFAULT_DEMOD_BW 200000
55 |
56 | #define DEFAULT_WATERFALL_LPS 30
57 |
58 | //Dmod waterfall lines per second is adjusted
59 | //so that the whole demod waterfall show DEMOD_WATERFALL_DURATION_IN_SECONDS
60 | //seconds.
61 | #define DEMOD_WATERFALL_DURATION_IN_SECONDS 4.0
62 |
63 | #define CHANNELIZER_RATE_MAX 500000
64 |
65 | #define MANUAL_SAMPLE_RATE_MIN 2000000 // 2MHz
66 | #define MANUAL_SAMPLE_RATE_MAX 200000000 // 200MHz (We are 2017+ after all)
67 |
68 | //Represents the amount of time to process in the FFT distributor.
69 | #define FFT_DISTRIBUTOR_BUFFER_IN_SECONDS 0.250
70 |
71 | //The maximum number of listed sample rates for a device, to be able to handle
72 | //devices returning an insane amount because they have quasi-continuous ranges (UHD...)
73 | #define DEVICE_SAMPLE_RATES_MAX_NB 25
74 |
--------------------------------------------------------------------------------
/src/DemodLabelDialog.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include "wx/dialog.h"
7 | #include "wx/textctrl.h"
8 | #include "wx/string.h"
9 | #include "wx/button.h"
10 | #include "DemodulatorInstance.h"
11 |
12 | #define wxID_LABEL_INPUT 3002
13 |
14 | class DemodLabelDialog : public wxDialog
15 | {
16 | public:
17 |
18 | DemodLabelDialog( wxWindow * parent, wxWindowID id, const wxString & title,
19 | DemodulatorInstancePtr demod = nullptr,
20 | const wxPoint & pos = wxDefaultPosition,
21 | const wxSize & size = wxDefaultSize,
22 | long style = wxDEFAULT_DIALOG_STYLE);
23 |
24 | wxTextCtrl * dialogText;
25 |
26 | private:
27 | DemodulatorInstancePtr activeDemod = nullptr;
28 | void OnChar ( wxKeyEvent &event );
29 | void OnShow(wxShowEvent &event);
30 | DECLARE_EVENT_TABLE()
31 | };
32 |
--------------------------------------------------------------------------------
/src/FrequencyDialog.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include "wx/dialog.h"
7 | #include "wx/textctrl.h"
8 | #include "wx/string.h"
9 | #include "wx/button.h"
10 | #include "DemodulatorInstance.h"
11 |
12 | #define wxID_FREQ_INPUT 3001
13 |
14 | class FrequencyDialog: public wxDialog
15 | {
16 | public:
17 | typedef enum FrequencyDialogTarget {
18 | FDIALOG_TARGET_DEFAULT,
19 | FDIALOG_TARGET_CENTERFREQ,
20 | FDIALOG_TARGET_FREQ,
21 | FDIALOG_TARGET_BANDWIDTH,
22 | FDIALOG_TARGET_WATERFALL_LPS,
23 | FDIALOG_TARGET_SPECTRUM_AVG,
24 | FDIALOG_TARGET_GAIN
25 | } FrequencyDialogTarget;
26 | FrequencyDialog ( wxWindow * parent, wxWindowID id, const wxString & title,
27 | DemodulatorInstancePtr demod = nullptr,
28 | const wxPoint & pos = wxDefaultPosition,
29 | const wxSize & size = wxDefaultSize,
30 | long style = wxDEFAULT_DIALOG_STYLE,
31 | FrequencyDialogTarget targetMode = FDIALOG_TARGET_DEFAULT,
32 | wxString initString = "");
33 |
34 | wxTextCtrl * dialogText;
35 |
36 | private:
37 | DemodulatorInstancePtr activeDemod;
38 | void OnChar ( wxKeyEvent &event );
39 | void OnShow(wxShowEvent &event);
40 | FrequencyDialogTarget targetMode;
41 | std::string initialString;
42 | DECLARE_EVENT_TABLE()
43 | };
44 |
--------------------------------------------------------------------------------
/src/ModemProperties.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | #include "DemodulatorInstance.h"
12 | #include "Modem.h"
13 |
14 | class ModemProperties : public wxPanel {
15 | public:
16 | explicit ModemProperties(
17 | wxWindow *parent,
18 | wxWindowID winid = wxID_ANY,
19 | const wxPoint& pos = wxDefaultPosition,
20 | const wxSize& size = wxDefaultSize,
21 | long style = wxTAB_TRAVERSAL | wxNO_BORDER,
22 | const wxString& name = wxPanelNameStr
23 | );
24 | ~ModemProperties() override;
25 |
26 | void initDefaultProperties();
27 | void initProperties(ModemArgInfoList newArgs, const DemodulatorInstancePtr& demodInstance);
28 | bool isMouseInView();
29 | void setCollapsed(bool state);
30 | bool isCollapsed() const;
31 | void fitColumns();
32 |
33 | void updateTheme();
34 |
35 | private:
36 | wxPGProperty *addArgInfoProperty(wxPropertyGrid *pg, ModemArgInfo arg);
37 | std::string readProperty(const std::string&);
38 | void OnChange(wxPropertyGridEvent &event);
39 | void OnShow(wxShowEvent &event);
40 | void OnCollapse(wxPropertyGridEvent &event);
41 | void OnExpand(wxPropertyGridEvent &event);
42 |
43 | void OnMouseEnter(wxMouseEvent &event);
44 | void OnMouseLeave(wxMouseEvent &event);
45 |
46 | wxBoxSizer* bSizer;
47 | wxPropertyGrid* m_propertyGrid;
48 | ModemArgInfoList args;
49 | DemodulatorInstancePtr demodContext;
50 |
51 | std::map props;
52 | bool mouseInView, collapsed;
53 |
54 | ModemArgInfoList defaultArgs;
55 | ModemArgInfo outputArg;
56 | std::map defaultProps;
57 |
58 | std::vector audioDevices;
59 | std::map audioInputDevices;
60 | std::map audioOutputDevices;
61 | };
--------------------------------------------------------------------------------
/src/SessionMgr.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include "DataTree.h"
7 | #include "AppFrame.h"
8 |
9 |
10 | class SessionMgr {
11 | public:
12 | void saveSession(std::string fileName);
13 | bool loadSession(const std::string& fileName);
14 | };
15 |
--------------------------------------------------------------------------------
/src/audio/AudioFile.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #include "AudioFile.h"
5 | #include "CubicSDR.h"
6 | #include
7 |
8 | AudioFile::AudioFile() = default;
9 |
10 | AudioFile::~AudioFile() = default;
11 |
12 | void AudioFile::setOutputFileName(std::string filename) {
13 | filenameBase = filename;
14 | }
15 |
16 | std::string AudioFile::getOutputFileName() {
17 |
18 | std::string recPath = wxGetApp().getConfig()->getRecordingPath();
19 |
20 | // Strip any invalid characters from the name
21 | std::string stripChars("<>:\"/\\|?*");
22 | std::string filenameBaseSafe = filenameBase;
23 |
24 | for (size_t i = 0, iMax = filenameBaseSafe.length(); i < iMax; i++) {
25 | if (stripChars.find(filenameBaseSafe[i]) != std::string::npos) {
26 | filenameBaseSafe.replace(i,1,"_");
27 | }
28 | }
29 |
30 | // Create output file name
31 | std::stringstream outputFileName;
32 | outputFileName << recPath << filePathSeparator << filenameBaseSafe;
33 |
34 | int idx = 0;
35 |
36 | // If the file exists; then find the next non-existing file in sequence.
37 | std::string fileNameCandidate = outputFileName.str();
38 |
39 | while (FILE *file = fopen((fileNameCandidate + "." + getExtension()).c_str(), "r")) {
40 | fclose(file);
41 | fileNameCandidate = outputFileName.str() + "-" + std::to_string(++idx);
42 | }
43 |
44 | return fileNameCandidate + "." + getExtension();
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/src/audio/AudioFile.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include "AudioThread.h"
7 |
8 | class AudioFile
9 | {
10 |
11 | public:
12 | AudioFile();
13 | virtual ~AudioFile();
14 |
15 | virtual void setOutputFileName(std::string filename);
16 | virtual std::string getExtension() = 0;
17 | virtual std::string getOutputFileName();
18 |
19 | virtual bool writeToFile(AudioThreadInputPtr input) = 0;
20 | virtual bool closeFile() = 0;
21 |
22 | protected:
23 | std::string filenameBase;
24 |
25 | };
--------------------------------------------------------------------------------
/src/audio/AudioFileWAV.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include "AudioFile.h"
7 |
8 | #include
9 |
10 | class AudioFileWAV : public AudioFile {
11 |
12 | public:
13 | AudioFileWAV();
14 | ~AudioFileWAV() override;
15 |
16 | //override to manage name change with multi-part WAV.
17 | void setOutputFileName(std::string filename) override;
18 |
19 | //override of the base method to generate multi-part
20 | //WAV to overcome the WAV format size limit.
21 | std::string getOutputFileName() override;
22 |
23 | std::string getExtension() override;
24 |
25 | bool writeToFile(AudioThreadInputPtr input) override;
26 | bool closeFile() override;
27 |
28 | protected:
29 | std::ofstream outputFileStream;
30 | size_t dataChunkPos;
31 | long long currentFileSize = 0;
32 | int currentSequenceNumber = 0;
33 |
34 | private:
35 |
36 | size_t getMaxWritableNumberOfSamples(const AudioThreadInputPtr& input) const;
37 |
38 | void writeHeaderToFileStream(const AudioThreadInputPtr& input);
39 |
40 | //write [startInputPosition; endInputPosition[ samples from input into the file.
41 | void writePayloadToFileStream(const AudioThreadInputPtr& input, size_t startInputPosition, size_t endInputPosition);
42 | };
--------------------------------------------------------------------------------
/src/audio/AudioSinkFileThread.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include "AudioSinkThread.h"
7 | #include "AudioFile.h"
8 | #include "Timer.h"
9 |
10 | class AudioSinkFileThread : public AudioSinkThread {
11 |
12 | public:
13 | AudioSinkFileThread();
14 | ~AudioSinkFileThread() override;
15 |
16 | enum SquelchOption {
17 | SQUELCH_RECORD_SILENCE = 0, // default value, record as a user would hear it.
18 | SQUELCH_SKIP_SILENCE = 1, // skip below-squelch level.
19 | SQUELCH_RECORD_ALWAYS = 2, // record irrespective of the squelch level.
20 | SQUELCH_RECORD_MAX
21 | };
22 |
23 | void sink(AudioThreadInputPtr input) override;
24 | void inputChanged(AudioThreadInput oldProps, AudioThreadInputPtr newProps) override;
25 |
26 | void setAudioFileHandler(AudioFile *output);
27 |
28 | void setAudioFileNameBase(const std::string& baseName);
29 |
30 | //Squelch
31 | void setSquelchOption(int squelchOptEnumValue);
32 |
33 | // Time limit
34 | void setFileTimeLimit(int nbSeconds);
35 |
36 | protected:
37 |
38 | std::string fileNameBase;
39 |
40 | AudioFile *audioFileHandler = nullptr;
41 |
42 | SquelchOption squelchOption = SQUELCH_RECORD_SILENCE;
43 | int fileTimeLimit = 0;
44 |
45 | int fileTimeDurationSeconds = -1;
46 |
47 | Timer durationMeasurement;
48 |
49 | };
50 |
51 |
--------------------------------------------------------------------------------
/src/audio/AudioSinkThread.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #include "AudioSinkThread.h"
5 |
6 | #define HEARTBEAT_CHECK_PERIOD_MICROS (50 * 1000)
7 |
8 | AudioSinkThread::AudioSinkThread() {
9 | inputQueuePtr = std::make_shared();
10 | inputQueuePtr->set_max_num_items(1000);
11 | setInputQueue("input", inputQueuePtr);
12 | }
13 |
14 | AudioSinkThread::~AudioSinkThread() = default;
15 |
16 | void AudioSinkThread::run() {
17 | #ifdef __APPLE__
18 | pthread_t tID = pthread_self(); // ID of this thread
19 | int priority = sched_get_priority_max(SCHED_RR) - 1;
20 | sched_param prio = { priority }; // scheduling priority of thread
21 | pthread_setschedparam(tID, SCHED_RR, &prio);
22 | #endif
23 |
24 | AudioThreadInputPtr inp;
25 | AudioThreadInput inputRef;
26 |
27 | while (!stopping) {
28 | if (!inputQueuePtr->pop(inp, HEARTBEAT_CHECK_PERIOD_MICROS)) {
29 | continue;
30 | }
31 |
32 | if (inputRef.channels != inp->channels ||
33 | inputRef.frequency != inp->frequency ||
34 | inputRef.inputRate != inp->inputRate ||
35 | inputRef.sampleRate != inp->sampleRate) {
36 |
37 | inputChanged(inputRef, inp);
38 |
39 | inputRef.channels = inp->channels;
40 | inputRef.frequency = inp->frequency;
41 | inputRef.inputRate = inp->inputRate;
42 | inputRef.sampleRate = inp->sampleRate;
43 | }
44 |
45 | sink(inp);
46 | }
47 | }
48 |
49 | void AudioSinkThread::terminate() {
50 | IOThread::terminate();
51 | inputQueuePtr->flush();
52 | }
53 |
--------------------------------------------------------------------------------
/src/audio/AudioSinkThread.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include "AudioThread.h"
7 |
8 | class AudioSinkThread : public IOThread {
9 |
10 | public:
11 |
12 | AudioSinkThread();
13 | ~AudioSinkThread() override;
14 |
15 | void run() override;
16 | void terminate() override;
17 |
18 | virtual void sink(AudioThreadInputPtr input) = 0;
19 | virtual void inputChanged(AudioThreadInput oldProps, AudioThreadInputPtr newProps) = 0;
20 |
21 | protected:
22 | std::recursive_mutex m_mutex;
23 | AudioThreadInputQueuePtr inputQueuePtr;
24 |
25 | };
26 |
--------------------------------------------------------------------------------
/src/demod/DemodDefs.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include "ThreadBlockingQueue.h"
7 | #include "CubicSDRDefs.h"
8 | #include "liquid/liquid.h"
9 | #include
10 | #include
11 | #include
12 | #include
13 |
14 | #include "IOThread.h"
15 |
16 | class DemodulatorThread;
17 |
18 | class DemodulatorThreadIQData {
19 | public:
20 | long long frequency;
21 | long long sampleRate;
22 | std::vector data;
23 |
24 |
25 | DemodulatorThreadIQData() :
26 | frequency(0), sampleRate(0) {
27 |
28 | }
29 |
30 | DemodulatorThreadIQData & operator=(const DemodulatorThreadIQData &other) {
31 | frequency = other.frequency;
32 | sampleRate = other.sampleRate;
33 | data.assign(other.data.begin(), other.data.end());
34 | return *this;
35 | }
36 |
37 | virtual ~DemodulatorThreadIQData() = default;
38 | };
39 |
40 | class Modem;
41 | class ModemKit;
42 |
43 | class DemodulatorThreadPostIQData {
44 | public:
45 | std::vector data;
46 |
47 | long long sampleRate;
48 | std::string modemName;
49 | std::string modemType;
50 | Modem *modem;
51 | ModemKit *modemKit;
52 |
53 | DemodulatorThreadPostIQData() :
54 | sampleRate(0), modem(nullptr), modemKit(nullptr) {
55 |
56 | }
57 |
58 | virtual ~DemodulatorThreadPostIQData() = default;
59 | };
60 |
61 | typedef std::shared_ptr DemodulatorThreadIQDataPtr;
62 | typedef std::shared_ptr DemodulatorThreadPostIQDataPtr;
63 |
64 | typedef ThreadBlockingQueue DemodulatorThreadInputQueue;
65 | typedef ThreadBlockingQueue DemodulatorThreadPostInputQueue;
66 |
67 | typedef std::shared_ptr DemodulatorThreadInputQueuePtr;
68 | typedef std::shared_ptr DemodulatorThreadPostInputQueuePtr;
69 |
--------------------------------------------------------------------------------
/src/demod/DemodulatorPreThread.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | #include "CubicSDRDefs.h"
12 | #include "DemodDefs.h"
13 | #include "DemodulatorWorkerThread.h"
14 |
15 | class DemodulatorInstance;
16 |
17 | class DemodulatorPreThread : public IOThread {
18 | public:
19 |
20 | explicit DemodulatorPreThread(DemodulatorInstance* parent);
21 | ~DemodulatorPreThread() override;
22 |
23 | void run() override;
24 |
25 | void setDemodType(std::string demodType_in);
26 | std::string getDemodType();
27 |
28 | void setFrequency(long long sampleRate);
29 | long long getFrequency();
30 |
31 | void setSampleRate(long long sampleRate);
32 | long long getSampleRate();
33 |
34 | void setBandwidth(int bandwidth);
35 | int getBandwidth();
36 |
37 | void setAudioSampleRate(int rate);
38 | int getAudioSampleRate();
39 |
40 | bool isInitialized();
41 |
42 | void terminate() override;
43 |
44 | Modem *getModem();
45 | ModemKit *getModemKit();
46 |
47 | std::string readModemSetting(const std::string& setting);
48 | void writeModemSetting(const std::string& setting, std::string value);
49 | ModemSettings readModemSettings();
50 | void writeModemSettings(ModemSettings settings);
51 |
52 | protected:
53 |
54 | DemodulatorInstance* parent;
55 |
56 | msresamp_crcf iqResampler;
57 | double iqResampleRatio;
58 | std::vector resampledData;
59 |
60 | Modem *cModem;
61 | ModemKit *cModemKit;
62 |
63 | std::atomic_llong currentSampleRate, newSampleRate;
64 | std::atomic_llong currentFrequency, newFrequency;
65 | std::atomic_int currentBandwidth;
66 | std::atomic_int currentAudioSampleRate, newAudioSampleRate;
67 |
68 | std::atomic_bool sampleRateChanged, frequencyChanged, bandwidthChanged, audioSampleRateChanged;
69 |
70 | ModemSettings modemSettingsBuffered;
71 | std::atomic_bool modemSettingsChanged;
72 |
73 | nco_crcf freqShifter;
74 | int shiftFrequency;
75 |
76 | std::atomic_bool initialized;
77 | std::atomic_bool demodTypeChanged;
78 | std::string demodType;
79 | std::string newDemodType;
80 |
81 | DemodulatorWorkerThread *workerThread;
82 | std::thread *t_Worker;
83 |
84 | DemodulatorThreadWorkerCommandQueuePtr workerQueue;
85 | DemodulatorThreadWorkerResultQueuePtr workerResults;
86 |
87 | DemodulatorThreadInputQueuePtr iqInputQueue;
88 | DemodulatorThreadPostInputQueuePtr iqOutputQueue;
89 | };
90 |
--------------------------------------------------------------------------------
/src/demod/DemodulatorThread.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | #include "DemodDefs.h"
11 | #include "AudioThread.h"
12 | #include "Modem.h"
13 | #include "SpinMutex.h"
14 |
15 | #define DEMOD_VIS_SIZE 2048
16 | #define DEMOD_SIGNAL_MIN -30
17 | #define DEMOD_SIGNAL_MAX 30
18 |
19 | class DemodulatorInstance;
20 |
21 | class DemodulatorThread : public IOThread {
22 | public:
23 |
24 | explicit DemodulatorThread(DemodulatorInstance* parent);
25 | ~DemodulatorThread() override;
26 |
27 | void onBindOutput(std::string name, ThreadQueueBasePtr threadQueue) override;
28 |
29 | void run() override;
30 | void terminate() override;
31 |
32 | void setMuted(bool muted_in);
33 | bool isMuted();
34 |
35 | float getSignalLevel();
36 | float getSignalCeil();
37 | void setSquelchEnabled(bool squelchEnabled_in);
38 | bool isSquelchEnabled();
39 | float getSignalFloor();
40 | void setSquelchLevel(float signal_level_in);
41 | float getSquelchLevel();
42 |
43 | bool getSquelchBreak();
44 |
45 |
46 | static void releaseSquelchLock(DemodulatorInstance* inst);
47 | protected:
48 |
49 | double abMagnitude(float inphase, float quadrature);
50 | double linearToDb(double linear);
51 |
52 | DemodulatorInstance* demodInstance;
53 | ReBuffer outputBuffers;
54 |
55 | std::atomic_bool muted;
56 |
57 | std::atomic squelchLevel;
58 | std::atomic signalLevel, signalFloor, signalCeil;
59 | std::atomic squelchEnabled, squelchBreak;
60 |
61 | static DemodulatorInstance* squelchLock;
62 | static std::mutex squelchLockMutex;
63 |
64 |
65 | Modem *cModem = nullptr;
66 | ModemKit *cModemKit = nullptr;
67 |
68 | DemodulatorThreadPostInputQueuePtr iqInputQueue;
69 | AudioThreadInputQueuePtr audioOutputQueue;
70 | DemodulatorThreadOutputQueuePtr audioVisOutputQueue;
71 | DemodulatorThreadOutputQueuePtr audioSinkOutputQueue = nullptr;
72 |
73 | //protects the audioVisOutputQueue dynamic binding change at runtime (in DemodulatorMgr)
74 | SpinMutex m_mutexAudioVisOutputQueue;
75 | };
76 |
--------------------------------------------------------------------------------
/src/forms/Dialog/AboutDialog.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #include "AboutDialog.h"
5 |
6 | AboutDialog::AboutDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
7 | : AboutDialogBase(parent, id, title, pos, size, style) {
8 | m_appName->SetLabelText(CUBICSDR_INSTALL_NAME " v" CUBICSDR_VERSION);
9 | }
10 |
--------------------------------------------------------------------------------
/src/forms/Dialog/AboutDialog.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include "AboutDialogBase.h"
7 | #include "CubicSDRDefs.h"
8 |
9 | class AboutDialog : public AboutDialogBase {
10 | public:
11 | explicit AboutDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("About"),
12 | const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 530, 420 ),
13 | long style = wxDEFAULT_DIALOG_STYLE );
14 |
15 | };
16 |
--------------------------------------------------------------------------------
/src/forms/Dialog/ActionDialog.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #include "ActionDialog.h"
5 |
6 |
7 | ActionDialog *ActionDialog::activeDialog = nullptr;
8 |
9 | ActionDialog::ActionDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
10 | : ActionDialogBase(parent, id, title, pos, size, style) {
11 | }
12 |
13 |
14 | ActionDialog::~ActionDialog() = default;
15 |
16 | void ActionDialog::showDialog(ActionDialog *dlg) {
17 | if (activeDialog) { // rejected
18 | delete dlg;
19 | return;
20 | }
21 | activeDialog = dlg;
22 | dlg->Layout();
23 | dlg->Fit();
24 | dlg->ShowModal();
25 | }
26 |
27 | ActionDialog *ActionDialog::getActiveDialog() {
28 | return activeDialog;
29 | }
30 |
31 |
32 | void ActionDialog::setActiveDialog(ActionDialog *dlg) {
33 | activeDialog = dlg;
34 | }
35 |
36 |
37 | void ActionDialog::onClickCancel( wxCommandEvent& /* event */ ) {
38 | ActionDialog *dlg = activeDialog;
39 | ActionDialog::setActiveDialog(nullptr);
40 | dlg->EndModal(0);
41 | doClickCancel();
42 | delete dlg;
43 | }
44 |
45 |
46 | void ActionDialog::onClickOK( wxCommandEvent& /* event */ ) {
47 | ActionDialog *dlg = activeDialog;
48 | ActionDialog::setActiveDialog(nullptr);
49 | dlg->EndModal(0);
50 | doClickOK();
51 | delete dlg;
52 | }
53 |
54 |
55 | void ActionDialog::doClickCancel() {
56 |
57 | }
58 |
59 |
60 | void ActionDialog::doClickOK() {
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/src/forms/Dialog/ActionDialog.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #include "ActionDialogBase.h"
5 | #include
6 |
7 | class ActionDialog : public ActionDialogBase {
8 | public:
9 | explicit ActionDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("QuestionTitle"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
10 | ~ActionDialog() override;
11 |
12 | void onClickCancel( wxCommandEvent& event ) override;
13 | void onClickOK( wxCommandEvent& event ) override;
14 |
15 | virtual void doClickCancel();
16 | virtual void doClickOK();
17 |
18 | static ActionDialog *getActiveDialog();
19 | static void setActiveDialog(ActionDialog *dlg);
20 | static void showDialog(ActionDialog *dlg);
21 |
22 | private:
23 | static ActionDialog *activeDialog;
24 | };
25 |
--------------------------------------------------------------------------------
/src/forms/Dialog/ActionDialogBase.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | // C++ code generated with wxFormBuilder (version Aug 8 2018)
3 | // http://www.wxformbuilder.org/
4 | //
5 | // PLEASE DO *NOT* EDIT THIS FILE!
6 | ///////////////////////////////////////////////////////////////////////////
7 |
8 | #include "ActionDialogBase.h"
9 |
10 | ///////////////////////////////////////////////////////////////////////////
11 |
12 | ActionDialogBase::ActionDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
13 | {
14 | this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 |
16 | wxBoxSizer* mainSizer;
17 | mainSizer = new wxBoxSizer( wxVERTICAL );
18 |
19 | m_questionText = new wxStaticText( this, wxID_ANY, wxT("Question"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
20 | m_questionText->Wrap( -1 );
21 | mainSizer->Add( m_questionText, 1, wxALL|wxEXPAND, 5 );
22 |
23 | wxBoxSizer* buttonSizer;
24 | buttonSizer = new wxBoxSizer( wxHORIZONTAL );
25 |
26 | m_cancelButton = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
27 | buttonSizer->Add( m_cancelButton, 1, wxALL|wxEXPAND, 5 );
28 |
29 | m_okButton = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
30 | buttonSizer->Add( m_okButton, 1, wxALL|wxEXPAND, 5 );
31 |
32 |
33 | mainSizer->Add( buttonSizer, 1, wxEXPAND, 5 );
34 |
35 |
36 | this->SetSizer( mainSizer );
37 | this->Layout();
38 | mainSizer->Fit( this );
39 |
40 | this->Centre( wxBOTH );
41 |
42 | // Connect Events
43 | m_cancelButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActionDialogBase::onClickCancel ), NULL, this );
44 | m_okButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActionDialogBase::onClickOK ), NULL, this );
45 | }
46 |
47 | ActionDialogBase::~ActionDialogBase()
48 | {
49 | // Disconnect Events
50 | m_cancelButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActionDialogBase::onClickCancel ), NULL, this );
51 | m_okButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActionDialogBase::onClickOK ), NULL, this );
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/src/forms/Dialog/ActionDialogBase.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | // C++ code generated with wxFormBuilder (version Aug 8 2018)
3 | // http://www.wxformbuilder.org/
4 | //
5 | // PLEASE DO *NOT* EDIT THIS FILE!
6 | ///////////////////////////////////////////////////////////////////////////
7 |
8 | #ifndef __ACTIONDIALOGBASE_H__
9 | #define __ACTIONDIALOGBASE_H__
10 |
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include
25 |
26 | ///////////////////////////////////////////////////////////////////////////
27 |
28 |
29 | ///////////////////////////////////////////////////////////////////////////////
30 | /// Class ActionDialogBase
31 | ///////////////////////////////////////////////////////////////////////////////
32 | class ActionDialogBase : public wxDialog
33 | {
34 | private:
35 |
36 | protected:
37 | wxStaticText* m_questionText;
38 | wxButton* m_cancelButton;
39 | wxButton* m_okButton;
40 |
41 | // Virtual event handlers, override them in your derived class
42 | virtual void onClickCancel( wxCommandEvent& event ) { event.Skip(); }
43 | virtual void onClickOK( wxCommandEvent& event ) { event.Skip(); }
44 |
45 |
46 | public:
47 |
48 | ActionDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("QuestionTitle"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
49 | ~ActionDialogBase();
50 |
51 | };
52 |
53 | #endif //__ACTIONDIALOGBASE_H__
54 |
--------------------------------------------------------------------------------
/src/forms/Dialog/PortSelectorDialog.cpp:
--------------------------------------------------------------------------------
1 | #include "PortSelectorDialog.h"
2 |
3 | #include "rs232.h"
4 | #include "CubicSDR.h"
5 |
6 | PortSelectorDialog::PortSelectorDialog( wxWindow* parent, wxWindowID id, const std::string& defaultPort ) : PortSelectorDialogBase(parent, id) {
7 | comEnumerate();
8 |
9 | int nPorts = comGetNoPorts();
10 |
11 | if (!defaultPort.empty()) {
12 | m_portList->Append(defaultPort);
13 | }
14 |
15 | for (int i = 0; i < nPorts; i++) {
16 | #ifdef WIN32
17 | string portName(comGetPortName(i));
18 | #else
19 | string portName(comGetInternalName(i));
20 | #endif
21 | if (portName != defaultPort) {
22 | m_portList->Append(portName);
23 | }
24 | }
25 |
26 | comTerminate();
27 |
28 | m_portSelection->SetValue(defaultPort);
29 | }
30 |
31 | void PortSelectorDialog::onListSelect( wxCommandEvent& /* event */ ) {
32 | int pSelect = m_portList->GetSelection();
33 | if (pSelect != -1) {
34 | m_portSelection->SetValue(m_portList->GetString(pSelect));
35 | }
36 | }
37 |
38 |
39 | void PortSelectorDialog::onCancelButton( wxCommandEvent& /* event */ ) {
40 | wxGetApp().getAppFrame()->dismissRigControlPortDialog();
41 | }
42 |
43 |
44 | void PortSelectorDialog::onOKButton( wxCommandEvent& /* event */ ) {
45 | wxGetApp().getAppFrame()->setRigControlPort(m_portSelection->GetValue().ToStdString());
46 | }
47 |
48 |
49 | void PortSelectorDialog::onClose(wxCloseEvent & /* event */) {
50 | wxGetApp().getAppFrame()->dismissRigControlPortDialog();
51 | }
52 |
--------------------------------------------------------------------------------
/src/forms/Dialog/PortSelectorDialog.h:
--------------------------------------------------------------------------------
1 | #include "PortSelectorDialogBase.h"
2 |
3 | class PortSelectorDialog : public PortSelectorDialogBase {
4 | public:
5 | explicit PortSelectorDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const std::string& defaultPort = "" );
6 |
7 | protected:
8 | void onListSelect( wxCommandEvent& event ) override;
9 | void onCancelButton( wxCommandEvent& event ) override;
10 | void onOKButton( wxCommandEvent& event ) override;
11 | void onClose( wxCloseEvent& event ) override;
12 | };
13 |
--------------------------------------------------------------------------------
/src/forms/Dialog/PortSelectorDialogBase.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | // C++ code generated with wxFormBuilder (version Oct 26 2018)
3 | // http://www.wxformbuilder.org/
4 | //
5 | // PLEASE DO *NOT* EDIT THIS FILE!
6 | ///////////////////////////////////////////////////////////////////////////
7 |
8 | #pragma once
9 |
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | ///////////////////////////////////////////////////////////////////////////
28 |
29 |
30 | ///////////////////////////////////////////////////////////////////////////////
31 | /// Class PortSelectorDialogBase
32 | ///////////////////////////////////////////////////////////////////////////////
33 | class PortSelectorDialogBase : public wxDialog
34 | {
35 | private:
36 |
37 | protected:
38 | wxStaticText* m_staticText1;
39 | wxListBox* m_portList;
40 | wxStaticText* m_staticText2;
41 | wxTextCtrl* m_portSelection;
42 | wxButton* m_cancelButton;
43 | wxButton* m_okButton;
44 |
45 | // Virtual event handlers, override them in your derived class
46 | virtual void onClose( wxCloseEvent& event ) { event.Skip(); }
47 | virtual void onListSelect( wxCommandEvent& event ) { event.Skip(); }
48 | virtual void onCancelButton( wxCommandEvent& event ) { event.Skip(); }
49 | virtual void onOKButton( wxCommandEvent& event ) { event.Skip(); }
50 |
51 |
52 | public:
53 |
54 | PortSelectorDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Select Port"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 320,260 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
55 | ~PortSelectorDialogBase();
56 |
57 | };
58 |
59 |
--------------------------------------------------------------------------------
/src/forms/DigitalConsole/DigitalConsole.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Charles J. Cliffe
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #pragma once
5 |
6 | #include