Skip to content

Commit

Permalink
remove keyboard shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-Arc committed Jan 15, 2019
1 parent 7cd81f8 commit 87bfd63
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,36 +59,6 @@ server.on('message', (msg, rinfo) => {

document.addEventListener('keyup',
function (e) {
if (e.key === 'e') {
let hexFile
dialog.showOpenDialog(
{ filters: [ { name: 'Firmware', extensions: ['hex'] } ] },
function (fileNames) {
// fileNames is an array that contains all the selected
if (fileNames === undefined) {
console.log('No file selected')
} else {
hexFile = fs.readFileSync(fileNames[0], 'utf8')
firmwarePieces = hexFile.split('\n')
let message = Buffer.from([0x41, 0x72, 0x74, 0x2d, 0x4e, 0x65, 0x74, 0x00, 0x00, 0xf2])
dialog.showMessageBox(
{ type: 'warning',
buttons: ['OK', 'Cancel'],
message: 'Do not turn off the node, this program og the network connection' },
function (response) {
console.log(response)
if (response === 0) {
server.send(message, 6454, '2.8.82.67', (err) => {
console.error(err)
})
node[0].version = '0 of ' + String(firmwarePieces.length)
drawTable()
}
}
)
}
})
}
if (e.key === 'u') {
let hexFile
dialog.showOpenDialog(
Expand Down

0 comments on commit 87bfd63

Please sign in to comment.