mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-17 05:15:20 +03:00
reference to INAV 1.0.0 removed
This commit is contained in:
parent
cf176f2201
commit
73a15695c5
4 changed files with 11 additions and 58 deletions
2
js/fc.js
2
js/fc.js
|
@ -58,7 +58,7 @@ var FC = {
|
|||
MAX_SERVO_RATE: 125,
|
||||
MIN_SERVO_RATE: -125,
|
||||
isRatesInDps: function () {
|
||||
return !!(typeof CONFIG != "undefined" && CONFIG.flightControllerIdentifier == "INAV" && semver.gt(CONFIG.flightControllerVersion, "1.1.0"));
|
||||
return true;
|
||||
},
|
||||
isNewMixer: function () {
|
||||
return !!(typeof CONFIG != "undefined" && semver.gte(CONFIG.flightControllerVersion, "2.0.0"));
|
||||
|
|
|
@ -266,17 +266,10 @@ var mspHelper = (function (gui) {
|
|||
case MSPCodes.MSP_RC_TUNING:
|
||||
RC_tuning.RC_RATE = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
|
||||
RC_tuning.RC_EXPO = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
|
||||
if (FC.isRatesInDps()) {
|
||||
RC_tuning.roll_pitch_rate = 0;
|
||||
RC_tuning.roll_rate = parseFloat((data.getUint8(offset++) * 10));
|
||||
RC_tuning.pitch_rate = parseFloat((data.getUint8(offset++) * 10));
|
||||
RC_tuning.yaw_rate = parseFloat((data.getUint8(offset++) * 10));
|
||||
} else {
|
||||
RC_tuning.roll_pitch_rate = 0;
|
||||
RC_tuning.roll_rate = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
|
||||
RC_tuning.pitch_rate = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
|
||||
RC_tuning.yaw_rate = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
|
||||
}
|
||||
|
||||
RC_tuning.dynamic_THR_PID = parseInt(data.getUint8(offset++));
|
||||
RC_tuning.throttle_MID = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
|
||||
|
@ -1407,16 +1400,9 @@ var mspHelper = (function (gui) {
|
|||
case MSPCodes.MSP_SET_RC_TUNING:
|
||||
buffer.push(Math.round(RC_tuning.RC_RATE * 100));
|
||||
buffer.push(Math.round(RC_tuning.RC_EXPO * 100));
|
||||
if (FC.isRatesInDps()) {
|
||||
buffer.push(Math.round(RC_tuning.roll_rate / 10));
|
||||
buffer.push(Math.round(RC_tuning.pitch_rate / 10));
|
||||
buffer.push(Math.round(RC_tuning.yaw_rate / 10));
|
||||
} else {
|
||||
buffer.push(Math.round(RC_tuning.roll_rate * 100));
|
||||
buffer.push(Math.round(RC_tuning.pitch_rate * 100));
|
||||
buffer.push(Math.round(RC_tuning.yaw_rate * 100));
|
||||
}
|
||||
|
||||
buffer.push(RC_tuning.dynamic_THR_PID);
|
||||
buffer.push(Math.round(RC_tuning.throttle_MID * 100));
|
||||
buffer.push(Math.round(RC_tuning.throttle_EXPO * 100));
|
||||
|
|
|
@ -194,26 +194,6 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="rate-tpa rate-tpa--no-dps cf">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="roll-pitch" data-i18n="pidTuningRollPitchRate"></th>
|
||||
<th class="roll" data-i18n="pidTuningRollRate"></th>
|
||||
<th class="pitch" data-i18n="pidTuningPitchRate"></th>
|
||||
<th data-i18n="pidTuningYawRate"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="roll-pitch"><input type="number" name="roll-pitch" step="0.01" min="0"
|
||||
max="1.00" /></td>
|
||||
<td class="roll"><input type="number"
|
||||
name="roll" step="0.01" min="0" max="1.00" /></td>
|
||||
<td class="pitch"><input type="number" name="pitch" step="0.01" min="0" max="1.00" /></td>
|
||||
<td><input type="number" name="yaw" step="0.01" min="0" max="2.55" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -55,15 +55,9 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
// Fill in data from RC_tuning object
|
||||
$('.rate-tpa input[name="roll-pitch"]').val(RC_tuning.roll_pitch_rate.toFixed(2));
|
||||
|
||||
if (FC.isRatesInDps()) {
|
||||
$('.rate-tpa input[name="roll"]').val(RC_tuning.roll_rate);
|
||||
$('.rate-tpa input[name="pitch"]').val(RC_tuning.pitch_rate);
|
||||
$('.rate-tpa input[name="yaw"]').val(RC_tuning.yaw_rate);
|
||||
} else {
|
||||
$('.rate-tpa input[name="roll"]').val(RC_tuning.roll_rate.toFixed(2));
|
||||
$('.rate-tpa input[name="pitch"]').val(RC_tuning.pitch_rate.toFixed(2));
|
||||
$('.rate-tpa input[name="yaw"]').val(RC_tuning.yaw_rate.toFixed(2));
|
||||
}
|
||||
|
||||
$('.rate-tpa input[name="manual_roll"]').val(RC_tuning.manual_roll_rate);
|
||||
$('.rate-tpa input[name="manual_pitch"]').val(RC_tuning.manual_pitch_rate);
|
||||
|
@ -139,13 +133,6 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
|
||||
pid_and_rc_to_form();
|
||||
|
||||
if (FC.isRatesInDps()) {
|
||||
$('.rate-tpa--no-dps').hide();
|
||||
} else {
|
||||
$('.rate-tpa .roll-pitch').hide();
|
||||
$('.rate-tpa--inav').hide();
|
||||
}
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "1.4.0")) {
|
||||
var $magHoldYawRate = $("#magHoldYawRate"),
|
||||
$yawJumpPreventionLimit = $('#yawJumpPreventionLimit'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue