1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 03:19:54 +03:00

When LTM stream is detected, the app will automatically switch to groundstation mode.

This commit is contained in:
Pawel Spychalski (DzikuVx) 2024-03-07 20:51:15 +01:00
parent 5e4e9294f8
commit c7b924e67b
6 changed files with 78 additions and 1 deletions

View file

@ -326,7 +326,9 @@ function onOpen(openInfo) {
// disconnect after 10 seconds with error if we don't get IDENT data
helper.timeout.add('connecting', function () {
if (!CONFIGURATOR.connectionValid) {
//As we add LTM listener, we need to invalidate connection only when both protocols are not listening!
if (!CONFIGURATOR.connectionValid && !helper.ltmDecoder.isReceiving()) {
GUI.log(chrome.i18n.getMessage('noConfigurationReceived'));
helper.mspQueue.flush();
@ -338,6 +340,13 @@ function onOpen(openInfo) {
}
}, 10000);
//Add a timer that every 1s will check if LTM stream is receiving data and display alert if so
helper.interval.add('ltm-connection-check', function () {
if (helper.ltmDecoder.isReceiving()) {
helper.groundstation.activate($('#main-wrapper'));
}
}, 1000);
FC.resetState();
// request configuration data. Start with MSPv1 and