1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 16:55:24 +03:00

Have the command sticks disappear when disconnecting or switch to CLI

This commit is contained in:
Nicholas Sherlock 2015-09-25 00:12:06 +12:00
parent ef0c637877
commit b7921de528
2 changed files with 14 additions and 4 deletions

View file

@ -53,7 +53,10 @@ function transmitChannels() {
}
// Callback given to us by the window creator so we can have it send data over MSP for us:
window.setRawRx(channelValues);
if (!window.setRawRx(channelValues)) {
// MSP connection has gone away
chrome.app.window.current().close();
}
}
function stickPortionToChannelValue(portion) {
@ -178,5 +181,5 @@ $(document).ready(function() {
updateControlPositions();
setInterval(transmitChannels, 100);
setInterval(transmitChannels, 50);
});