Skip to content

Commit

Permalink
Merge pull request #191 from emuflight/fix_gps_rescue
Browse files Browse the repository at this point in the history
Fix gps rescue/ dynamic filter toggle / dynamic_notch_min_hz min value
  • Loading branch information
loutwice authored May 19, 2020
2 parents 0809918 + 97df716 commit 9b55783
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
22 changes: 13 additions & 9 deletions src/js/msp/MSPCodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ var MSPCodes = {
MSP_GPS_CONFIG: 132,
MSP_COMPASS_CONFIG: 133,
MSP_GPS_RESCUE: 135,

MSP_GPS_RESCUE_PIDS: 136,
MSP_STATUS_EX: 150,

MSP_UID: 160,
Expand Down Expand Up @@ -146,7 +146,17 @@ var MSPCodes = {
MSP_SET_MOTOR_CONFIG: 222,
MSP_SET_GPS_CONFIG: 223,
MSP_SET_COMPASS_CONFIG: 224,
MSP_SET_GPS_RESCUE: 230,

MSP_FAST_KALMAN: 225,
MSP_SET_FAST_KALMAN: 226,
MSP_IMUF_CONFIG: 227,
MSP_SET_IMUF_CONFIG: 228,
MSP_IMUF_INFO: 229,
MSP_EMUF: 231,
MSP_SET_EMUF: 232,

MSP_SET_GPS_RESCUE: 233,
MSP_SET_GPS_RESCUE_PIDS: 234,

MSP_MODE_RANGES_EXTRA: 238,
MSP_SET_ACC_TRIM: 239,
Expand All @@ -163,11 +173,5 @@ var MSPCodes = {
MSP_DEBUGMSG: 253, // Not used
MSP_DEBUG: 254,

MSP_FAST_KALMAN: 225,
MSP_SET_FAST_KALMAN: 226,
MSP_IMUF_CONFIG: 227,
MSP_SET_IMUF_CONFIG: 228,
MSP_IMUF_INFO: 229,
MSP_EMUF: 231,
MSP_SET_EMUF: 232,

};
2 changes: 1 addition & 1 deletion src/js/msp/MSPHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ MspHelper.prototype.process_data = function(dataHandler) {

break;
case MSPCodes.MSP_GPS_RESCUE:
GPS_RESCUE.angle = data.readU16();
GPS_RESCUE.angle = data.readU16();
GPS_RESCUE.initialAltitude = data.readU16();
GPS_RESCUE.descentDistance = data.readU16();
GPS_RESCUE.rescueGroundspeed = data.readU16();
Expand Down
2 changes: 1 addition & 1 deletion src/js/tabs/pid_tuning.js
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ TABS.pid_tuning.initialize = function(callback) {
FILTER_CONFIG.witchcraft_yaw = parseFloat($('.smartDTermWitchBox input[name="witchcraftYaw"]').val());
}

if ( semver.gte(CONFIG.apiVersion, "1.47.0")) {
if ( FEATURE_CONFIG.features.isEnabled('DYNAMIC_FILTER') && semver.gte(CONFIG.apiVersion, "1.47.0")) {
FILTER_CONFIG.dynamic_gyro_notch_q = parseFloat($('.pid_filter input[name="MatrixNotchQ"]').val());
FILTER_CONFIG.dynamic_gyro_notch_min_hz = parseFloat($('.pid_filter input[name="MatrixNotchMin"]').val());
}
Expand Down
4 changes: 2 additions & 2 deletions src/tabs/pid_tuning.html
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@

<tr class="matrixFilter">
<td>
<input type="number" class="nonProfile" name="MatrixNotchMin" step="1" min="1" max="1000"/>
<input type="number" class="nonProfile" name="MatrixNotchMin" step="1" min="30" max="1000"/>
</td>
<td>
<div>
Expand All @@ -1163,7 +1163,7 @@
</div>
</td>
</tr>

</table>
</div>

Expand Down

0 comments on commit 9b55783

Please sign in to comment.