midi: display an error when the midi bridge process crashes and prevent further errors when attempting to send messages

This commit is contained in:
bordun 2021-02-05 18:34:19 +01:00
parent 524b6e74ec
commit 8ddee033eb
2 changed files with 12 additions and 1 deletions

View file

@ -2,8 +2,11 @@
## 1.8.4
- midi
- display an error when the midi bridge process crashes and prevent further errors when attempting to send messages
- ui
- hide the console toggle button when the bottom panel is minimized and the editor is disabled
- hide the console toggle button when the bottom panel is minimized and the editor is disabled
- widgets
- file: add `mode` property, for choosing between `open` and `save` modes

View file

@ -43,10 +43,18 @@ class MidiConverter {
}
})
this.running = true
this.py.childProcess.on('exit', (code)=>{
if (code === null) console.error(`(ERROR, MIDI) Midi bridge process crashed`)
this.running = false
})
}
send(data) {
if (!this.running) return
var args = []
for (let i in data.args) {
args.push(data.args[i].value)