1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 16:25:26 +03:00

Debug cleanup for not used/not needed data

This commit is contained in:
Pawel Spychalski (DzikuVx) 2018-05-03 13:51:57 +02:00
parent 7002db2122
commit d83fbc27d9
4 changed files with 1 additions and 20 deletions

View file

@ -52,9 +52,6 @@ typedef enum {
DEBUG_NOTCH,
DEBUG_NAV_LANDING_DETECTOR,
DEBUG_FW_CLIMB_RATE_TO_ALTITUDE,
DEBUG_RANGEFINDER,
DEBUG_RANGEFINDER_QUALITY,
DEBUG_PITOT,
DEBUG_AGL,
DEBUG_FLOW_RAW,
DEBUG_SBUS,

View file

@ -69,7 +69,7 @@ tables:
- name: i2c_speed
values: ["400KHZ", "800KHZ", "100KHZ", "200KHZ"]
- name: debug_modes
values: ["NONE", "GYRO", "NOTCH", "NAV_LANDING", "FW_ALTITUDE", "RFIND", "RFIND_Q", "PITOT", "AGL", "FLOW_RAW", "SBUS", "FPORT", "ALWAYS"]
values: ["NONE", "GYRO", "NOTCH", "NAV_LANDING", "FW_ALTITUDE", "AGL", "FLOW_RAW", "SBUS", "FPORT", "ALWAYS"]
- name: async_mode
values: ["NONE", "GYRO", "ALL"]
- name: aux_operator

View file

@ -208,11 +208,9 @@ uint32_t pitotUpdate(void)
case PITOTMETER_NEEDS_CALCULATION:
pitot.dev.get(&pitot.dev);
pitot.dev.calculate(&pitot.dev, &pitotPressure, &pitotTemperature);
DEBUG_SET(DEBUG_PITOT, 0, pitotPressure);
if (pitotmeterConfig()->use_median_filtering) {
pitotPressure = applyPitotmeterMedianFilter(pitotPressure);
}
DEBUG_SET(DEBUG_PITOT, 1, pitotPressure);
state = PITOTMETER_NEEDS_SAMPLES;
return pitot.dev.delay;
break;
@ -252,9 +250,6 @@ int32_t pitotCalculateAirSpeed(void)
const float indicatedAirspeed_tmp = pitotmeterConfig()->pitot_scale * sqrtf(2.0f * fabsf(pitotPressure - pitotPressureZero) / AIR_DENSITY_SEA_LEVEL_15C);
indicatedAirspeed += pitotmeterConfig()->pitot_noise_lpf * (indicatedAirspeed_tmp - indicatedAirspeed);
DEBUG_SET(DEBUG_PITOT, 2, indicatedAirspeed_tmp);
DEBUG_SET(DEBUG_PITOT, 3, indicatedAirspeed);
pitot.airSpeed = indicatedAirspeed * 100;
} else {
performPitotCalibrationCycle();

View file

@ -311,14 +311,6 @@ bool rangefinderProcess(float cosTiltAngle)
}
}
DEBUG_SET(DEBUG_RANGEFINDER, 3, rangefinder.snr);
DEBUG_SET(DEBUG_RANGEFINDER_QUALITY, 0, rangefinder.rawAltitude);
DEBUG_SET(DEBUG_RANGEFINDER_QUALITY, 1, rangefinder.snrThresholdReached);
DEBUG_SET(DEBUG_RANGEFINDER_QUALITY, 2, rangefinder.dynamicDistanceThreshold);
DEBUG_SET(DEBUG_RANGEFINDER_QUALITY, 3, isSurfaceAltitudeValid());
}
else {
// Bad configuration
@ -337,9 +329,6 @@ bool rangefinderProcess(float cosTiltAngle)
rangefinder.calculatedAltitude = rangefinder.rawAltitude * cosTiltAngle;
}
DEBUG_SET(DEBUG_RANGEFINDER, 1, rangefinder.rawAltitude);
DEBUG_SET(DEBUG_RANGEFINDER, 2, rangefinder.calculatedAltitude);
return true;
}