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:
parent
7002db2122
commit
d83fbc27d9
4 changed files with 1 additions and 20 deletions
|
@ -52,9 +52,6 @@ typedef enum {
|
||||||
DEBUG_NOTCH,
|
DEBUG_NOTCH,
|
||||||
DEBUG_NAV_LANDING_DETECTOR,
|
DEBUG_NAV_LANDING_DETECTOR,
|
||||||
DEBUG_FW_CLIMB_RATE_TO_ALTITUDE,
|
DEBUG_FW_CLIMB_RATE_TO_ALTITUDE,
|
||||||
DEBUG_RANGEFINDER,
|
|
||||||
DEBUG_RANGEFINDER_QUALITY,
|
|
||||||
DEBUG_PITOT,
|
|
||||||
DEBUG_AGL,
|
DEBUG_AGL,
|
||||||
DEBUG_FLOW_RAW,
|
DEBUG_FLOW_RAW,
|
||||||
DEBUG_SBUS,
|
DEBUG_SBUS,
|
||||||
|
|
|
@ -69,7 +69,7 @@ tables:
|
||||||
- name: i2c_speed
|
- name: i2c_speed
|
||||||
values: ["400KHZ", "800KHZ", "100KHZ", "200KHZ"]
|
values: ["400KHZ", "800KHZ", "100KHZ", "200KHZ"]
|
||||||
- name: debug_modes
|
- 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
|
- name: async_mode
|
||||||
values: ["NONE", "GYRO", "ALL"]
|
values: ["NONE", "GYRO", "ALL"]
|
||||||
- name: aux_operator
|
- name: aux_operator
|
||||||
|
|
|
@ -208,11 +208,9 @@ uint32_t pitotUpdate(void)
|
||||||
case PITOTMETER_NEEDS_CALCULATION:
|
case PITOTMETER_NEEDS_CALCULATION:
|
||||||
pitot.dev.get(&pitot.dev);
|
pitot.dev.get(&pitot.dev);
|
||||||
pitot.dev.calculate(&pitot.dev, &pitotPressure, &pitotTemperature);
|
pitot.dev.calculate(&pitot.dev, &pitotPressure, &pitotTemperature);
|
||||||
DEBUG_SET(DEBUG_PITOT, 0, pitotPressure);
|
|
||||||
if (pitotmeterConfig()->use_median_filtering) {
|
if (pitotmeterConfig()->use_median_filtering) {
|
||||||
pitotPressure = applyPitotmeterMedianFilter(pitotPressure);
|
pitotPressure = applyPitotmeterMedianFilter(pitotPressure);
|
||||||
}
|
}
|
||||||
DEBUG_SET(DEBUG_PITOT, 1, pitotPressure);
|
|
||||||
state = PITOTMETER_NEEDS_SAMPLES;
|
state = PITOTMETER_NEEDS_SAMPLES;
|
||||||
return pitot.dev.delay;
|
return pitot.dev.delay;
|
||||||
break;
|
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);
|
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);
|
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;
|
pitot.airSpeed = indicatedAirspeed * 100;
|
||||||
} else {
|
} else {
|
||||||
performPitotCalibrationCycle();
|
performPitotCalibrationCycle();
|
||||||
|
|
|
@ -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 {
|
else {
|
||||||
// Bad configuration
|
// Bad configuration
|
||||||
|
@ -337,9 +329,6 @@ bool rangefinderProcess(float cosTiltAngle)
|
||||||
rangefinder.calculatedAltitude = rangefinder.rawAltitude * cosTiltAngle;
|
rangefinder.calculatedAltitude = rangefinder.rawAltitude * cosTiltAngle;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_SET(DEBUG_RANGEFINDER, 1, rangefinder.rawAltitude);
|
|
||||||
DEBUG_SET(DEBUG_RANGEFINDER, 2, rangefinder.calculatedAltitude);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue