From 65c52ce9b0df211b137428025e5f8d323e2c5a3c Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Wed, 8 Sep 2021 18:22:41 +0200 Subject: [PATCH] reduced time for call and grid init --- gui/main.js | 9 ++++----- gui/preload-main.js | 10 +++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/gui/main.js b/gui/main.js index bbd01626..71f32b58 100644 --- a/gui/main.js +++ b/gui/main.js @@ -48,14 +48,13 @@ var daemonProcess = null; function createWindow() { win = new BrowserWindow({ width: 1220, - height: 830, + height: 920, autoHideMenuBar: true, icon: __dirname + '/src/app-icon.png', webPreferences: { //preload: path.join(__dirname, 'preload-main.js'), preload: require.resolve('./preload-main.js'), nodeIntegration: true, - nativeWindowOpen: true, contextIsolation: false, enableRemoteModule: false, //https://stackoverflow.com/questions/53390798/opening-new-window-electron/53393655 https://github.com/electron/remote } @@ -64,8 +63,7 @@ function createWindow() { win.setMenuBarVisibility(false) //open dev tools - /* - win.webContents.openDevTools({ + /*win.webContents.openDevTools({ mode: 'undocked', activate: true, }) @@ -87,6 +85,7 @@ function createWindow() { mode: 'undocked', activate: true, }) + data.loadFile('src/data-module.html') data.hide() */ @@ -181,4 +180,4 @@ ipcMain.on('run-tnc-command', (event, arg) => { ipcMain.on('request-update-rx-buffer', (event, arg) => { win.webContents.send('action-update-rx-buffer', arg); -}); \ No newline at end of file +}); diff --git a/gui/preload-main.js b/gui/preload-main.js index 9725012b..33d4f828 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -223,10 +223,10 @@ window.addEventListener('DOMContentLoaded', () => { daemon.startTNC(rx_audio, tx_audio, deviceid, deviceport, ptt, serialspeed) setTimeout(function() { sock.saveMyCall(config.mycall); - }, 5000); + }, 3000); setTimeout(function() { sock.saveMyGrid(config.mygrid); - }, 6000); + }, 4000); }) // stopTNC button clicked @@ -293,10 +293,10 @@ ipcRenderer.on('action-update-tnc-state', (event, arg) => { // update FFT if (typeof(arg.fft) !== 'undefined') { //console.log(arg.fft) - console.log(typeof(arg.fft)) + //console.log(typeof(arg.fft)) var array = JSON.parse("[" + arg.fft + "]"); - console.log(typeof(array)) - console.log(array[0]) + //console.log(typeof(array)) + //console.log(array[0]) spectrum.addData(array[0]); }