Merge pull request #688 from mikeller/fix_reboot

Fixed 'Save & Reboot'.
10.3.x-maintenance
Michael Keller 2017-10-15 11:22:09 +13:00 committed by GitHub
commit 97f1df6181
2 changed files with 9 additions and 7 deletions

View File

@ -118,6 +118,8 @@ var serial = {
break;
case 'device_lost':
CONFIG.arming_disabled = false;
if (GUI.connected_to || GUI.connecting_to) {
$('a.connect').click();
} else {

View File

@ -61,22 +61,22 @@ $(document).ready(function () {
GUI.tab_switch_cleanup();
GUI.tab_switch_in_progress = false;
if (semver.gte(CONFIG.apiVersion, "1.37.0")) {
if (semver.gte(CONFIG.apiVersion, "1.37.0") && CONFIG.arming_disabled) {
CONFIG.arming_disabled = false;
MSP.send_message(MSPCodes.MSP_ARMING_DISABLE, false, false, function () {
GUI.log(chrome.i18n.getMessage('armingEnabled'));
finishClose(clicks);
finishClose();
});
} else {
finishClose(clicks);
finishClose();
}
}
$(this).data("clicks", !clicks);
$(this).data("clicks", !clicks);
}
}
}
});
// auto-connect
@ -122,7 +122,7 @@ $(document).ready(function () {
PortUsage.initialize();
});
function finishClose(clicks) {
function finishClose() {
var wasConnected = CONFIGURATOR.connectionValid;
serial.disconnect(onClosed);