diff --git a/htdocs/index.wrx b/htdocs/index.wrx index be0d43c..4a74896 100644 --- a/htdocs/index.wrx +++ b/htdocs/index.wrx @@ -108,6 +108,7 @@
+
0 dB
diff --git a/htdocs/openwebrx.css b/htdocs/openwebrx.css index 1575e8d..66eea89 100644 --- a/htdocs/openwebrx.css +++ b/htdocs/openwebrx.css @@ -532,7 +532,7 @@ input[type=range]:focus::-ms-fill-upper .openwebrx-button { background-color: #373737; - padding: 5px; + padding: 4.2px; border-radius: 5px; -moz-border-radius: 5px; color: White; diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js index f642737..13171fc 100644 --- a/htdocs/openwebrx.js +++ b/htdocs/openwebrx.js @@ -1782,6 +1782,30 @@ function waterfall_init() var waterfall_dont_scale=0; +var mathbox_shift = function() +{ + if(mathbox_data_current_depth < mathbox_data_max_depth) mathbox_data_current_depth++; + if(mathbox_data_index+1>=mathbox_data_max_depth) mathbox_data_index = 0; + else mathbox_data_index++; +} + +var mathbox_clear_data = function() +{ + mathbox_data_index = 50; + mathbox_data_current_depth = 0; +} + +var mathbox_get_data_line = function(x) //x counts from 0 to mathbox_data_current_depth +{ + return (mathbox_data_max_depth + mathbox_data_index - mathbox_data_current_depth + x - 1) % mathbox_data_max_depth; +} + +var mathbox_data_index_valid = function(x) //x counts from 0 to mathbox_data_current_depth +{ + return x>>0)>>((3-i)*8))&0xff; } - //Draw image canvas_context.putImageData(oneline_image, 0, canvas_actual_line--); shift_canvases(); if(canvas_actual_line<0) add_canvas(); - //divlog("Drawn FFT"); + //Handle mathbox + if(mathbox_mode==MATHBOX_MODES.WATERFALL) + { + for(var i=0;i=(mathbox_data_max_depth-1)) console.log("realZIndexundef", realZIndex, zIndex); + var index = Math.trunc(xIndex + realZIndex * fft_size); + if(mathbox_data[index]==undefined) console.log("Undef", index, mathbox_data.length, zIndex, + realZIndex, mathbox_data_max_depth, + mathbox_data_current_depth, mathbox_data_index); + var dBValue = mathbox_data[index]; + if(dBValue>waterfall_max_level) y = 1; + else if(dBValue