secondary fft is now complex, better display for digimodes based on FM
This commit is contained in:
@ -1628,8 +1628,8 @@ function secondary_demod_waterfall_add(data) {
|
||||
}
|
||||
|
||||
function secondary_demod_update_marker() {
|
||||
var width = Math.max((secondary_bw / (if_samp_rate / 2)) * secondary_demod_canvas_width, 5);
|
||||
var center_at = (secondary_demod_channel_freq / (if_samp_rate / 2)) * secondary_demod_canvas_width + secondary_demod_canvas_left;
|
||||
var width = Math.max((secondary_bw / if_samp_rate) * secondary_demod_canvas_width, 5);
|
||||
var center_at = ((secondary_demod_channel_freq - secondary_demod_low_cut) / if_samp_rate) * secondary_demod_canvas_width;
|
||||
var left = center_at - width / 2;
|
||||
$("#openwebrx-digimode-select-channel").width(width).css("left", left + "px")
|
||||
}
|
||||
@ -1677,26 +1677,17 @@ function secondary_demod_canvas_container_mouseup(evt) {
|
||||
|
||||
function secondary_demod_waterfall_set_zoom(low_cut, high_cut) {
|
||||
if (!secondary_demod_canvases_initialized) return;
|
||||
if (low_cut < 0 && high_cut < 0) {
|
||||
var hctmp = high_cut;
|
||||
var lctmp = low_cut;
|
||||
low_cut = -hctmp;
|
||||
high_cut = -lctmp;
|
||||
}
|
||||
else if (low_cut < 0 && high_cut > 0) {
|
||||
high_cut = Math.max(Math.abs(high_cut), Math.abs(low_cut));
|
||||
low_cut = 0;
|
||||
}
|
||||
secondary_demod_low_cut = low_cut;
|
||||
secondary_demod_high_cut = high_cut;
|
||||
var shown_bw = high_cut - low_cut;
|
||||
secondary_demod_canvas_width = $(secondary_demod_canvas_container).width() * (if_samp_rate / 2) / shown_bw;
|
||||
secondary_demod_canvas_left = -secondary_demod_canvas_width * (low_cut / (if_samp_rate / 2));
|
||||
//console.log("setzoom", secondary_demod_canvas_width, secondary_demod_canvas_left, low_cut, high_cut);
|
||||
secondary_demod_canvas_width = $(secondary_demod_canvas_container).width() * (if_samp_rate) / shown_bw;
|
||||
secondary_demod_canvas_left = (-secondary_demod_canvas_width / 2) - (low_cut / if_samp_rate) * secondary_demod_canvas_width;
|
||||
secondary_demod_canvases.map(function (x) {
|
||||
$(x).css("left", secondary_demod_canvas_left + "px").css("width", secondary_demod_canvas_width + "px");
|
||||
})
|
||||
;
|
||||
$(x).css({
|
||||
left: secondary_demod_canvas_left + "px",
|
||||
width: secondary_demod_canvas_width + "px"
|
||||
});
|
||||
});
|
||||
secondary_demod_update_channel_freq_from_event();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user