mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-23 00:14:44 +01:00
Start of notch control + added raspberry pi CI
This commit is contained in:
parent
5a19829068
commit
b141c4b2a5
30
.github/workflows/build_all.yml
vendored
30
.github/workflows/build_all.yml
vendored
@ -276,27 +276,21 @@ jobs:
|
|||||||
name: sdrpp_ubuntu_impish_amd64
|
name: sdrpp_ubuntu_impish_amd64
|
||||||
path: ${{runner.workspace}}/sdrpp_debian_amd64.deb
|
path: ${{runner.workspace}}/sdrpp_debian_amd64.deb
|
||||||
|
|
||||||
# build_raspios_bullseye:
|
build_raspios_armhf:
|
||||||
# runs-on: ubuntu-latest
|
runs-on: raspberrypi
|
||||||
|
env:
|
||||||
|
DEBIAN_FRONTEND: 'noninteractive'
|
||||||
|
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
# - name: Create Docker Image
|
- name: Prepare CMake
|
||||||
# run: cd $GITHUB_WORKSPACE/docker_builds/raspios_bullseye && docker build . --tag sdrpp_build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
run: cmake $GITHUB_WORKSPACE -DOPT_BUILD_BLADERF_SOURCE=ON -DOPT_BUILD_LIMESDR_SOURCE=ON -DOPT_BUILD_NEW_PORTAUDIO_SINK=ON -DOPT_BUILD_M17_DECODER=ON
|
||||||
|
|
||||||
# - name: Run Container
|
- name: Build
|
||||||
# run: docker run --privileged --name build -v $GITHUB_WORKSPACE:/root/SDRPlusPlus --env BUILD_NO="-$GITHUB_RUN_NUMBER" sdrpp_build /root/do_build.sh
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
run: make VERBOSE=1 -j2
|
||||||
# - name: Recover Deb Archive
|
|
||||||
# working-directory: ${{runner.workspace}}
|
|
||||||
# run: docker cp build:/root/SDRPlusPlus/sdrpp_raspios_arm32.deb ./
|
|
||||||
|
|
||||||
# - name: Save Deb Archive
|
|
||||||
# uses: actions/upload-artifact@v2
|
|
||||||
# with:
|
|
||||||
# name: sdrpp_raspios_bullseye_arm32
|
|
||||||
# path: ${{runner.workspace}}/sdrpp_raspios_arm32.deb
|
|
||||||
|
|
||||||
create_full_archive:
|
create_full_archive:
|
||||||
# needs: ['build_windows', 'build_macos', 'build_debian_buster', 'build_debian_bullseye', 'build_debian_sid', 'build_ubuntu_bionic', 'build_ubuntu_focal', 'build_ubuntu_groovy', 'build_ubuntu_hirsute', 'build_ubuntu_impish', 'build_raspios_bullseye']
|
# needs: ['build_windows', 'build_macos', 'build_debian_buster', 'build_debian_bullseye', 'build_debian_sid', 'build_ubuntu_bionic', 'build_ubuntu_focal', 'build_ubuntu_groovy', 'build_ubuntu_hirsute', 'build_ubuntu_impish', 'build_raspios_bullseye']
|
||||||
|
@ -1144,11 +1144,22 @@ namespace ImGui {
|
|||||||
setOffset(generalOffset);
|
setOffset(generalOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WaterfallVFO::setNotchOffset(double offset) {
|
||||||
|
notchOffset = offset;
|
||||||
|
redrawRequired = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaterfallVFO::setNotchVisible(bool visible) {
|
||||||
|
notchVisible = visible;
|
||||||
|
redrawRequired = true;
|
||||||
|
}
|
||||||
|
|
||||||
void WaterfallVFO::updateDrawingVars(double viewBandwidth, float dataWidth, double viewOffset, ImVec2 widgetPos, int fftHeight) {
|
void WaterfallVFO::updateDrawingVars(double viewBandwidth, float dataWidth, double viewOffset, ImVec2 widgetPos, int fftHeight) {
|
||||||
double width = (bandwidth / viewBandwidth) * (double)dataWidth;
|
double width = (bandwidth / viewBandwidth) * (double)dataWidth;
|
||||||
int center = roundf((((centerOffset - viewOffset) / (viewBandwidth / 2.0)) + 1.0) * ((double)dataWidth / 2.0));
|
int center = roundf((((centerOffset - viewOffset) / (viewBandwidth / 2.0)) + 1.0) * ((double)dataWidth / 2.0));
|
||||||
int left = roundf((((lowerOffset - viewOffset) / (viewBandwidth / 2.0)) + 1.0) * ((double)dataWidth / 2.0));
|
int left = roundf((((lowerOffset - viewOffset) / (viewBandwidth / 2.0)) + 1.0) * ((double)dataWidth / 2.0));
|
||||||
int right = roundf((((upperOffset - viewOffset) / (viewBandwidth / 2.0)) + 1.0) * ((double)dataWidth / 2.0));
|
int right = roundf((((upperOffset - viewOffset) / (viewBandwidth / 2.0)) + 1.0) * ((double)dataWidth / 2.0));
|
||||||
|
int notch = roundf((((notchOffset + centerOffset - viewOffset) / (viewBandwidth / 2.0)) + 1.0) * ((double)dataWidth / 2.0));
|
||||||
|
|
||||||
// Check weather the line is visible
|
// Check weather the line is visible
|
||||||
if (left >= 0 && left < dataWidth && reference == REF_LOWER) {
|
if (left >= 0 && left < dataWidth && reference == REF_LOWER) {
|
||||||
@ -1192,6 +1203,9 @@ namespace ImGui {
|
|||||||
lbwSelMax = ImVec2(rectMin.x + 2, rectMax.y);
|
lbwSelMax = ImVec2(rectMin.x + 2, rectMax.y);
|
||||||
rbwSelMin = ImVec2(rectMax.x - 2, rectMin.y);
|
rbwSelMin = ImVec2(rectMax.x - 2, rectMin.y);
|
||||||
rbwSelMax = ImVec2(rectMax.x + 2, rectMax.y);
|
rbwSelMax = ImVec2(rectMax.x + 2, rectMax.y);
|
||||||
|
|
||||||
|
notchMin = ImVec2(widgetPos.x + 50 + notch - 2, widgetPos.y + 9);
|
||||||
|
notchMax = ImVec2(widgetPos.x + 50 + notch + 2, widgetPos.y + fftHeight + 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaterfallVFO::draw(ImGuiWindow* window, bool selected) {
|
void WaterfallVFO::draw(ImGuiWindow* window, bool selected) {
|
||||||
@ -1200,6 +1214,10 @@ namespace ImGui {
|
|||||||
window->DrawList->AddLine(lineMin, lineMax, selected ? IM_COL32(255, 0, 0, 255) : IM_COL32(255, 255, 0, 255));
|
window->DrawList->AddLine(lineMin, lineMax, selected ? IM_COL32(255, 0, 0, 255) : IM_COL32(255, 255, 0, 255));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (notchVisible) {
|
||||||
|
window->DrawList->AddRectFilled(notchMin, notchMax, IM_COL32(255, 0, 0, 127));
|
||||||
|
}
|
||||||
|
|
||||||
if (!gui::mainWindow.lockWaterfallControls && !gui::waterfall.inputHandled) {
|
if (!gui::mainWindow.lockWaterfallControls && !gui::waterfall.inputHandled) {
|
||||||
ImVec2 mousePos = ImGui::GetMousePos();
|
ImVec2 mousePos = ImGui::GetMousePos();
|
||||||
if (rectMax.x - rectMin.x < 10) { return; }
|
if (rectMax.x - rectMin.x < 10) { return; }
|
||||||
|
@ -17,6 +17,8 @@ namespace ImGui {
|
|||||||
void setBandwidth(double bw);
|
void setBandwidth(double bw);
|
||||||
void setReference(int ref);
|
void setReference(int ref);
|
||||||
void setSnapInterval(double interval);
|
void setSnapInterval(double interval);
|
||||||
|
void setNotchOffset(double offset);
|
||||||
|
void setNotchVisible(bool visible);
|
||||||
void updateDrawingVars(double viewBandwidth, float dataWidth, double viewOffset, ImVec2 widgetPos, int fftHeight); // NOTE: Datawidth double???
|
void updateDrawingVars(double viewBandwidth, float dataWidth, double viewOffset, ImVec2 widgetPos, int fftHeight); // NOTE: Datawidth double???
|
||||||
void draw(ImGuiWindow* window, bool selected);
|
void draw(ImGuiWindow* window, bool selected);
|
||||||
|
|
||||||
@ -35,6 +37,9 @@ namespace ImGui {
|
|||||||
double snapInterval = 5000;
|
double snapInterval = 5000;
|
||||||
int reference = REF_CENTER;
|
int reference = REF_CENTER;
|
||||||
|
|
||||||
|
double notchOffset = 0;
|
||||||
|
bool notchVisible = false;
|
||||||
|
|
||||||
bool leftClamped;
|
bool leftClamped;
|
||||||
bool rightClamped;
|
bool rightClamped;
|
||||||
|
|
||||||
@ -54,6 +59,8 @@ namespace ImGui {
|
|||||||
ImVec2 wfLbwSelMax;
|
ImVec2 wfLbwSelMax;
|
||||||
ImVec2 wfRbwSelMin;
|
ImVec2 wfRbwSelMin;
|
||||||
ImVec2 wfRbwSelMax;
|
ImVec2 wfRbwSelMax;
|
||||||
|
ImVec2 notchMin;
|
||||||
|
ImVec2 notchMax;
|
||||||
|
|
||||||
bool centerOffsetChanged = false;
|
bool centerOffsetChanged = false;
|
||||||
bool lowerOffsetChanged = false;
|
bool lowerOffsetChanged = false;
|
||||||
@ -69,6 +76,7 @@ namespace ImGui {
|
|||||||
ImU32 color = IM_COL32(255, 255, 255, 50);
|
ImU32 color = IM_COL32(255, 255, 255, 50);
|
||||||
|
|
||||||
Event<double> onUserChangedBandwidth;
|
Event<double> onUserChangedBandwidth;
|
||||||
|
Event<double> onUserChangedNotch;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WaterFall {
|
class WaterFall {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user