mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-15 20:35:19 +03:00
1.6 is gone
This commit is contained in:
parent
0958b45dad
commit
529c40e556
8 changed files with 37 additions and 187 deletions
|
@ -216,10 +216,7 @@ var mspHelper = (function (gui) {
|
|||
break;
|
||||
case MSPCodes.MSP_ALTITUDE:
|
||||
SENSOR_DATA.altitude = parseFloat((data.getInt32(0, true) / 100.0).toFixed(2)); // correct scale factor
|
||||
// On 1.6 and above this provides also baro raw altitude
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
|
||||
SENSOR_DATA.barometer = parseFloat((data.getInt32(6, true) / 100.0).toFixed(2)); // correct scale factor
|
||||
}
|
||||
SENSOR_DATA.barometer = parseFloat((data.getInt32(6, true) / 100.0).toFixed(2)); // correct scale factor
|
||||
break;
|
||||
case MSPCodes.MSP_SONAR:
|
||||
SENSOR_DATA.sonar = data.getInt32(0, true);
|
||||
|
@ -1177,12 +1174,8 @@ var mspHelper = (function (gui) {
|
|||
PID_ADVANCED.rollPitchItermIgnoreRate = data.getUint16(0, true);
|
||||
PID_ADVANCED.yawItermIgnoreRate = data.getUint16(2, true);
|
||||
PID_ADVANCED.yawPLimit = data.getUint16(4, true);
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
|
||||
PID_ADVANCED.dtermSetpointWeight = data.getUint8(9);
|
||||
PID_ADVANCED.pidSumLimit = data.getUint16(10, true);
|
||||
}
|
||||
|
||||
PID_ADVANCED.dtermSetpointWeight = data.getUint8(9);
|
||||
PID_ADVANCED.pidSumLimit = data.getUint16(10, true);
|
||||
PID_ADVANCED.axisAccelerationLimitRollPitch = data.getUint16(13, true);
|
||||
PID_ADVANCED.axisAccelerationLimitYaw = data.getUint16(15, true);
|
||||
break;
|
||||
|
@ -2016,15 +2009,9 @@ var mspHelper = (function (gui) {
|
|||
buffer.push(0); //BF: currentProfile->pidProfile.vbatPidCompensation
|
||||
buffer.push(0); //BF: currentProfile->pidProfile.setpointRelaxRatio
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
|
||||
buffer.push(PID_ADVANCED.dtermSetpointWeight);
|
||||
buffer.push(lowByte(PID_ADVANCED.pidSumLimit));
|
||||
buffer.push(highByte(PID_ADVANCED.pidSumLimit));
|
||||
} else {
|
||||
buffer.push(0);
|
||||
buffer.push(0); // reserved
|
||||
buffer.push(0); // reserved
|
||||
}
|
||||
buffer.push(PID_ADVANCED.dtermSetpointWeight);
|
||||
buffer.push(lowByte(PID_ADVANCED.pidSumLimit));
|
||||
buffer.push(highByte(PID_ADVANCED.pidSumLimit));
|
||||
|
||||
buffer.push(0); //BF: currentProfile->pidProfile.itermThrottleGain
|
||||
|
||||
|
@ -2837,35 +2824,19 @@ var mspHelper = (function (gui) {
|
|||
};
|
||||
|
||||
self.loadNavPosholdConfig = function (callback) {
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
|
||||
MSP.send_message(MSPCodes.MSP_NAV_POSHOLD, false, false, callback);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
MSP.send_message(MSPCodes.MSP_NAV_POSHOLD, false, false, callback);
|
||||
};
|
||||
|
||||
self.saveNavPosholdConfig = function (callback) {
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
|
||||
MSP.send_message(MSPCodes.MSP_SET_NAV_POSHOLD, mspHelper.crunch(MSPCodes.MSP_SET_NAV_POSHOLD), false, callback);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
MSP.send_message(MSPCodes.MSP_SET_NAV_POSHOLD, mspHelper.crunch(MSPCodes.MSP_SET_NAV_POSHOLD), false, callback);
|
||||
};
|
||||
|
||||
self.loadPositionEstimationConfig = function (callback) {
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
|
||||
MSP.send_message(MSPCodes.MSP_POSITION_ESTIMATION_CONFIG, false, false, callback);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
MSP.send_message(MSPCodes.MSP_POSITION_ESTIMATION_CONFIG, false, false, callback);
|
||||
};
|
||||
|
||||
self.savePositionEstimationConfig = function (callback) {
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
|
||||
MSP.send_message(MSPCodes.MSP_SET_POSITION_ESTIMATION_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_POSITION_ESTIMATION_CONFIG), false, callback);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
MSP.send_message(MSPCodes.MSP_SET_POSITION_ESTIMATION_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_POSITION_ESTIMATION_CONFIG), false, callback);
|
||||
};
|
||||
|
||||
self.loadCalibrationData = function (callback) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue