Skip to content

Commit

Permalink
Reduce vertical size of scan plot
Browse files Browse the repository at this point in the history
  • Loading branch information
argilo committed Dec 8, 2024
1 parent fb8c7c2 commit 65d895f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
5 changes: 5 additions & 0 deletions auto_rx/autorx/static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@ input:checked + .slider:before {
color:inherit;
}

#telem_table {
margin-top: 0.25em;
margin-bottom: 0.25em;
}

/* Modal Header */
.modal-header {
padding: 2px 16px;
Expand Down
15 changes: 15 additions & 0 deletions auto_rx/autorx/static/js/scan_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ function setup_scan_chart(){
['x_spectra',autorx_config.min_freq, autorx_config.max_freq],
['Spectra',0,0]
],
colors: {
Spectra: "#2f77b4"
},
type:'line'
};

Expand All @@ -27,6 +30,9 @@ function setup_scan_chart(){
['x_peaks',0],
['Peaks',0]
],
colors: {
Peaks: "#ff7f0e"
},
type:'scatter'
};

Expand All @@ -38,6 +44,9 @@ function setup_scan_chart(){
['x_thresh',autorx_config.min_freq, autorx_config.max_freq],
['Threshold',autorx_config.snr_threshold,autorx_config.snr_threshold]
],
colors: {
Threshold: "#2ca02c"
},
type:'line'
};

Expand Down Expand Up @@ -70,6 +79,12 @@ function setup_scan_chart(){
label:"Power (dB - Uncalibrated)"
}
},
size: {
height: 200
},
legend: {
show: false
},
point:{r:10}
});
}
Expand Down
11 changes: 5 additions & 6 deletions auto_rx/autorx/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@
document.getElementById("main").style.marginLeft = "350px";
document.getElementById("mySidenav").style.borderRadius = "0px 25px 25px 0px";
mymap.invalidateSize();
setTimeout(scan_chart_obj.resize,500);
scan_chart_obj.flush();
} else { // Fullsize on mobile.
x.style.display = "block";
y.style.display = "none";
Expand All @@ -1288,7 +1288,7 @@
document.getElementById("mySidenav").style.width = 0;
document.getElementById("main").style.marginLeft = 0;
mymap.invalidateSize();
setTimeout(scan_chart_obj.resize,500);
scan_chart_obj.flush();
}
}

Expand All @@ -1304,7 +1304,7 @@
document.getElementById("main").style.marginRight = "350px";
document.getElementById("mySettings").style.borderRadius = "25px 0px 0px 25px";
mymap.invalidateSize();
setTimeout(scan_chart_obj.resize,500);
scan_chart_obj.flush();
setTimeout(showDown,500);
} else { // Fullsize on mobile.
y.style.display = "none";
Expand All @@ -1319,7 +1319,7 @@
document.getElementById("mySettings").style.width = 0;
document.getElementById("main").style.marginRight = 0;
mymap.invalidateSize();
setTimeout(scan_chart_obj.resize,500);
scan_chart_obj.flush();
setTimeout(showDown,500);
}
}
Expand Down Expand Up @@ -1355,7 +1355,7 @@
setCookie("scan", 'true', 365);
mymap.invalidateSize();
redraw_scan_chart();
setTimeout(scan_chart_obj.resize,500);
scan_chart_obj.flush();
}
}

Expand Down Expand Up @@ -1642,7 +1642,6 @@ <h2 style="display:inline;vertical-align:middle;">Historical View</h2>
<div id="telem_table"></div>
</div>
<div id="scanid">
<h2>Scan Results</h2>
<div id='scan_results'>No scan data yet...</div>
<div id="scan_chart" style="width:100%;"></div>
</div>
Expand Down

0 comments on commit 65d895f

Please sign in to comment.