speed chart adjustment

This commit is contained in:
DJ2LS 2023-02-15 14:19:35 +01:00
parent 4f9cfbcf27
commit 8978f218fd
2 changed files with 7 additions and 6 deletions

View file

@ -1694,9 +1694,9 @@ ipcRenderer.on("action-update-tnc-state", (event, arg) => {
var speedDataSnr = [];
for (var i = 0; i < speed_listSize; i++) {
let snr = NaN;
if (arg.speed_list[i].snr !== 0) {
snr = arg.speed_list[i].snr;
}
if(arg.speed_list[i].snr !== 0){
snr = arg.speed_list[i].snr;
}
speedDataSnr.push(arg.speed_list[i].snr);
}
@ -1718,6 +1718,7 @@ ipcRenderer.on("action-update-tnc-state", (event, arg) => {
label: "SNR[dB]",
data: speedDataSnr,
borderColor: "rgb(75, 192, 192, 1.0)",
pointRadius: 1,
segment: {
borderColor: (ctx) =>
skipped(ctx, "rgb(0,0,0,0.2)") || down(ctx, "rgb(192,75,75)"),
@ -1748,12 +1749,12 @@ ipcRenderer.on("action-update-tnc-state", (event, arg) => {
scales: {
SNR: {
type: "linear",
ticks: { beginAtZero: true, color: "rgb(255, 99, 132)" },
ticks: { beginAtZero: false, color: "rgb(255, 99, 132)" },
position: "right",
},
SPEED: {
type: "linear",
ticks: { beginAtZero: true, color: "rgb(120, 100, 120)" },
ticks: { beginAtZero: false, color: "rgb(120, 100, 120)" },
position: "left",
grid: {
drawOnChartArea: false, // only want the grid lines for one axis to show up

View file

@ -385,7 +385,7 @@ if __name__ == "__main__":
log.error("[DMN] logger init error", exception=err)
log.info(
"[TNC] Starting FreeDATA", author="DJ2LS", year="2022", version=static.VERSION
"[TNC] Starting FreeDATA", author="DJ2LS", version=static.VERSION
)
# start data handler