mirror of https://github.com/DJ2LS/FreeDATA.git
adjusted linting stuff
parent
5131ef2004
commit
f6fa30fc25
|
@ -23,14 +23,6 @@ package-lock.json
|
||||||
coverage.sh
|
coverage.sh
|
||||||
coverage.xml
|
coverage.xml
|
||||||
|
|
||||||
#ignore node_modules
|
|
||||||
/freedata_gui/node_modules/
|
|
||||||
|
|
||||||
#Ignore freedata_gui build items
|
|
||||||
/freedata_gui/dist
|
|
||||||
/freedata_gui/release
|
|
||||||
/freedata_gui/dist-electron
|
|
||||||
|
|
||||||
#Ignore GUI config
|
#Ignore GUI config
|
||||||
/freedata_gui/config/config.json
|
/freedata_gui/config/config.json
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1 @@
|
||||||
tnc/__pycache__
|
|
||||||
tnc/daemon.log
|
|
||||||
tnc/tnc.log
|
|
||||||
gui/node_modules
|
gui/node_modules
|
||||||
tnc/build
|
|
||||||
tnc/dist
|
|
||||||
|
|
|
@ -1804,4 +1804,5 @@ var binary = [
|
||||||
[1, 1, 1],
|
[1, 1, 1],
|
||||||
[0, 0, 0],
|
[0, 0, 0],
|
||||||
];
|
];
|
||||||
|
// eslint-disable-next-line
|
||||||
var colormaps = [turbo, fosphor, viridis, inferno, magma, jet, binary];
|
var colormaps = [turbo, fosphor, viridis, inferno, magma, jet, binary];
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
"use strict";
|
|
||||||
/*
|
|
||||||
function connectWebSocket(spectrum) {
|
|
||||||
// var ws = new WebSocket("ws://" + window.location.host + "/websocket");
|
|
||||||
var ws = new WebSocket("ws://192.168.178.163:3000");
|
|
||||||
|
|
||||||
|
|
||||||
ws.onopen = function(evt) {
|
|
||||||
console.log("connected!");
|
|
||||||
}
|
|
||||||
ws.onclose = function(evt) {
|
|
||||||
console.log("closed");
|
|
||||||
setTimeout(function() {
|
|
||||||
connectWebSocket(spectrum);
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
ws.onerror = function(evt) {
|
|
||||||
console.log("error: " + evt.message);
|
|
||||||
}
|
|
||||||
ws.onmessage = function (evt) {
|
|
||||||
var data = JSON.parse(evt.data);
|
|
||||||
if (data.s) {
|
|
||||||
spectrum.addData(data.s);
|
|
||||||
} else {
|
|
||||||
if (data.center) {
|
|
||||||
spectrum.setCenterHz(data.center);
|
|
||||||
}
|
|
||||||
if (data.span) {
|
|
||||||
spectrum.setSpanHz(data.span);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
function main() {
|
|
||||||
// Create spectrum object on canvas with ID "waterfall"
|
|
||||||
var spectrum = new Spectrum("waterfall", {
|
|
||||||
spectrumPercent: 20,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Connect to websocket
|
|
||||||
//connectWebSocket(spectrum);
|
|
||||||
|
|
||||||
//spectrum.setCenterHz("2000");
|
|
||||||
//spectrum.setSpanHz("1");
|
|
||||||
|
|
||||||
/*
|
|
||||||
for (var i = 0; i < 1000; i++) {
|
|
||||||
var randomstring = Math.floor(Math.random())
|
|
||||||
spectrum.addData(randomstring.toString());
|
|
||||||
// more statements
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Bind keypress handler
|
|
||||||
window.addEventListener("keydown", function (e) {
|
|
||||||
spectrum.onKeypress(e);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = main;
|
|
|
@ -1,27 +0,0 @@
|
||||||
<script setup>
|
|
||||||
// Import necessary modules and store
|
|
||||||
import { setActivePinia } from 'pinia';
|
|
||||||
import pinia from '../store/index';
|
|
||||||
import { useStateStore } from '../store/stateStore.js';
|
|
||||||
import { settingsStore as settings } from '../store/settingsStore.js';
|
|
||||||
|
|
||||||
// Initialize Pinia and state store
|
|
||||||
setActivePinia(pinia);
|
|
||||||
const state = useStateStore(pinia);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<nav class="navbar bg-body-tertiary border-bottom z-0">
|
|
||||||
<div class="mx-auto">
|
|
||||||
<span class="badge bg-secondary me-4">
|
|
||||||
Modem Connection {{ state.modem_connection }}
|
|
||||||
</span>
|
|
||||||
<span class="badge bg-secondary me-4">
|
|
||||||
Modem {{ state.is_modem_running }}
|
|
||||||
</span>
|
|
||||||
<span class="badge bg-secondary me-4">
|
|
||||||
RIG Control {{ state.rigctld_started }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
</template>
|
|
|
@ -1,18 +1,14 @@
|
||||||
import path from "node:path";
|
//import { setColormap } from "./waterfallHandler";
|
||||||
import fs from "fs";
|
|
||||||
import { setColormap } from "./waterfallHandler";
|
|
||||||
// pinia store setup
|
// pinia store setup
|
||||||
import { setActivePinia } from "pinia";
|
import { setActivePinia } from "pinia";
|
||||||
import pinia from "../store/index";
|
import pinia from "../store/index";
|
||||||
setActivePinia(pinia);
|
setActivePinia(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings, onChange } from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
|
|
||||||
import { useStateStore } from "../store/stateStore";
|
|
||||||
const stateStore = useStateStore(pinia);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
// create config file if not exists with defaults
|
// create config file if not exists with defaults
|
||||||
const configDefaultSettings = `{
|
const configDefaultSettings = `{
|
||||||
"screen_height": 670,
|
"screen_height": 670,
|
||||||
|
@ -28,7 +24,7 @@ var parsedConfig = JSON.parse(configDefaultSettings);
|
||||||
|
|
||||||
export function loadSettings() {
|
export function loadSettings() {
|
||||||
// load settings
|
// load settings
|
||||||
var config = require(configPath);
|
var config = JSON.parse(localStorage.getItem("localConfig")) || defaultConfig.local;
|
||||||
|
|
||||||
//config validation
|
//config validation
|
||||||
// check running config against default config.
|
// check running config against default config.
|
||||||
|
@ -58,7 +54,7 @@ export function loadSettings() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
//No longer used...
|
//No longer used...
|
||||||
//export function saveSettingsToFile() {
|
//export function saveSettingsToFile() {
|
||||||
// console.log("save settings to file...");
|
// console.log("save settings to file...");
|
||||||
|
@ -74,9 +70,9 @@ export function processModemConfig(data) {
|
||||||
|
|
||||||
console.log(data);
|
console.log(data);
|
||||||
for (const category in data) {
|
for (const category in data) {
|
||||||
if (data.hasOwnProperty(category)) {
|
if (Object.prototype.hasOwnProperty.call(data, category)) {
|
||||||
for (const setting in data[category]) {
|
for (const setting in data[category]) {
|
||||||
if (data[category].hasOwnProperty(setting)) {
|
if (Object.prototype.hasOwnProperty.call(data[category], setting)) {
|
||||||
// Create a variable name combining the category and setting name
|
// Create a variable name combining the category and setting name
|
||||||
const variableName = setting;
|
const variableName = setting;
|
||||||
// Assign the value to the variable
|
// Assign the value to the variable
|
||||||
|
|
|
@ -441,7 +441,7 @@ def main():
|
||||||
modemaddress = conf['NETWORK'].get('modemaddress', '127.0.0.1')
|
modemaddress = conf['NETWORK'].get('modemaddress', '127.0.0.1')
|
||||||
modemport = int(conf['NETWORK'].get('modemport', 5000))
|
modemport = int(conf['NETWORK'].get('modemport', 5000))
|
||||||
|
|
||||||
if os.path.isdir(gui_dir):
|
if gui_dir and os.path.isdir(gui_dir):
|
||||||
logger.info("---------------------------------------------------")
|
logger.info("---------------------------------------------------")
|
||||||
logger.info(" ")
|
logger.info(" ")
|
||||||
logger.info(f"[GUI] AVAILABLE ON http://{modemaddress}:{modemport}/gui")
|
logger.info(f"[GUI] AVAILABLE ON http://{modemaddress}:{modemport}/gui")
|
||||||
|
|
Loading…
Reference in New Issue