mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 20:10:11 +03:00
Cleanup 2.1 version
This commit is contained in:
parent
cb1ff69703
commit
79a16a8fe3
13 changed files with 43 additions and 163 deletions
14
js/fc.js
14
js/fc.js
|
@ -935,11 +935,7 @@ var FC = {
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
getAccelerometerNames: function () {
|
getAccelerometerNames: function () {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
return [ "NONE", "AUTO", "ADXL345", "MPU6050", "MMA845x", "BMA280", "LSM303DLHC", "MPU6000", "MPU6500", "MPU9250", "BMI160", "ICM20689", "FAKE"];
|
||||||
return [ "NONE", "AUTO", "ADXL345", "MPU6050", "MMA845x", "BMA280", "LSM303DLHC", "MPU6000", "MPU6500", "MPU9250", "BMI160", "ICM20689", "FAKE"];
|
|
||||||
} else {
|
|
||||||
return [ "NONE", "AUTO", "ADXL345", "MPU6050", "MMA845x", "BMA280", "LSM303DLHC", "MPU6000", "MPU6500", "MPU9250", "BMI160", "FAKE"];
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getMagnetometerNames: function () {
|
getMagnetometerNames: function () {
|
||||||
return ["NONE", "AUTO", "HMC5883", "AK8975", "GPSMAG", "MAG3110", "AK8963", "IST8310", "QMC5883", "MPU9250", "IST8308", "LIS3MDL", "FAKE"];
|
return ["NONE", "AUTO", "HMC5883", "AK8975", "GPSMAG", "MAG3110", "AK8963", "IST8310", "QMC5883", "MPU9250", "IST8308", "LIS3MDL", "FAKE"];
|
||||||
|
@ -955,13 +951,7 @@ var FC = {
|
||||||
return ["NONE", "AUTO", "MS4525", "ADC", "VIRTUAL", "FAKE"];
|
return ["NONE", "AUTO", "MS4525", "ADC", "VIRTUAL", "FAKE"];
|
||||||
},
|
},
|
||||||
getRangefinderNames: function () {
|
getRangefinderNames: function () {
|
||||||
let data = [ "NONE", "HCSR04", "SRF10", "INAV_I2C", "VL53L0X", "MSP", "UIB"];
|
return [ "NONE", "HCSR04", "SRF10", "INAV_I2C", "VL53L0X", "MSP", "UIB", "Benewake TFmini"];
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
|
||||||
data.push("Benewake TFmini")
|
|
||||||
}
|
|
||||||
|
|
||||||
return data;
|
|
||||||
},
|
},
|
||||||
getOpticalFlowNames: function () {
|
getOpticalFlowNames: function () {
|
||||||
return [ "NONE", "PMW3901", "CXOF", "MSP", "FAKE" ];
|
return [ "NONE", "PMW3901", "CXOF", "MSP", "FAKE" ];
|
||||||
|
|
|
@ -472,28 +472,14 @@ var mspHelper = (function (gui) {
|
||||||
break;
|
break;
|
||||||
case MSPCodes.MSP_SERVO_MIX_RULES:
|
case MSPCodes.MSP_SERVO_MIX_RULES:
|
||||||
SERVO_RULES.flush();
|
SERVO_RULES.flush();
|
||||||
|
if (data.byteLength % 8 === 0) {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
for (i = 0; i < data.byteLength; i += 8) {
|
||||||
if (data.byteLength % 8 === 0) {
|
SERVO_RULES.put(new ServoMixRule(
|
||||||
for (i = 0; i < data.byteLength; i += 8) {
|
data.getInt8(i),
|
||||||
SERVO_RULES.put(new ServoMixRule(
|
data.getInt8(i + 1),
|
||||||
data.getInt8(i),
|
data.getInt16(i + 2, true),
|
||||||
data.getInt8(i + 1),
|
data.getInt8(i + 4)
|
||||||
data.getInt16(i + 2, true),
|
));
|
||||||
data.getInt8(i + 4)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (data.byteLength % 7 === 0) {
|
|
||||||
for (i = 0; i < data.byteLength; i += 7) {
|
|
||||||
SERVO_RULES.put(new ServoMixRule(
|
|
||||||
data.getInt8(i),
|
|
||||||
data.getInt8(i + 1),
|
|
||||||
data.getInt8(i + 2),
|
|
||||||
data.getInt8(i + 3)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SERVO_RULES.cleanup();
|
SERVO_RULES.cleanup();
|
||||||
|
@ -2272,12 +2258,8 @@ var mspHelper = (function (gui) {
|
||||||
buffer.push(servoIndex);
|
buffer.push(servoIndex);
|
||||||
buffer.push(servoRule.getTarget());
|
buffer.push(servoRule.getTarget());
|
||||||
buffer.push(servoRule.getInput());
|
buffer.push(servoRule.getInput());
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
buffer.push(lowByte(servoRule.getRate()));
|
||||||
buffer.push(lowByte(servoRule.getRate()));
|
buffer.push(highByte(servoRule.getRate()));
|
||||||
buffer.push(highByte(servoRule.getRate()));
|
|
||||||
} else {
|
|
||||||
buffer.push(servoRule.getRate());
|
|
||||||
}
|
|
||||||
buffer.push(servoRule.getSpeed());
|
buffer.push(servoRule.getSpeed());
|
||||||
buffer.push(0);
|
buffer.push(0);
|
||||||
buffer.push(0);
|
buffer.push(0);
|
||||||
|
@ -3227,19 +3209,11 @@ var mspHelper = (function (gui) {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.loadBrakingConfig = function(callback) {
|
self.loadBrakingConfig = function(callback) {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
MSP.send_message(MSPCodes.MSP2_INAV_MC_BRAKING, false, false, callback);
|
||||||
MSP.send_message(MSPCodes.MSP2_INAV_MC_BRAKING, false, false, callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.saveBrakingConfig = function(callback) {
|
self.saveBrakingConfig = function(callback) {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
MSP.send_message(MSPCodes.MSP2_INAV_SET_MC_BRAKING, mspHelper.crunch(MSPCodes.MSP2_INAV_SET_MC_BRAKING), false, callback);
|
||||||
MSP.send_message(MSPCodes.MSP2_INAV_SET_MC_BRAKING, mspHelper.crunch(MSPCodes.MSP2_INAV_SET_MC_BRAKING), false, callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.loadParameterGroups = function(callback) {
|
self.loadParameterGroups = function(callback) {
|
||||||
|
@ -3258,11 +3232,7 @@ var mspHelper = (function (gui) {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.loadBrakingConfig = function(callback) {
|
self.loadBrakingConfig = function(callback) {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
MSP.send_message(MSPCodes.MSP2_INAV_MC_BRAKING, false, false, callback);
|
||||||
MSP.send_message(MSPCodes.MSP2_INAV_MC_BRAKING, false, false, callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.loadSensorStatus = function (callback) {
|
self.loadSensorStatus = function (callback) {
|
||||||
|
|
|
@ -284,7 +284,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="config-section gui_box grey requires-v2_1">
|
<div class="config-section gui_box grey">
|
||||||
<div class="gui_box_titlebar">
|
<div class="gui_box_titlebar">
|
||||||
<div class="spacer_box_title" data-i18n="multirotorBrakingConfiguration"></div>
|
<div class="spacer_box_title" data-i18n="multirotorBrakingConfiguration"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -61,13 +61,6 @@ TABS.advanced_tuning.initialize = function (callback) {
|
||||||
$rthAllowLanding = $('#rthAllowLanding'),
|
$rthAllowLanding = $('#rthAllowLanding'),
|
||||||
$rthAltControlMode = $('#rthAltControlMode');
|
$rthAltControlMode = $('#rthAltControlMode');
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
|
||||||
|
|
||||||
$('.requires-v2_1').show();
|
|
||||||
} else {
|
|
||||||
$('.requires-v2_1').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$rthClimbFirst.prop("checked", RTH_AND_LAND_CONFIG.rthClimbFirst);
|
$rthClimbFirst.prop("checked", RTH_AND_LAND_CONFIG.rthClimbFirst);
|
||||||
$rthClimbFirst.change(function () {
|
$rthClimbFirst.change(function () {
|
||||||
if ($(this).is(":checked")) {
|
if ($(this).is(":checked")) {
|
||||||
|
|
|
@ -348,12 +348,6 @@
|
||||||
<div class="helpicon cf_tip" data-i18n_title="configurationGyroLpfHelp"></div>
|
<div class="helpicon cf_tip" data-i18n_title="configurationGyroLpfHelp"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="select removed-v2_1_0">
|
|
||||||
<select id="async-mode"></select>
|
|
||||||
<label for="async-mode"> <span data-i18n="configurationAsyncMode"></span></label>
|
|
||||||
<div class="helpicon cf_tip" data-i18n_title="configurationAsyncModeHelp"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="gyro-sync-wrapper" class="checkbox">
|
<div id="gyro-sync-wrapper" class="checkbox">
|
||||||
<input type="checkbox" id="gyro-sync-checkbox" class="toggle" />
|
<input type="checkbox" id="gyro-sync-checkbox" class="toggle" />
|
||||||
<label for="gyro-sync-checkbox">
|
<label for="gyro-sync-checkbox">
|
||||||
|
@ -369,21 +363,6 @@
|
||||||
<div class="helpicon cf_tip" data-i18n_title="configurationGyroFrequencyHelp"></div>
|
<div class="helpicon cf_tip" data-i18n_title="configurationGyroFrequencyHelp"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="accelerometer-frequency-wrapper" class="checkbox removed-v2_1_0">
|
|
||||||
<select id="accelerometer-frequency"></select>
|
|
||||||
<label for="accelerometer-frequency">
|
|
||||||
<span data-i18n="configurationAccelerometerFrequencyTitle"></span>
|
|
||||||
</label>
|
|
||||||
<div class="helpicon cf_tip" data-i18n_title="configurationAccelerometerFrequencyHelp"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="attitude-frequency-wrapper" class="checkbox removed-v2_1_0">
|
|
||||||
<select id="attitude-frequency"></select>
|
|
||||||
<label for="attitude-frequency">
|
|
||||||
<span data-i18n="configurationAttitudeFrequencyTitle"></span>
|
|
||||||
</label>
|
|
||||||
<div class="helpicon cf_tip" data-i18n_title="configurationAttitudeFrequencyHelp"></div>
|
|
||||||
</div>
|
|
||||||
<div id="looptime-warning" class="info-box" data-i18n="looptimeNotAdvised"></div>
|
<div id="looptime-warning" class="info-box" data-i18n="looptimeNotAdvised"></div>
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<select id="looptime"></select>
|
<select id="looptime"></select>
|
||||||
|
|
|
@ -701,14 +701,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
SENSOR_CONFIG.opflow = $sensorOpflow.val();
|
SENSOR_CONFIG.opflow = $sensorOpflow.val();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
|
||||||
$(".removed-v2_1_0").hide();
|
|
||||||
$(".requires-v2_1_0").show();
|
|
||||||
} else {
|
|
||||||
$(".removed-v2_1_0").show();
|
|
||||||
$(".requires-v2_1_0").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#3ddeadbandlow').val(_3D.deadband3d_low);
|
$('#3ddeadbandlow').val(_3D.deadband3d_low);
|
||||||
$('#3ddeadbandhigh').val(_3D.deadband3d_high);
|
$('#3ddeadbandhigh').val(_3D.deadband3d_high);
|
||||||
$('#3dneutral').val(_3D.neutral3d);
|
$('#3dneutral').val(_3D.neutral3d);
|
||||||
|
|
|
@ -141,11 +141,9 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
let rate_inputs = $('.mix-rule-rate');
|
||||||
rate_inputs = $('.mix-rule-rate');
|
rate_inputs.attr("min", -1000);
|
||||||
rate_inputs.attr("min", -1000);
|
rate_inputs.attr("max", 1000);
|
||||||
rate_inputs.attr("max", 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
localize();
|
localize();
|
||||||
}
|
}
|
||||||
|
|
36
tabs/osd.js
36
tabs/osd.js
|
@ -582,7 +582,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'IMU_TEMPERATURE_MIN',
|
name: 'IMU_TEMPERATURE_MIN',
|
||||||
field: 'imu_temp_alarm_min',
|
field: 'imu_temp_alarm_min',
|
||||||
min_version: '2.1.0',
|
|
||||||
unit: '°C',
|
unit: '°C',
|
||||||
step: 0.5,
|
step: 0.5,
|
||||||
to_display: function(osd_data, value) { return value / 10 },
|
to_display: function(osd_data, value) { return value / 10 },
|
||||||
|
@ -593,7 +592,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'IMU_TEMPERATURE_MAX',
|
name: 'IMU_TEMPERATURE_MAX',
|
||||||
field: 'imu_temp_alarm_max',
|
field: 'imu_temp_alarm_max',
|
||||||
min_version: '2.1.0',
|
|
||||||
step: 0.5,
|
step: 0.5,
|
||||||
unit: '°C',
|
unit: '°C',
|
||||||
to_display: function(osd_data, value) { return value / 10 },
|
to_display: function(osd_data, value) { return value / 10 },
|
||||||
|
@ -604,7 +602,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'BARO_TEMPERATURE_MIN',
|
name: 'BARO_TEMPERATURE_MIN',
|
||||||
field: 'baro_temp_alarm_min',
|
field: 'baro_temp_alarm_min',
|
||||||
min_version: '2.1.0',
|
|
||||||
step: 0.5,
|
step: 0.5,
|
||||||
unit: '°C',
|
unit: '°C',
|
||||||
to_display: function(osd_data, value) { return value / 10 },
|
to_display: function(osd_data, value) { return value / 10 },
|
||||||
|
@ -615,7 +612,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'BARO_TEMPERATURE_MAX',
|
name: 'BARO_TEMPERATURE_MAX',
|
||||||
field: 'baro_temp_alarm_max',
|
field: 'baro_temp_alarm_max',
|
||||||
min_version: '2.1.0',
|
|
||||||
step: 0.5,
|
step: 0.5,
|
||||||
unit: '°C',
|
unit: '°C',
|
||||||
to_display: function(osd_data, value) { return value / 10 },
|
to_display: function(osd_data, value) { return value / 10 },
|
||||||
|
@ -773,7 +769,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'IMU_TEMPERATURE',
|
name: 'IMU_TEMPERATURE',
|
||||||
id: 86,
|
id: 86,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
if (OSD.data.preferences.units === 0) {
|
if (OSD.data.preferences.units === 0) {
|
||||||
// Imperial
|
// Imperial
|
||||||
|
@ -786,7 +781,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'BARO_TEMPERATURE',
|
name: 'BARO_TEMPERATURE',
|
||||||
id: 87,
|
id: 87,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
if (OSD.data.preferences.units === 0) {
|
if (OSD.data.preferences.units === 0) {
|
||||||
// Imperial
|
// Imperial
|
||||||
|
@ -799,7 +793,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'SENSOR1_TEMPERATURE',
|
name: 'SENSOR1_TEMPERATURE',
|
||||||
id: 88,
|
id: 88,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
if (OSD.data.preferences.units === 0) {
|
if (OSD.data.preferences.units === 0) {
|
||||||
// Imperial
|
// Imperial
|
||||||
|
@ -812,7 +805,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'SENSOR2_TEMPERATURE',
|
name: 'SENSOR2_TEMPERATURE',
|
||||||
id: 89,
|
id: 89,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
if (OSD.data.preferences.units === 0) {
|
if (OSD.data.preferences.units === 0) {
|
||||||
// Imperial
|
// Imperial
|
||||||
|
@ -825,7 +817,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'SENSOR3_TEMPERATURE',
|
name: 'SENSOR3_TEMPERATURE',
|
||||||
id: 90,
|
id: 90,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
if (OSD.data.preferences.units === 0) {
|
if (OSD.data.preferences.units === 0) {
|
||||||
// Imperial
|
// Imperial
|
||||||
|
@ -838,7 +829,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'SENSOR4_TEMPERATURE',
|
name: 'SENSOR4_TEMPERATURE',
|
||||||
id: 91,
|
id: 91,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
if (OSD.data.preferences.units === 0) {
|
if (OSD.data.preferences.units === 0) {
|
||||||
// Imperial
|
// Imperial
|
||||||
|
@ -851,7 +841,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'SENSOR5_TEMPERATURE',
|
name: 'SENSOR5_TEMPERATURE',
|
||||||
id: 92,
|
id: 92,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
if (OSD.data.preferences.units === 0) {
|
if (OSD.data.preferences.units === 0) {
|
||||||
// Imperial
|
// Imperial
|
||||||
|
@ -864,7 +853,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'SENSOR6_TEMPERATURE',
|
name: 'SENSOR6_TEMPERATURE',
|
||||||
id: 93,
|
id: 93,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
if (OSD.data.preferences.units === 0) {
|
if (OSD.data.preferences.units === 0) {
|
||||||
// Imperial
|
// Imperial
|
||||||
|
@ -877,7 +865,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'SENSOR7_TEMPERATURE',
|
name: 'SENSOR7_TEMPERATURE',
|
||||||
id: 94,
|
id: 94,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
if (OSD.data.preferences.units === 0) {
|
if (OSD.data.preferences.units === 0) {
|
||||||
// Imperial
|
// Imperial
|
||||||
|
@ -890,7 +877,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'SENSOR8_TEMPERATURE',
|
name: 'SENSOR8_TEMPERATURE',
|
||||||
id: 95,
|
id: 95,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
if (OSD.data.preferences.units === 0) {
|
if (OSD.data.preferences.units === 0) {
|
||||||
// Imperial
|
// Imperial
|
||||||
|
@ -1146,7 +1132,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: '3D_SPEED',
|
name: '3D_SPEED',
|
||||||
id: 85,
|
id: 85,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
// 3 chars
|
// 3 chars
|
||||||
if (OSD.data.preferences.units === 0 || OSD.data.preferences.units === 2) {
|
if (OSD.data.preferences.units === 0 || OSD.data.preferences.units === 2) {
|
||||||
|
@ -1174,7 +1159,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'PLUS_CODE',
|
name: 'PLUS_CODE',
|
||||||
id: 97,
|
id: 97,
|
||||||
min_version: '2.1.0',
|
|
||||||
preview: function() {
|
preview: function() {
|
||||||
let digits = parseInt(Settings.getInputValue('osd_plus_code_digits')) + 1;
|
let digits = parseInt(Settings.getInputValue('osd_plus_code_digits')) + 1;
|
||||||
console.log("DITIS", digits);
|
console.log("DITIS", digits);
|
||||||
|
@ -1661,12 +1645,10 @@ OSD.msp = {
|
||||||
result.push16(OSD.data.alarms.gforce_axis_max);
|
result.push16(OSD.data.alarms.gforce_axis_max);
|
||||||
result.push8(OSD.data.alarms.current);
|
result.push8(OSD.data.alarms.current);
|
||||||
}
|
}
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '2.1.0')) {
|
result.push16(OSD.data.alarms.imu_temp_alarm_min);
|
||||||
result.push16(OSD.data.alarms.imu_temp_alarm_min);
|
result.push16(OSD.data.alarms.imu_temp_alarm_max);
|
||||||
result.push16(OSD.data.alarms.imu_temp_alarm_max);
|
result.push16(OSD.data.alarms.baro_temp_alarm_min);
|
||||||
result.push16(OSD.data.alarms.baro_temp_alarm_min);
|
result.push16(OSD.data.alarms.baro_temp_alarm_max);
|
||||||
result.push16(OSD.data.alarms.baro_temp_alarm_max);
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1684,12 +1666,10 @@ OSD.msp = {
|
||||||
OSD.data.alarms.gforce_axis_max = alarms.read16();
|
OSD.data.alarms.gforce_axis_max = alarms.read16();
|
||||||
OSD.data.alarms.current = alarms.readU8();
|
OSD.data.alarms.current = alarms.readU8();
|
||||||
}
|
}
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '2.1.0')) {
|
OSD.data.alarms.imu_temp_alarm_min = alarms.read16();
|
||||||
OSD.data.alarms.imu_temp_alarm_min = alarms.read16();
|
OSD.data.alarms.imu_temp_alarm_max = alarms.read16();
|
||||||
OSD.data.alarms.imu_temp_alarm_max = alarms.read16();
|
OSD.data.alarms.baro_temp_alarm_min = alarms.read16();
|
||||||
OSD.data.alarms.baro_temp_alarm_min = alarms.read16();
|
OSD.data.alarms.baro_temp_alarm_max = alarms.read16();
|
||||||
OSD.data.alarms.baro_temp_alarm_max = alarms.read16();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
encodePreferences: function() {
|
encodePreferences: function() {
|
||||||
|
|
|
@ -347,7 +347,7 @@
|
||||||
<div class="helpicon cf_tip" data-i18n_title="gyro_lpf_type_help"></div>
|
<div class="helpicon cf_tip" data-i18n_title="gyro_lpf_type_help"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="requires-v2_1">
|
<tr>
|
||||||
<th data-i18n="gyroStage2LpfCutoffFrequency"></th>
|
<th data-i18n="gyroStage2LpfCutoffFrequency"></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="number" id="gyroStage2LpfCutoffFrequency" data-simple-bind="FILTER_CONFIG.gyroStage2LowpassHz" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
|
<input type="number" id="gyroStage2LpfCutoffFrequency" data-simple-bind="FILTER_CONFIG.gyroStage2LowpassHz" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
|
||||||
|
@ -456,14 +456,14 @@
|
||||||
<div class="helpicon cf_tip" data-i18n_title="dtermNotchCutoffHelp"></div>
|
<div class="helpicon cf_tip" data-i18n_title="dtermNotchCutoffHelp"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="requires-v2_1">
|
<tr>
|
||||||
<th data-i18n="accNotchHz"></th>
|
<th data-i18n="accNotchHz"></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="number" data-simple-bind="FILTER_CONFIG.accNotchHz" id="accNotchHz" class="rate-tpa_input" step="1" min="0" max="255" /> Hz
|
<input type="number" data-simple-bind="FILTER_CONFIG.accNotchHz" id="accNotchHz" class="rate-tpa_input" step="1" min="0" max="255" /> Hz
|
||||||
<div class="helpicon cf_tip" data-i18n_title="accNotchHzHelp"></div>
|
<div class="helpicon cf_tip" data-i18n_title="accNotchHzHelp"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="requires-v2_1">
|
<tr>
|
||||||
<th data-i18n="accNotchCutoff"></th>
|
<th data-i18n="accNotchCutoff"></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="number" data-simple-bind="FILTER_CONFIG.accNotchCutoff" id="gyroNotchCutoff2" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
|
<input type="number" data-simple-bind="FILTER_CONFIG.accNotchCutoff" id="gyroNotchCutoff2" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
|
||||||
|
|
|
@ -184,12 +184,6 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
PID_ADVANCED.axisAccelerationLimitYaw = Math.round(parseInt($axisAccelerationLimitYaw.val(), 10) / 10);
|
PID_ADVANCED.axisAccelerationLimitYaw = Math.round(parseInt($axisAccelerationLimitYaw.val(), 10) / 10);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
|
||||||
$('.requires-v2_1').show();
|
|
||||||
} else {
|
|
||||||
$('.requires-v2_1').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.2.0")) {
|
if (semver.gte(CONFIG.flightControllerVersion, "2.2.0")) {
|
||||||
$('.requires-v2_2').show();
|
$('.requires-v2_2').show();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -34,13 +34,11 @@ TABS.ports.initialize = function (callback) {
|
||||||
maxPorts: 1
|
maxPorts: 1
|
||||||
});
|
});
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
functionRules.push({
|
||||||
functionRules.push({
|
name: 'RANGEFINDER',
|
||||||
name: 'RANGEFINDER',
|
groups: ['sensors'],
|
||||||
groups: ['sensors'],
|
maxPorts: 1 }
|
||||||
maxPorts: 1 }
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.2.0")) {
|
if (semver.gte(CONFIG.flightControllerVersion, "2.2.0")) {
|
||||||
functionRules.push({
|
functionRules.push({
|
||||||
|
@ -155,11 +153,7 @@ TABS.ports.initialize = function (callback) {
|
||||||
load_configuration_from_fc();
|
load_configuration_from_fc();
|
||||||
|
|
||||||
function load_configuration_from_fc() {
|
function load_configuration_from_fc() {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
MSP.send_message(MSPCodes.MSP2_CF_SERIAL_CONFIG, false, false, on_configuration_loaded_handler);
|
||||||
MSP.send_message(MSPCodes.MSP2_CF_SERIAL_CONFIG, false, false, on_configuration_loaded_handler);
|
|
||||||
} else {
|
|
||||||
MSP.send_message(MSPCodes.MSP_CF_SERIAL_CONFIG, false, false, on_configuration_loaded_handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
function on_configuration_loaded_handler() {
|
function on_configuration_loaded_handler() {
|
||||||
$('#content').load("./tabs/ports.html", on_tab_loaded_handler);
|
$('#content').load("./tabs/ports.html", on_tab_loaded_handler);
|
||||||
|
@ -332,11 +326,8 @@ TABS.ports.initialize = function (callback) {
|
||||||
SERIAL_CONFIG.ports.push(serialPort);
|
SERIAL_CONFIG.ports.push(serialPort);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
MSP.send_message(MSPCodes.MSP2_SET_CF_SERIAL_CONFIG, mspHelper.crunch(MSPCodes.MSP2_SET_CF_SERIAL_CONFIG), false, save_to_eeprom);
|
||||||
MSP.send_message(MSPCodes.MSP2_SET_CF_SERIAL_CONFIG, mspHelper.crunch(MSPCodes.MSP2_SET_CF_SERIAL_CONFIG), false, save_to_eeprom);
|
|
||||||
} else {
|
|
||||||
MSP.send_message(MSPCodes.MSP_SET_CF_SERIAL_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_CF_SERIAL_CONFIG), false, save_to_eeprom);
|
|
||||||
}
|
|
||||||
function save_to_eeprom() {
|
function save_to_eeprom() {
|
||||||
MSP.send_message(MSPCodes.MSP_EEPROM_WRITE, false, false, on_saved_handler);
|
MSP.send_message(MSPCodes.MSP_EEPROM_WRITE, false, false, on_saved_handler);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<label><input type="checkbox" name="gyro_on" class="first" />Gyroscope</label> <label><input
|
<label><input type="checkbox" name="gyro_on" class="first" />Gyroscope</label> <label><input
|
||||||
type="checkbox" name="accel_on" />Accelerometer</label> <label><input type="checkbox"
|
type="checkbox" name="accel_on" />Accelerometer</label> <label><input type="checkbox"
|
||||||
name="mag_on" />Magnetometer</label> <label><input type="checkbox" name="baro_on" />Barometer</label> <label><input
|
name="mag_on" />Magnetometer</label> <label><input type="checkbox" name="baro_on" />Barometer</label> <label><input
|
||||||
type="checkbox" name="sonar_on" />Sonar</label> <label><input type="checkbox" name="airspeed_on" />Air speed</label> <label class="requires-v2_1_0"><input
|
type="checkbox" name="sonar_on" />Sonar</label> <label><input type="checkbox" name="airspeed_on" />Air speed</label> <label><input
|
||||||
type="checkbox" name="temperature_on" />Temperatures</label><label><input type="checkbox" name="debug_on" />Debug</label>
|
type="checkbox" name="temperature_on" />Temperatures</label><label><input type="checkbox" name="debug_on" />Debug</label>
|
||||||
|
|
||||||
<a class="debug-trace" href="javascript:void(0);">Open Debug Trace</a>
|
<a class="debug-trace" href="javascript:void(0);">Open Debug Trace</a>
|
||||||
|
|
|
@ -215,11 +215,8 @@ TABS.sensors.initialize = function (callback) {
|
||||||
checkboxes.eq(5).prop('disabled', true);
|
checkboxes.eq(5).prop('disabled', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
if (!bit_check(CONFIG.activeSensors, 7)) {
|
||||||
if (!bit_check(CONFIG.activeSensors, 7))
|
checkboxes.eq(6).prop('disabled', true);
|
||||||
checkboxes.eq(6).prop('disabled', true);
|
|
||||||
} else {
|
|
||||||
$(".requires-v2_1_0").hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.tab-sensors .info .checkboxes input').change(function () {
|
$('.tab-sensors .info .checkboxes input').change(function () {
|
||||||
|
@ -486,7 +483,7 @@ TABS.sensors.initialize = function (callback) {
|
||||||
}, rates.airspeed, true);
|
}, rates.airspeed, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkboxes[6] && (semver.gte(CONFIG.flightControllerVersion, "2.1.0"))) {
|
if (checkboxes[6]) {
|
||||||
helper.interval.add('temperature_pull', function temperature_data_pull() {
|
helper.interval.add('temperature_pull', function temperature_data_pull() {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -512,11 +509,7 @@ TABS.sensors.initialize = function (callback) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '2.1.0')) {
|
MSP.send_message(MSPCodes.MSP2_INAV_DEBUG, false, false, update_debug_graphs);
|
||||||
MSP.send_message(MSPCodes.MSP2_INAV_DEBUG, false, false, update_debug_graphs);
|
|
||||||
} else {
|
|
||||||
MSP.send_message(MSPCodes.MSP_DEBUG, false, false, update_debug_graphs);
|
|
||||||
}
|
|
||||||
}, rates.debug, true);
|
}, rates.debug, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue