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() {
|
function createWindow() {
|
||||||
win = new BrowserWindow({
|
win = new BrowserWindow({
|
||||||
width: 1220,
|
width: 1220,
|
||||||
height: 830,
|
height: 920,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
icon: __dirname + '/src/app-icon.png',
|
icon: __dirname + '/src/app-icon.png',
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
//preload: path.join(__dirname, 'preload-main.js'),
|
//preload: path.join(__dirname, 'preload-main.js'),
|
||||||
preload: require.resolve('./preload-main.js'),
|
preload: require.resolve('./preload-main.js'),
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
nativeWindowOpen: true,
|
|
||||||
contextIsolation: false,
|
contextIsolation: false,
|
||||||
enableRemoteModule: false, //https://stackoverflow.com/questions/53390798/opening-new-window-electron/53393655 https://github.com/electron/remote
|
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)
|
win.setMenuBarVisibility(false)
|
||||||
|
|
||||||
//open dev tools
|
//open dev tools
|
||||||
/*
|
/*win.webContents.openDevTools({
|
||||||
win.webContents.openDevTools({
|
|
||||||
mode: 'undocked',
|
mode: 'undocked',
|
||||||
activate: true,
|
activate: true,
|
||||||
})
|
})
|
||||||
|
@ -87,6 +85,7 @@ function createWindow() {
|
||||||
mode: 'undocked',
|
mode: 'undocked',
|
||||||
activate: true,
|
activate: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
data.loadFile('src/data-module.html')
|
data.loadFile('src/data-module.html')
|
||||||
data.hide()
|
data.hide()
|
||||||
*/
|
*/
|
||||||
|
@ -181,4 +180,4 @@ ipcMain.on('run-tnc-command', (event, arg) => {
|
||||||
|
|
||||||
ipcMain.on('request-update-rx-buffer', (event, arg) => {
|
ipcMain.on('request-update-rx-buffer', (event, arg) => {
|
||||||
win.webContents.send('action-update-rx-buffer', 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)
|
daemon.startTNC(rx_audio, tx_audio, deviceid, deviceport, ptt, serialspeed)
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
sock.saveMyCall(config.mycall);
|
sock.saveMyCall(config.mycall);
|
||||||
}, 5000);
|
}, 3000);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
sock.saveMyGrid(config.mygrid);
|
sock.saveMyGrid(config.mygrid);
|
||||||
}, 6000);
|
}, 4000);
|
||||||
})
|
})
|
||||||
|
|
||||||
// stopTNC button clicked
|
// stopTNC button clicked
|
||||||
|
@ -293,10 +293,10 @@ ipcRenderer.on('action-update-tnc-state', (event, arg) => {
|
||||||
// update FFT
|
// update FFT
|
||||||
if (typeof(arg.fft) !== 'undefined') {
|
if (typeof(arg.fft) !== 'undefined') {
|
||||||
//console.log(arg.fft)
|
//console.log(arg.fft)
|
||||||
console.log(typeof(arg.fft))
|
//console.log(typeof(arg.fft))
|
||||||
var array = JSON.parse("[" + arg.fft + "]");
|
var array = JSON.parse("[" + arg.fft + "]");
|
||||||
console.log(typeof(array))
|
//console.log(typeof(array))
|
||||||
console.log(array[0])
|
//console.log(array[0])
|
||||||
spectrum.addData(array[0]);
|
spectrum.addData(array[0]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue