diff --git a/modules/radio/src/path.cpp b/modules/radio/src/path.cpp index bff3090..2609e7c 100644 --- a/modules/radio/src/path.cpp +++ b/modules/radio/src/path.cpp @@ -146,7 +146,7 @@ void SigPath::setDemodulator(int demId, float bandWidth) { ssbDemod.start(); } else { - spdlog::error("UNIMPLEMENTED DEMODULATOR IN SigPath::setDemodulator (start)"); + spdlog::error("UNIMPLEMENTED DEMODULATOR IN SigPath::setDemodulator (start): {0}", demId); } deemp.setBlockSize(audioResamp.getOutputBlockSize()); diff --git a/prepare_root.bat b/prepare_root.bat index b78a1ee..2ed7730 100644 --- a/prepare_root.bat +++ b/prepare_root.bat @@ -1,3 +1,4 @@ echo OFF +copy /b/v/y build\Release\* root\ copy /b/v/y build\modules\radio\Release\radio.dll root\modules\radio.dll copy /b/v/y build\modules\recorder\Release\recorder.dll root\modules\recorder.dll diff --git a/prepare_root.sh b/prepare_root.sh index 6f19402..7cbe1e2 100644 --- a/prepare_root.sh +++ b/prepare_root.sh @@ -1,2 +1,2 @@ -cp modules/radio/build/radio.so root/modules/radio.so -cp modules/recorder/build/recorder.so root/modules/recorder.so \ No newline at end of file +cp build/modules/radio/radio.so root/modules/radio.so +cp build/modules/recorder/recorder.so root/modules/recorder.so \ No newline at end of file diff --git a/readme.md b/readme.md index f89f024..9c0e69b 100644 --- a/readme.md +++ b/readme.md @@ -65,20 +65,25 @@ comming soon :) comming soon as well :) # Contributing + Feel free to issue pull request and report bugs via the github issues. I will soon publish a contributing.md listing the code style to use. # Credits -## Libaries used -* [SoapySDR (PothosWare)](https://github.com/pothosware/SoapySDR) -* [Dear ImGui (ocornut)](https://github.com/ocornut/imgui) -* [spdlog (gabime)](https://github.com/gabime/spdlog) -* [json (nlohmann)](https://github.com/nlohmann/json) -* [portaudio (PortAudio community)](http://www.portaudio.com/) + +## Patrons +* [SignalsEverywhere](https://signalseverywhere.com/) ## Contributors * [aosync](https://github.com/aosync) * [Benjamin Kyd](https://github.com/benkyd) * [Tobias Mädel](https://github.com/Manawyrm) * [Raov](https://twitter.com/raov_birbtog) -* [SignalsEverywhere](https://signalseverywhere.com/) \ No newline at end of file +* [Howard0su](https://github.com/howard0su) + +## Libaries used +* [SoapySDR (PothosWare)](https://github.com/pothosware/SoapySDR) +* [Dear ImGui (ocornut)](https://github.com/ocornut/imgui) +* [spdlog (gabime)](https://github.com/gabime/spdlog) +* [json (nlohmann)](https://github.com/nlohmann/json) +* [portaudio (PortAudio community)](http://www.portaudio.com/) \ No newline at end of file diff --git a/root/config.json b/root/config.json index 38300a1..e072419 100644 --- a/root/config.json +++ b/root/config.json @@ -1,5 +1,11 @@ { - "audio": {}, + "audio": { + "Radio": { + "device": "Speakers (Realtek High Definiti", + "sampleRate": 48000.0, + "volume": 0.32258063554763794 + } + }, "bandPlan": "General", "bandPlanEnabled": true, "fftHeight": 300, @@ -7,10 +13,19 @@ "max": 0.0, "maximized": false, "menuWidth": 300, - "min": -70.0, + "min": -52.20588302612305, "showWaterfall": true, - "source": "", - "sourceSettings": {}, + "source": "HackRF One #0 901868dc282c8f8b", + "sourceSettings": { + "HackRF One #0 901868dc282c8f8b": { + "gains": { + "AMP": 0.0, + "LNA": 24.503000259399414, + "VGA": 16.229999542236328 + }, + "sampleRate": 8000000 + } + }, "windowSize": { "h": 720, "w": 1280 diff --git a/root/res/icons/stop.png b/root/res/icons/stop.png new file mode 100644 index 0000000..366651b Binary files /dev/null and b/root/res/icons/stop.png differ diff --git a/root/sdrpp.zip b/root/sdrpp.zip deleted file mode 100644 index b3e65f4..0000000 Binary files a/root/sdrpp.zip and /dev/null differ diff --git a/root_dev/band_colors.json b/root_dev/band_colors.json new file mode 100644 index 0000000..2e9d8a9 --- /dev/null +++ b/root_dev/band_colors.json @@ -0,0 +1,7 @@ +{ + "broadcast": "#0000FFFF", + "amateur": "#FF0000FF", + "aviation": "#00FF00FF", + "marine": "#00FFFFFF", + "military": "#FFFF00FF" +} \ No newline at end of file diff --git a/root_dev/bandplans/general.json b/root_dev/bandplans/general.json new file mode 100644 index 0000000..600c8ee --- /dev/null +++ b/root_dev/bandplans/general.json @@ -0,0 +1,267 @@ +{ + "name": "General", + "country_name": "Worldwide", + "country_code": "--", + "author_name": "Ryzerth", + "author_url": "https://github.com/AlexandreRouma", + "bands": [ + { + "name": "Long Wave", + "type": "broadcast", + "start": 148500, + "end": 283500 + }, + { + "name": "Medium Wave", + "type": "broadcast", + "start": 526500, + "end": 1606500 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 2300000, + "end": 2468000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 3200000, + "end": 3400000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 3950000, + "end": 4000000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 4750000, + "end": 4995000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 5005000, + "end": 5060000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 5900000, + "end": 6200000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 7200000, + "end": 7450000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 9400000, + "end": 9900000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 11600000, + "end": 12100000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 13570000, + "end": 13870000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 15100000, + "end": 15800000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 17480000, + "end": 17900000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 18900000, + "end": 19020000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 21450000, + "end": 21850000 + }, + { + "name": "Shortwave Broadcast", + "type": "broadcast", + "start": 25670000, + "end": 26100000 + }, + { + "name": "FM Broadcast", + "type": "broadcast", + "start": 87500000, + "end": 108000000 + }, + { + "name": "Air Band VOR/ILS", + "type": "aviation", + "start": 108000000, + "end": 118000000 + }, + { + "name": "Air Band Voice", + "type": "aviation", + "start": 118000000, + "end": 137000000 + }, + { + "name": "160m Ham Band", + "type": "amateur", + "start": 1800000, + "end": 2000000 + }, + { + "name": "80m Ham Band", + "type": "amateur", + "start": 3500000, + "end": 3950000 + }, + { + "name": "60m Ham Band", + "type": "amateur", + "start": 5351500, + "end": 5366500 + }, + { + "name": "40m Ham Band", + "type": "amateur", + "start": 7000000, + "end": 7200000 + }, + { + "name": "30m Ham Band", + "type": "amateur", + "start": 10100000, + "end": 10150000 + }, + { + "name": "20m Ham Band", + "type": "amateur", + "start": 14000000, + "end": 14350000 + }, + { + "name": "17m Ham Band", + "type": "amateur", + "start": 18068000, + "end": 18168000 + }, + { + "name": "15m Ham Band", + "type": "amateur", + "start": 21000000, + "end": 21450000 + }, + { + "name": "12m Ham Band", + "type": "amateur", + "start": 24890000, + "end": 24990000 + }, + { + "name": "CB", + "type": "amateur", + "start": 26960000, + "end": 27410000 + }, + { + "name": "10m Ham Band", + "type": "amateur", + "start": 28000000, + "end": 29750000 + }, + { + "name": "6m Ham Band", + "type": "amateur", + "start": 50000000, + "end": 54000000 + }, + { + "name": "2m Ham Band", + "type": "amateur", + "start": 144000000, + "end": 148000000 + }, + { + "name": "Marine", + "type": "marine", + "start": 156000000, + "end": 162025000 + }, + { + "name": "1.25m Ham Band", + "type": "amateur", + "start": 222000000, + "end": 225000000 + }, + { + "name": "Military Air", + "type": "military", + "start": 225000000, + "end": 380000000 + }, + { + "name": "Military Sat", + "type": "military", + "start": 240000000, + "end": 270000000 + }, + { + "name": "70cm Ham Band", + "type": "amateur", + "start": 420000000, + "end": 450000000 + }, + { + "name": "PMR446", + "type": "amateur", + "start": 446000000, + "end": 446200000 + }, + { + "name": "33cm Ham Band", + "type": "amateur", + "start": 902000000, + "end": 928000000 + }, + { + "name": "23cm Ham Band", + "type": "amateur", + "start": 1240000000, + "end": 1300000000 + }, + { + "name": "13cm Ham Band", + "type": "amateur", + "start": 2300000000, + "end": 2310000000 + }, + { + "name": "13cm Ham Band", + "type": "amateur", + "start": 2390000000, + "end": 2450000000 + } + ] +} \ No newline at end of file diff --git a/root_dev/bandplans/germany.json b/root_dev/bandplans/germany.json new file mode 100644 index 0000000..c9568bf --- /dev/null +++ b/root_dev/bandplans/germany.json @@ -0,0 +1,141 @@ +{ + "name": "Germany", + "country_name": "Germany", + "country_code": "DE", + "author_name": "Tobias Mädel", + "author_url": "https://tbspace.de", + "bands": [ + { + "name": "LW", + "type": "amateur", + "start": 135700, + "end": 137800 + }, + { + "name": "630m", + "type": "amateur", + "start": 472000, + "end": 479000 + }, + { + "name": "160m", + "type": "amateur", + "start": 1810000, + "end": 2000000 + }, + { + "name": "80m", + "type": "amateur", + "start": 3500000, + "end": 3800000 + }, + { + "name": "60m", + "type": "amateur", + "start": 5351500, + "end": 5366500 + }, + { + "name": "40m", + "type": "amateur", + "start": 7000000, + "end": 7200000 + }, + { + "name": "30m", + "type": "amateur", + "start": 10100000, + "end": 10150000 + }, + { + "name": "20m", + "type": "amateur", + "start": 14000000, + "end": 14350000 + }, + { + "name": "17m", + "type": "amateur", + "start": 18068000, + "end": 18168000 + }, + { + "name": "15m", + "type": "amateur", + "start": 21000000, + "end": 21450000 + }, + { + "name": "12m", + "type": "amateur", + "start": 24890000, + "end": 24990000 + }, + { + "name": "CB", + "type": "other", + "start": 26565000, + "end": 27405000 + }, + { + "name": "10m", + "type": "amateur", + "start": 28000000, + "end": 29700000 + }, + { + "name": "6m", + "type": "amateur", + "start": 50030000, + "end": 51000000 + }, + { + "name": "4m", + "type": "amateur", + "start": 70150000, + "end": 70200000 + }, + { + "name": "FM", + "type": "broadcast", + "start": 87500000, + "end": 108000000 + }, + { + "name": "2m", + "type": "amateur", + "start": 144000000, + "end": 146000000 + }, + { + "name": "Freenet", + "type": "other", + "start": 149025000, + "end": 149115625 + }, + { + "name": "70cm", + "type": "amateur", + "start": 430000000, + "end": 440000000 + }, + { + "name": "PMR446", + "type": "other", + "start": 446006250, + "end": 446196875 + }, + { + "name": "23cm", + "type": "amateur", + "start": 1240000000, + "end": 1300000000 + }, + { + "name": "13cm", + "type": "amateur", + "start": 2320000000, + "end": 2450000000 + } + ] +} \ No newline at end of file diff --git a/root_dev/bandplans/russia.json b/root_dev/bandplans/russia.json new file mode 100644 index 0000000..3ebcb11 --- /dev/null +++ b/root_dev/bandplans/russia.json @@ -0,0 +1,135 @@ +{ + "name": "Russia", + "country_name": "Russia", + "country_code": "RU", + "author_name": "Raov", + "author_url": "https://twitter.com/raov_birbtog", + "bands": [ + { + "name": "160m CW", + "type": "amateur", + "start": 1810000, + "end": 1838000 + }, + { + "name": "160m NB", + "type": "amateur", + "start": 1838000, + "end": 1840000 + }, + { + "name": "160m + Digi", + "type": "amateur", + "start": 1840000, + "end": 1843000 + }, + { + "name": "160m", + "type": "amateur", + "start": 1843000, + "end": 2000000 + }, + { + "name": "80m CW", + "type": "amateur", + "start": 3500000, + "end": 3510000 + }, + { + "name": "80m CW Contest", + "type": "amateur", + "start": 3510000, + "end": 3560000 + }, + { + "name": "80m CW", + "type": "amateur", + "start": 3560000, + "end": 3570000 + }, + { + "name": "80m NB, Digi 200Hz", + "type": "amateur", + "start": 3570000, + "end": 3580000 + }, + { + "name": "80m NB, Digi 500Hz", + "type": "amateur", + "start": 3580000, + "end": 3600000 + }, + { + "name": "80m SSB Contest", + "type": "amateur", + "start": 3600000, + "end": 3650000 + }, + { + "name": "80m", + "type": "amateur", + "start": 3650000, + "end": 3700000 + }, + { + "name": "80m SSB Contest", + "type": "amateur", + "start": 3700000, + "end": 3800000 + }, + { + "name": "60m CW 200Hz", + "type": "amateur", + "start": 5351500, + "end": 5354000 + }, + { + "name": "60m USB", + "type": "amateur", + "start": 5354000, + "end": 5366000 + }, + { + "name": "60m CW 20Hz", + "type": "amateur", + "start": 5356000, + "end": 5366500 + }, + { + "name": "40m CW", + "type": "amateur", + "start": 7000000, + "end": 7040000 + }, + { + "name": "40m NB, Digi 500Hz", + "type": "amateur", + "start": 7040000, + "end": 7050000 + }, + { + "name": "40m", + "type": "amateur", + "start": 7050000, + "end": 7060000 + }, + { + "name": "40m SSB Contest", + "type": "amateur", + "start": 7060000, + "end": 7100000 + }, + { + "name": "40m", + "type": "amateur", + "start": 7100000, + "end": 7130000 + }, + { + "name": "40m SSB Contest", + "type": "amateur", + "start": 7130000, + "end": 7200000 + } + ] +} \ No newline at end of file diff --git a/root_dev/config.json b/root_dev/config.json new file mode 100644 index 0000000..9b753d4 --- /dev/null +++ b/root_dev/config.json @@ -0,0 +1,33 @@ +{ + "audio": { + "Radio": { + "device": "Speakers (Realtek High Definiti", + "sampleRate": 48000.0, + "volume": 0.2956989109516144 + } + }, + "bandPlan": "General", + "bandPlanEnabled": true, + "fftHeight": 300, + "frequency": 103184112, + "max": 0.0, + "maximized": false, + "menuWidth": 300, + "min": -52.20588302612305, + "showWaterfall": true, + "source": "HackRF One #0 901868dc282c8f8b", + "sourceSettings": { + "HackRF One #0 901868dc282c8f8b": { + "gains": { + "AMP": 0.0, + "LNA": 24.503000259399414, + "VGA": 16.229999542236328 + }, + "sampleRate": 8000000 + } + }, + "windowSize": { + "h": 720, + "w": 1280 + } +} \ No newline at end of file diff --git a/root_dev/module_list.json b/root_dev/module_list.json new file mode 100644 index 0000000..f7d192f --- /dev/null +++ b/root_dev/module_list.json @@ -0,0 +1,4 @@ +{ + "Radio": "./modules/radio.dll", + "Recorder": "./modules/recorder.dll" +} \ No newline at end of file diff --git a/root_dev/modules/.gitkeep b/root_dev/modules/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/root_dev/recordings/.gitkeep b/root_dev/recordings/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/root_dev/res/fonts/Roboto-Medium.ttf b/root_dev/res/fonts/Roboto-Medium.ttf new file mode 100644 index 0000000..39c63d7 Binary files /dev/null and b/root_dev/res/fonts/Roboto-Medium.ttf differ diff --git a/root_dev/res/icons/menu.png b/root_dev/res/icons/menu.png new file mode 100644 index 0000000..317cfde Binary files /dev/null and b/root_dev/res/icons/menu.png differ diff --git a/root_dev/res/icons/play.png b/root_dev/res/icons/play.png new file mode 100644 index 0000000..93684dd Binary files /dev/null and b/root_dev/res/icons/play.png differ diff --git a/root_dev/res/icons/sdrpp.ico b/root_dev/res/icons/sdrpp.ico new file mode 100644 index 0000000..9ef26c2 Binary files /dev/null and b/root_dev/res/icons/sdrpp.ico differ diff --git a/root_dev/res/icons/sdrpp.png b/root_dev/res/icons/sdrpp.png new file mode 100644 index 0000000..03cf618 Binary files /dev/null and b/root_dev/res/icons/sdrpp.png differ diff --git a/root_dev/res/icons/stop.png b/root_dev/res/icons/stop.png new file mode 100644 index 0000000..366651b Binary files /dev/null and b/root_dev/res/icons/stop.png differ diff --git a/src/frequency_select.cpp b/src/frequency_select.cpp index fbbc3c4..45c4f57 100644 --- a/src/frequency_select.cpp +++ b/src/frequency_select.cpp @@ -9,7 +9,7 @@ FrequencySelect::FrequencySelect() { } void FrequencySelect::init() { - font = ImGui::GetIO().Fonts->AddFontFromFileTTF("res/fonts/Roboto-Medium.ttf", 42.0f); + font = ImGui::GetIO().Fonts->AddFontFromFileTTF((config::getRootDirectory() + "/res/fonts/Roboto-Medium.ttf").c_str(), 42.0f); for (int i = 0; i < 12; i++) { digits[i] = 0; } diff --git a/src/frequency_select.h b/src/frequency_select.h index ebbe9ba..ef94c97 100644 --- a/src/frequency_select.h +++ b/src/frequency_select.h @@ -2,6 +2,7 @@ #include #include #include +#include class FrequencySelect { public: diff --git a/src/main.cpp b/src/main.cpp index 243bd83..9cd9672 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,6 +21,9 @@ #include #endif +// Comment to build a normal release +// #define DEV_BUILD + bool maximized = false; bool fullScreen = false; @@ -44,7 +47,9 @@ int main() { spdlog::info("SDR++ v" VERSION_STR); -#ifdef _WIN32 +#ifdef DEV_BUILD + config::setRootDirectory("../root"); +#elif _WIN32 config::setRootDirectory("."); #else config::setRootDirectory("/etc/sdrpp"); diff --git a/src/main_window.cpp b/src/main_window.cpp index 3360780..a243995 100644 --- a/src/main_window.cpp +++ b/src/main_window.cpp @@ -841,6 +841,7 @@ void drawWindow() { ImGui::BulletText("Benjamin Kyd"); ImGui::BulletText("Tobias Mädel"); ImGui::BulletText("Raov"); + ImGui::BulletText("Howard0su"); // Libraries ImGui::NextColumn(); diff --git a/src/style.cpp b/src/style.cpp index 342d6b1..a8ff699 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -9,7 +9,7 @@ namespace style { ImGui::GetStyle().PopupRounding = 0.0f; ImGui::GetStyle().ScrollbarRounding = 0.0f; - ImGui::GetIO().Fonts->AddFontFromFileTTF("res/fonts/Roboto-Medium.ttf", 16.0f); + ImGui::GetIO().Fonts->AddFontFromFileTTF((config::getRootDirectory() + "/res/fonts/Roboto-Medium.ttf").c_str(), 16.0f); ImGui::StyleColorsDark(); //ImGui::StyleColorsLight(); @@ -23,7 +23,7 @@ namespace style { ImGui::GetStyle().PopupRounding = 0.0f; ImGui::GetStyle().ScrollbarRounding = 0.0f; - ImGui::GetIO().Fonts->AddFontFromFileTTF("res/fonts/Roboto-Medium.ttf", 16.0f); + ImGui::GetIO().Fonts->AddFontFromFileTTF((config::getRootDirectory() + "/res/fonts/Roboto-Medium.ttf").c_str(), 16.0f); ImGui::StyleColorsDark(); diff --git a/src/style.h b/src/style.h index ae35e41..527bde1 100644 --- a/src/style.h +++ b/src/style.h @@ -1,6 +1,7 @@ #pragma once #include #include +#include namespace style { void setDefaultStyle();