mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
reduced time for call and grid init
This commit is contained in:
parent
d11932cb36
commit
65c52ce9b0
2 changed files with 9 additions and 10 deletions
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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]);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue