updated settings

This commit is contained in:
DJ2LS 2023-11-11 20:38:13 +01:00
parent 498a5c2e3c
commit 78b545dff0
4 changed files with 29 additions and 96 deletions

View file

@ -116,7 +116,6 @@ export function processModemConfig(data) {
// For now its a hardcoded structure until we found a better way
console.log(data);
// chatGPT function for iterating through all items and asserting them to a function
for (const category in data) {
if (data.hasOwnProperty(category)) {
for (const setting in data[category]) {
@ -142,55 +141,6 @@ export function processModemConfig(data) {
}
}
}
/*
// STATION SETTINGS
// Extract the callsign and SSID
if (data.STATION.mycall.includes("-")) {
const splittedCallsign = data.STATION.mycall.split("-");
settings.mycall = splittedCallsign[0]; // The part before the hyphen
settings.myssid = parseInt(splittedCallsign[1], 10); // The part after the hyphen, converted to a number
} else {
settings.mycall = data.STATION.mycall; // Use the original mycall if no SSID is present
settings.myssid = 0; // Default SSID if not provided
}
settings.mygrid = data.STATION.mygrid;
// ssid list not yet implemented
//data.STATION.ssid_list[0];
// AUDIO SETTINGS
settings.auto_tune = data.AUDIO.auto_tune;
settings.rx_audio_level = data.AUDIO.rxaudiolevel;
settings.tx_audio_level = data.AUDIO.txaudiolevel;
settings.rx_audio = data.AUDIO.rx;
settings.tx_audio = data.AUDIO.tx;
// MODEM SETTINGS
settings.enable_fft = data.Modem.fft;
settings.enable_fsk = data.Modem.fsk;
settings.tuning_range_fmin = data.Modem.fmin;
settings.tuning_range_fmax = data.Modem.fmax;
settings.rx_buffer_size = data.Modem.rx_buffer_size;
settings.enable_explorer = data.Modem.explorer;
settings.explorer_stats = data.Modem.stats;
settings.tx_delay = data.Modem.tx_delay;
settings.respond_to_cq = data.Modem.qrv;
settings.low_bandwidth_mode = data.Modem.narrowband;
// HAMLIB SETTINGS
settings.hamlib_rigctld_port = data.RADIO.rigctld_port;
settings.hamlib_rigctld_ip = data.RADIO.rigctld_ip;
settings.radiocontrol = data.RADIO.radiocontrol;
// TCI SETTINGS
settings.tci_ip = data.TCI.ip;
settings.tci_port = data.TCI.port;
// MESH SETTINGS
settings.enable_mesh_features = data.MESH.enable_protocol;
*/
}
export function processModemAudioDevices(data) {
@ -212,9 +162,9 @@ export function getModemConfigAsJSON() {
AUDIO: {
enable_auto_tune: settings.auto_tune,
input_device: settings.rx_audio,
rxaudiolevel: settings.rx_audio_level,
rx_audio_level: settings.rx_audio_level,
output_device: settings.tx_audio,
txaudiolevel: settings.tx_audio_level,
tx_audio_level: settings.tx_audio_level,
//enable_auto_tune: settings.tx_audio_level,
},
MESH: {

View file

@ -3,8 +3,8 @@ import { ref } from "vue";
export const useSettingsStore = defineStore("settingsStore", () => {
// audio
var tx_audio = ref();
var rx_audio = ref();
var output_device = ref();
var input_device = ref();
var tx_audio_level = ref();
var rx_audio_level = ref();
@ -224,8 +224,8 @@ export const useSettingsStore = defineStore("settingsStore", () => {
tx_delay,
enable_mesh_features,
getJSON,
tx_audio,
rx_audio,
output_device,
input_device,
getSerialDevices,
serial_devices,
tx_audio_level,

View file

@ -1,60 +1,43 @@
[NETWORK]
#network settings
modemport = 3000
[STATION]
#station settings
mycall = DJ2LS
mygrid = JN20aa
ssid_list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
mycall = DJ2LS-9
mygrid = JN49em
ssid_list = []
[AUDIO]
#audio settings
rx = 0
tx = 0
rxaudiolevel = 0
txaudiolevel = 0
auto_tune = False
input_device = c07e
output_device = c07e
rx_audio_level = 0
tx_audio_level = 0
enable_auto_tune = False
[RADIO]
#radio settings
radiocontrol = disabled
rigctld_ip = 127.0.0.1
rigctld_port = 4532
[TNC]
scatter = False
fft = True
narrowband = False
fmin = -50
fmax = 50
qrv = True
rx_buffer_size = 16
explorer = False
stats = False
fsk = False
tx_delay = 0
radioport = None
[TCI]
#tci settings
tci_ip = 127.0.0.1
tci_port = 50001
ip = 127.0.0.1
port = 50001
[MESH]
#tci settings
enable_protocol = True
enable_protocol = False
[Modem]
#modem settings
scatter = False
fft = True
narrowband = False
fmin = -50
fmax = 50
qrv = True
enable_explorer = False
enable_fft = True
tuning_range_fmax = 50
tuning_range_fmin = -50
enable_fsk = False
enable_low_bandwidth_mode = False
respond_to_cq = True
rx_buffer_size = 16
explorer = False
stats = False
fsk = False
enable_scatter = False
enable_stats = False
tx_delay = 0

View file

@ -74,8 +74,8 @@ class RF:
self.audio_input_device = config['AUDIO']['input_device']
self.audio_output_device = config['AUDIO']['output_device']
self.rx_audio_level = config['AUDIO']['rxaudiolevel']
self.tx_audio_level = config['AUDIO']['txaudiolevel']
self.rx_audio_level = config['AUDIO']['rx_audio_level']
self.tx_audio_level = config['AUDIO']['tx_audio_level']
self.enable_audio_auto_tune = config['AUDIO']['enable_auto_tune']
self.enable_fft = config['Modem']['enable_fft']
self.tx_delay = config['Modem']['tx_delay']