mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-10 04:37:37 +01:00
Added pip command and fixed waterfall bug
This commit is contained in:
parent
7f6c555310
commit
10733f7a5d
2
.github/workflows/build_all.yml
vendored
2
.github/workflows/build_all.yml
vendored
@ -87,7 +87,7 @@ jobs:
|
||||
run: brew update
|
||||
|
||||
- name: Install dependencies
|
||||
run: brew install fftw glew glfw airspy airspyhf portaudio hackrf rtl-sdr libbladerf codec2
|
||||
run: brew install fftw glew glfw airspy airspyhf portaudio hackrf rtl-sdr libbladerf codec2 && pip3 install mako
|
||||
|
||||
- name: Install volk
|
||||
run: git clone --recursive https://github.com/gnuradio/volk && cd volk && mkdir build && cd build && cmake .. && make && sudo make install && cd ../../
|
||||
|
@ -25,42 +25,6 @@ float DEFAULT_COLOR_MAP[][3] = {
|
||||
{0x4A, 0x00, 0x00}
|
||||
};
|
||||
|
||||
inline void doZoom(int offset, int width, int outWidth, float* data, float* out, bool fast) {
|
||||
// NOTE: REMOVE THAT SHIT, IT'S JUST A HACKY FIX
|
||||
if (offset < 0) {
|
||||
offset = 0;
|
||||
}
|
||||
if (width > 524288) {
|
||||
width = 524288;
|
||||
}
|
||||
|
||||
float factor = (float)width / (float)outWidth;
|
||||
|
||||
if (fast) {
|
||||
for (int i = 0; i < outWidth; i++) {
|
||||
out[i] = data[(int)(offset + ((float)i * factor))];
|
||||
}
|
||||
}
|
||||
else {
|
||||
float sFactor = ceilf(factor);
|
||||
float uFactor;
|
||||
float id = offset;
|
||||
float val, maxVal;
|
||||
int sId;
|
||||
uint32_t maxId;
|
||||
for (int i = 0; i < outWidth; i++) {
|
||||
maxVal = -INFINITY;
|
||||
sId = (int)id;
|
||||
uFactor = (sId + sFactor > width) ? sFactor - ((sId + sFactor) - width) : sFactor;
|
||||
for (int j = 0; j < uFactor; j++) {
|
||||
if (data[sId + j] > maxVal) { maxVal = data[sId + j]; }
|
||||
}
|
||||
out[i] = maxVal;
|
||||
id += factor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Fix this hacky BS
|
||||
|
||||
double freq_ranges[] = {
|
||||
|
@ -81,6 +81,42 @@ namespace ImGui {
|
||||
float* getFFTBuffer();
|
||||
void pushFFT();
|
||||
|
||||
inline void doZoom(int offset, int width, int outWidth, float* data, float* out, bool fast) {
|
||||
// NOTE: REMOVE THAT SHIT, IT'S JUST A HACKY FIX
|
||||
if (offset < 0) {
|
||||
offset = 0;
|
||||
}
|
||||
if (width > 524288) {
|
||||
width = 524288;
|
||||
}
|
||||
|
||||
float factor = (float)width / (float)outWidth;
|
||||
|
||||
if (fast) {
|
||||
for (int i = 0; i < outWidth; i++) {
|
||||
out[i] = data[(int)(offset + ((float)i * factor))];
|
||||
}
|
||||
}
|
||||
else {
|
||||
float sFactor = ceilf(factor);
|
||||
float uFactor;
|
||||
float id = offset;
|
||||
float val, maxVal;
|
||||
int sId;
|
||||
uint32_t maxId;
|
||||
for (int i = 0; i < outWidth; i++) {
|
||||
maxVal = -INFINITY;
|
||||
sId = (int)id;
|
||||
uFactor = (sId + sFactor > rawFFTSize) ? sFactor - ((sId + sFactor) - rawFFTSize) : sFactor;
|
||||
for (int j = 0; j < uFactor; j++) {
|
||||
if (data[sId + j] > maxVal) { maxVal = data[sId + j]; }
|
||||
}
|
||||
out[i] = maxVal;
|
||||
id += factor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void updatePallette(float colors[][3], int colorCount);
|
||||
void updatePalletteFromArray(float* colors, int colorCount);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user