mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-18 22:05:13 +03:00
Added setting of RTC when connecting.
This commit is contained in:
parent
154b8cade2
commit
c93f2f13e4
3 changed files with 28 additions and 2 deletions
|
@ -228,10 +228,10 @@ function onOpen(openInfo) {
|
|||
GUI.log(i18n.getMessage('craftNameReceived', [CONFIG.name]));
|
||||
|
||||
CONFIG.armingDisabled = false;
|
||||
mspHelper.setArmingEnabled(false, false, finishOpen);
|
||||
mspHelper.setArmingEnabled(false, false, setRtc);
|
||||
});
|
||||
} else {
|
||||
finishOpen();
|
||||
setRtc();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -280,6 +280,14 @@ function onOpen(openInfo) {
|
|||
}
|
||||
}
|
||||
|
||||
function setRtc() {
|
||||
if (semver.gte(CONFIG.apiVersion, "1.37.0")) {
|
||||
MSP.send_message(MSPCodes.MSP_SET_RTC, mspHelper.crunch(MSPCodes.MSP_SET_RTC), false, finishOpen);
|
||||
} else {
|
||||
finishOpen();
|
||||
}
|
||||
}
|
||||
|
||||
function finishOpen() {
|
||||
CONFIGURATOR.connectionValid = true;
|
||||
GUI.allowedTabs = GUI.defaultAllowedFCTabsWhenConnected.slice();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue