Fix initialisation of allowTestMode. Without this if you connected to a

board that had 3D API support and then connected to another board
without the 3D API support the test mode would be incorrectly enabled.
10.3.x-maintenance
Dominic Clifton 2015-12-16 14:46:07 +01:00
parent 7618363449
commit f0144b3d99
1 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,8 @@ TABS.motors.initialize = function (callback) {
var self = this;
self.armed = false;
self.feature3DSupported = false;
self.allowTestMode = true;
if (GUI.active_tab != 'motors') {
GUI.active_tab = 'motors';
@ -176,7 +178,7 @@ TABS.motors.initialize = function (callback) {
localize();
self.feature3DEnabled = bit_check(BF_CONFIG.features, 12);
self.allowTestMode = true;
if (self.feature3DEnabled && !self.feature3DSupported) {
self.allowTestMode = false;
}