@@ -77,7 +77,7 @@ var waterfall_min_level;
7777var waterfall_max_level ;
7878var waterfall_min_level_default ;
7979var waterfall_max_level_default ;
80- var waterfall_colors = buildWaterfallColors ( [ '#000' , '#FFF' ] )
80+ var waterfall_colors = buildWaterfallColors ( [ '#000' , '#FFF' ] ) ;
8181var waterfall_auto_level_margin ;
8282
8383function buildWaterfallColors ( input ) {
@@ -177,10 +177,6 @@ function getLogSmeterValue(value) {
177177 return 10 * Math . log10 ( value ) ;
178178}
179179
180- function getLinearSmeterValue ( db_value ) {
181- return Math . pow ( 10 , db_value / 10 ) ;
182- }
183-
184180function setSmeterAbsoluteValue ( value ) //the value that comes from `csdr squelch_and_smeter_cc`
185181{
186182 var logValue = getLogSmeterValue ( value ) ;
@@ -214,7 +210,7 @@ function getDemodulators() {
214210 ] . filter ( function ( d ) {
215211 return ! ! d ;
216212 } ) ;
217- } ;
213+ }
218214
219215function mkenvelopes ( visible_range ) //called from mkscale
220216{
@@ -224,7 +220,7 @@ function mkenvelopes(visible_range) //called from mkscale
224220 demodulators [ i ] . envelope . draw ( visible_range ) ;
225221 }
226222 if ( demodulators . length ) {
227- var bandpass = demodulators [ 0 ] . getBandpass ( )
223+ var bandpass = demodulators [ 0 ] . getBandpass ( ) ;
228224 secondary_demod_waterfall_set_zoom ( bandpass . low_cut , bandpass . high_cut ) ;
229225 }
230226}
@@ -1215,10 +1211,10 @@ function waterfall_mkcolor(db_value, waterfall_colors_arg) {
12151211 var value_percent = ( db_value - waterfall_min_level ) / ( waterfall_max_level - waterfall_min_level ) ;
12161212 value_percent = Math . max ( 0 , Math . min ( 1 , value_percent ) ) ;
12171213
1218- var scaled = value_percent * ( waterfall_colors . length - 1 ) ;
1214+ var scaled = value_percent * ( waterfall_colors_arg . length - 1 ) ;
12191215 var index = Math . floor ( scaled ) ;
12201216 var remain = scaled - index ;
1221- if ( remain == 0 ) return waterfall_colors_arg [ index ] ;
1217+ if ( remain === 0 ) return waterfall_colors_arg [ index ] ;
12221218 return color_between ( waterfall_colors_arg [ index ] , waterfall_colors_arg [ index + 1 ] , remain ) ; }
12231219
12241220function color_between ( first , second , percent ) {
@@ -1400,7 +1396,7 @@ function initSliders() {
14001396 } ) ;
14011397
14021398 var waterfallAutoButton = $ ( '#openwebrx-waterfall-colors-auto' ) ;
1403- waterfallAutoButton . on ( 'click' , function ( ev ) {
1399+ waterfallAutoButton . on ( 'click' , function ( ) {
14041400 waterfall_measure_minmax_now = true ;
14051401 } ) . on ( 'contextmenu' , function ( ) {
14061402 waterfall_measure_minmax_continuous = ! waterfall_measure_minmax_continuous ;
@@ -1529,7 +1525,6 @@ function initPanels() {
15291525
15301526var secondary_demod_fft_offset_db = 18 ; //need to calculate that later
15311527var secondary_demod_canvases_initialized = false ;
1532- var secondary_demod_listbox_updating = false ;
15331528var secondary_demod_channel_freq = 1000 ;
15341529var secondary_demod_waiting_for_set = false ;
15351530var secondary_demod_low_cut ;
0 commit comments