1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-14 20:10:11 +03:00

v 1.5 removed

This commit is contained in:
Pawel Spychalski (DzikuVx) 2019-01-15 17:21:24 +01:00
parent e308708f7c
commit 0958b45dad
8 changed files with 55 additions and 109 deletions

View file

@ -2,7 +2,7 @@
var CONFIGURATOR = { var CONFIGURATOR = {
// all versions are specified and compared using semantic versioning http://semver.org/ // all versions are specified and compared using semantic versioning http://semver.org/
'firmwareVersionAccepted': '1.6.0', 'firmwareVersionAccepted': '1.9.0',
'connectionValid': false, 'connectionValid': false,
'connectionValidCliOnly': false, 'connectionValidCliOnly': false,
'cliActive': false, 'cliActive': false,

View file

@ -588,11 +588,9 @@ var FC = {
{bit: 27, group: 'other', name: 'PWM_SERVO_DRIVER', haveTip: true, showNameInTip: true} {bit: 27, group: 'other', name: 'PWM_SERVO_DRIVER', haveTip: true, showNameInTip: true}
); );
if (semver.gte(CONFIG.flightControllerVersion, '1.5.0')) { features.push(
features.push( {bit: 29, group: 'other', name: 'OSD', haveTip: false, showNameInTip: false}
{bit: 29, group: 'other', name: 'OSD', haveTip: false, showNameInTip: false} );
);
}
if (semver.gte(CONFIG.flightControllerVersion, '1.7.3')) { if (semver.gte(CONFIG.flightControllerVersion, '1.7.3')) {
features.push( features.push(

View file

@ -88,15 +88,6 @@ var mspHelper = (function (gui) {
CONFIG.profile = data.getUint8(10); CONFIG.profile = data.getUint8(10);
gui.updateProfileChange(); gui.updateProfileChange();
gui.updateStatusBar(); gui.updateStatusBar();
/*
* Update sensor status only for older firmwares
* Newer firmwares use MSP_SENSOR_STATUS instead
*/
if (semver.lt(CONFIG.flightControllerVersion, "1.5.0")) {
sensor_status(CONFIG.activeSensors);
}
break; break;
case MSPCodes.MSP_STATUS_EX: case MSPCodes.MSP_STATUS_EX:
CONFIG.cycleTime = data.getUint16(0, true); CONFIG.cycleTime = data.getUint16(0, true);
@ -110,14 +101,7 @@ var mspHelper = (function (gui) {
CONFIG.profile = data.getUint8(10); CONFIG.profile = data.getUint8(10);
CONFIG.cpuload = data.getUint16(11, true); CONFIG.cpuload = data.getUint16(11, true);
CONFIG.armingFlags = data.getUint16(13, true);
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) {
CONFIG.armingFlags = data.getUint16(13, true);
}
if (semver.lt(CONFIG.flightControllerVersion, "1.5.0")) {
sensor_status(CONFIG.activeSensors);
}
gui.updateStatusBar(); gui.updateStatusBar();
gui.updateProfileChange(); gui.updateProfileChange();
break; break;
@ -158,9 +142,7 @@ var mspHelper = (function (gui) {
SENSOR_STATUS.rangeHwStatus = data.getUint8(6); SENSOR_STATUS.rangeHwStatus = data.getUint8(6);
SENSOR_STATUS.speedHwStatus = data.getUint8(7); SENSOR_STATUS.speedHwStatus = data.getUint8(7);
SENSOR_STATUS.flowHwStatus = data.getUint8(8); SENSOR_STATUS.flowHwStatus = data.getUint8(8);
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) { sensor_status_ex(SENSOR_STATUS);
sensor_status_ex(SENSOR_STATUS);
}
break; break;
case MSPCodes.MSP_RAW_IMU: case MSPCodes.MSP_RAW_IMU:
@ -2747,19 +2729,11 @@ var mspHelper = (function (gui) {
}; };
self.loadSensorConfig = function (callback) { self.loadSensorConfig = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) { MSP.send_message(MSPCodes.MSP_SENSOR_CONFIG, false, false, callback);
MSP.send_message(MSPCodes.MSP_SENSOR_CONFIG, false, false, callback);
} else {
callback();
}
}; };
self.loadSensorStatus = function (callback) { self.loadSensorStatus = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) { MSP.send_message(MSPCodes.MSP_SENSOR_STATUS, false, false, callback);
MSP.send_message(MSPCodes.MSP_SENSOR_STATUS, false, false, callback);
} else {
callback();
}
}; };
self.loadRcDeadband = function (callback) { self.loadRcDeadband = function (callback) {
@ -2859,11 +2833,7 @@ var mspHelper = (function (gui) {
}; };
self.saveSensorConfig = function (callback) { self.saveSensorConfig = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) { MSP.send_message(MSPCodes.MSP_SET_SENSOR_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_SENSOR_CONFIG), false, callback);
MSP.send_message(MSPCodes.MSP_SET_SENSOR_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_SENSOR_CONFIG), false, callback);
} else {
callback();
}
}; };
self.loadNavPosholdConfig = function (callback) { self.loadNavPosholdConfig = function (callback) {

View file

@ -119,9 +119,7 @@ helper.periodicStatusUpdater = (function () {
return; return;
} }
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) { MSP.send_message(MSPCodes.MSP_SENSOR_STATUS, false, false);
MSP.send_message(MSPCodes.MSP_SENSOR_STATUS, false, false);
}
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) { if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
MSP.send_message(MSPCodes.MSPV2_INAV_STATUS, false, false); MSP.send_message(MSPCodes.MSPV2_INAV_STATUS, false, false);

View file

@ -15,9 +15,7 @@ helper.task = (function () {
publicScope.statusPullStart = function () { publicScope.statusPullStart = function () {
helper.interval.add('status_pull', function () { helper.interval.add('status_pull', function () {
MSP.send_message(MSPCodes.MSP_STATUS, false, false, function () { MSP.send_message(MSPCodes.MSP_STATUS, false, false, function () {
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) { MSP.send_message(MSPCodes.MSP_SENSOR_STATUS);
MSP.send_message(MSPCodes.MSP_SENSOR_STATUS);
}
}); });
}, privateScope.getStatusPullInterval(), true); }, privateScope.getStatusPullInterval(), true);

View file

@ -25,7 +25,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="config-section sensors gui_box grey requires-v1_5"> <div class="config-section sensors gui_box grey">
<div class="gui_box_titlebar"> <div class="gui_box_titlebar">
<div class="spacer_box_title" data-i18n="configurationSensors"></div> <div class="spacer_box_title" data-i18n="configurationSensors"></div>
</div> </div>

View file

@ -650,56 +650,50 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
INAV_PID_CONFIG.attitudeTaskFrequency = $attitudeFrequency.val(); INAV_PID_CONFIG.attitudeTaskFrequency = $attitudeFrequency.val();
}); });
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) {
var $sensorAcc = $('#sensor-acc'), var $sensorAcc = $('#sensor-acc'),
$sensorMag = $('#sensor-mag'), $sensorMag = $('#sensor-mag'),
$sensorBaro = $('#sensor-baro'), $sensorBaro = $('#sensor-baro'),
$sensorPitot = $('#sensor-pitot'), $sensorPitot = $('#sensor-pitot'),
$sensorRangefinder = $('#sensor-rangefinder'), $sensorRangefinder = $('#sensor-rangefinder'),
$sensorOpflow = $('#sensor-opflow'); $sensorOpflow = $('#sensor-opflow');
GUI.fillSelect($sensorAcc, FC.getAccelerometerNames()); GUI.fillSelect($sensorAcc, FC.getAccelerometerNames());
$sensorAcc.val(SENSOR_CONFIG.accelerometer); $sensorAcc.val(SENSOR_CONFIG.accelerometer);
$sensorAcc.change(function () { $sensorAcc.change(function () {
SENSOR_CONFIG.accelerometer = $sensorAcc.val(); SENSOR_CONFIG.accelerometer = $sensorAcc.val();
}); });
GUI.fillSelect($sensorMag, FC.getMagnetometerNames()); GUI.fillSelect($sensorMag, FC.getMagnetometerNames());
$sensorMag.val(SENSOR_CONFIG.magnetometer); $sensorMag.val(SENSOR_CONFIG.magnetometer);
$sensorMag.change(function () { $sensorMag.change(function () {
SENSOR_CONFIG.magnetometer = $sensorMag.val(); SENSOR_CONFIG.magnetometer = $sensorMag.val();
}); });
GUI.fillSelect($sensorBaro, FC.getBarometerNames()); GUI.fillSelect($sensorBaro, FC.getBarometerNames());
$sensorBaro.val(SENSOR_CONFIG.barometer); $sensorBaro.val(SENSOR_CONFIG.barometer);
$sensorBaro.change(function () { $sensorBaro.change(function () {
SENSOR_CONFIG.barometer = $sensorBaro.val(); SENSOR_CONFIG.barometer = $sensorBaro.val();
}); });
GUI.fillSelect($sensorPitot, FC.getPitotNames()); GUI.fillSelect($sensorPitot, FC.getPitotNames());
$sensorPitot.val(SENSOR_CONFIG.pitot); $sensorPitot.val(SENSOR_CONFIG.pitot);
$sensorPitot.change(function () { $sensorPitot.change(function () {
SENSOR_CONFIG.pitot = $sensorPitot.val(); SENSOR_CONFIG.pitot = $sensorPitot.val();
}); });
GUI.fillSelect($sensorRangefinder, FC.getRangefinderNames()); GUI.fillSelect($sensorRangefinder, FC.getRangefinderNames());
$sensorRangefinder.val(SENSOR_CONFIG.rangefinder); $sensorRangefinder.val(SENSOR_CONFIG.rangefinder);
$sensorRangefinder.change(function () { $sensorRangefinder.change(function () {
SENSOR_CONFIG.rangefinder = $sensorRangefinder.val(); SENSOR_CONFIG.rangefinder = $sensorRangefinder.val();
}); });
GUI.fillSelect($sensorOpflow, FC.getOpticalFlowNames()); GUI.fillSelect($sensorOpflow, FC.getOpticalFlowNames());
$sensorOpflow.val(SENSOR_CONFIG.opflow); $sensorOpflow.val(SENSOR_CONFIG.opflow);
$sensorOpflow.change(function () { $sensorOpflow.change(function () {
SENSOR_CONFIG.opflow = $sensorOpflow.val(); SENSOR_CONFIG.opflow = $sensorOpflow.val();
}); });
$(".requires-v1_5").show();
} else {
$(".requires-v1_5").hide();
}
if (semver.gte(CONFIG.flightControllerVersion, "1.7.0")) { if (semver.gte(CONFIG.flightControllerVersion, "1.7.0")) {
$(".requires-v1_7").show(); $(".requires-v1_7").show();
@ -855,15 +849,13 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
/* /*
* send gyro LPF and async_mode tracking * send gyro LPF and async_mode tracking
*/ */
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) { googleAnalytics.sendEvent('Setting', 'GyroLpf', FC.getGyroLpfValues()[INAV_PID_CONFIG.gyroscopeLpf].label);
googleAnalytics.sendEvent('Setting', 'GyroLpf', FC.getGyroLpfValues()[INAV_PID_CONFIG.gyroscopeLpf].label); googleAnalytics.sendEvent('Setting', 'AsyncMode', FC.getAsyncModes()[INAV_PID_CONFIG.asynchronousMode]);
googleAnalytics.sendEvent('Setting', 'AsyncMode', FC.getAsyncModes()[INAV_PID_CONFIG.asynchronousMode]);
googleAnalytics.sendEvent('Board', 'Accelerometer', FC.getAccelerometerNames()[SENSOR_CONFIG.accelerometer]); googleAnalytics.sendEvent('Board', 'Accelerometer', FC.getAccelerometerNames()[SENSOR_CONFIG.accelerometer]);
googleAnalytics.sendEvent('Board', 'Magnetometer', FC.getMagnetometerNames()[SENSOR_CONFIG.magnetometer]); googleAnalytics.sendEvent('Board', 'Magnetometer', FC.getMagnetometerNames()[SENSOR_CONFIG.magnetometer]);
googleAnalytics.sendEvent('Board', 'Barometer', FC.getBarometerNames()[SENSOR_CONFIG.barometer]); googleAnalytics.sendEvent('Board', 'Barometer', FC.getBarometerNames()[SENSOR_CONFIG.barometer]);
googleAnalytics.sendEvent('Board', 'Pitot', FC.getPitotNames()[SENSOR_CONFIG.pitot]); googleAnalytics.sendEvent('Board', 'Pitot', FC.getPitotNames()[SENSOR_CONFIG.pitot]);
}
for (var i = 0; i < features.length; i++) { for (var i = 0; i < features.length; i++) {
var featureName = features[i].name; var featureName = features[i].name;

View file

@ -60,16 +60,8 @@ TABS.onboard_logging.initialize = function (callback) {
dataflashPresent = DATAFLASH.totalSize > 0, dataflashPresent = DATAFLASH.totalSize > 0,
blackboxSupport; blackboxSupport;
/* if ((BLACKBOX.supported || DATAFLASH.supported) && bit_check(BF_CONFIG.features, 19)) {
* Pre-1.11.0 firmware supported DATAFLASH API (on targets with SPI flash) but not the BLACKBOX config API.
*
* The best we can do on those targets is check the BLACKBOX feature bit to identify support for Blackbox instead.
*/
if (BLACKBOX.supported || DATAFLASH.supported
|| semver.gte(CONFIG.flightControllerVersion, "1.5.0") && semver.lte(CONFIG.flightControllerVersion, "1.10.0") && bit_check(BF_CONFIG.features, 19)) {
blackboxSupport = 'yes'; blackboxSupport = 'yes';
} else if (semver.gte(CONFIG.flightControllerVersion, "1.5.0") && semver.lte(CONFIG.flightControllerVersion, "1.10.0")) {
blackboxSupport = 'maybe';
} else { } else {
blackboxSupport = 'no'; blackboxSupport = 'no';
} }
@ -80,9 +72,7 @@ TABS.onboard_logging.initialize = function (callback) {
.toggleClass("dataflash-present", dataflashPresent) .toggleClass("dataflash-present", dataflashPresent)
.toggleClass("sdcard-supported", SDCARD.supported) .toggleClass("sdcard-supported", SDCARD.supported)
.toggleClass("blackbox-config-supported", BLACKBOX.supported) .toggleClass("blackbox-config-supported", BLACKBOX.supported)
.toggleClass("blackbox-supported", blackboxSupport == 'yes') .toggleClass("blackbox-supported", blackboxSupport == 'yes')
.toggleClass("blackbox-maybe-supported", blackboxSupport == 'maybe')
.toggleClass("blackbox-unsupported", blackboxSupport == 'no'); .toggleClass("blackbox-unsupported", blackboxSupport == 'no');
if (dataflashPresent) { if (dataflashPresent) {