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

verify version on connect

This commit is contained in:
cTn 2014-02-25 14:37:34 +01:00
parent 0101f753f9
commit d5b64cb291
2 changed files with 13 additions and 6 deletions

View file

@ -150,12 +150,17 @@ function onOpen(openInfo) {
send_message(MSP_codes.MSP_IDENT, MSP_codes.MSP_IDENT, false, function() {
GUI.timeout_remove('connecting'); // kill connecting timer
// Update UI elements that doesn't need consistent refreshing
$('.software-version').html(CONFIG.version);
configuration_received = true;
$('div#port-picker a.connect').text('Disconnect').addClass('active');
$('#tabs li a:first').click();
if (CONFIG.version >= firmware_version_accepted) {
// Update UI elements that doesn't need consistent refreshing
$('.software-version').html(CONFIG.version);
configuration_received = true;
$('div#port-picker a.connect').text('Disconnect').addClass('active');
$('#tabs li a:first').click();
} else {
GUI.log('This firmware version is <span style="color: red">not supported</span>. Please upgrade to version <strong>' + firmware_version_accepted + '</strong> or higher.');
$('div#port-picker a.connect').click(); // disconnect
}
});
});
} else {