diff --git a/js/graph_spectrum.js b/js/graph_spectrum.js index 5e7b35e..588f61e 100644 --- a/js/graph_spectrum.js +++ b/js/graph_spectrum.js @@ -52,9 +52,6 @@ function FlightLogAnalyser(flightLog, canvas, analyserCanvas) { var analyserZoomXElem = $("#analyserZoomX"); var analyserZoomYElem = $("#analyserZoomY"); - console.log("sysConfig['looptime']:" + sysConfig['looptime']); - console.log("sysConfig['frameIntervalPNum']:" + sysConfig['frameIntervalPNum']); - console.log("sysConfig['frameIntervalPDenom']:" + sysConfig['frameIntervalPDenom']); var blackBoxRate = (1000000 / sysConfig['looptime']).toFixed(0) * (sysConfig['frameIntervalPNum'] / sysConfig['frameIntervalPDenom']); var dataBuffer = { @@ -192,8 +189,6 @@ function FlightLogAnalyser(flightLog, canvas, analyserCanvas) { var PLOTTED_BUFFER_LENGTH = fftData.fftLength / (analyserZoomX); var PLOTTED_BLACKBOX_RATE = blackBoxRate / (analyserZoomX); - console.log("blackBoxRate:" + blackBoxRate); - console.log("analyserZoomX:" + analyserZoomX); canvasCtx.translate(LEFT, TOP); @@ -228,7 +223,6 @@ function FlightLogAnalyser(flightLog, canvas, analyserCanvas) { } drawAxisLabel(dataBuffer.fieldName, WIDTH - 4, HEIGHT - 6, 'right'); - console.log("PLOTTED_BLACKBO_RATE:" + PLOTTED_BLACKBOX_RATE); drawGridLines(PLOTTED_BLACKBOX_RATE, LEFT, TOP, WIDTH, HEIGHT, MARGIN); var offset = 0; @@ -322,7 +316,6 @@ function FlightLogAnalyser(flightLog, canvas, analyserCanvas) { canvasCtx.lineTo(x, HEIGHT); canvasCtx.stroke(); - console.log("Freq: " + frequency); if (label != null && isFinite(frequency) && !isNaN(frequency)) drawAxisLabel(label + ' ' + (frequency.toFixed(0)) + "Hz", (x + 2), OFFSET, 'left'); }; @@ -330,11 +323,8 @@ function FlightLogAnalyser(flightLog, canvas, analyserCanvas) { var drawGridLines = function (sampleRate, LEFT, TOP, WIDTH, HEIGHT, MARGIN) { var ticks = 5; - console.log("sampleRate: " + sampleRate); - console.log("ticks: " + ticks); var frequencyInterval = (sampleRate / ticks) / 2; var frequency = 0; - console.log("frequencyInterval: " + frequencyInterval); for (var i = 0; i <= ticks; i++) { canvasCtx.beginPath(); @@ -346,7 +336,7 @@ function FlightLogAnalyser(flightLog, canvas, analyserCanvas) { canvasCtx.stroke(); var textAlign = (i == 0) ? 'left' : ((i == ticks) ? 'right' : 'center'); - console.log("freq: " + frequency); + if(isFinite(frequency)) { drawAxisLabel((frequency.toFixed(0)) + "Hz", i * (WIDTH / ticks), HEIGHT + MARGIN, textAlign); } @@ -435,4 +425,4 @@ function FlightLogAnalyser(flightLog, canvas, analyserCanvas) { } } -} \ No newline at end of file +}