aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2014-08-23 18:49:00 +0200
committerJulian Oes <julian@oes.ch>2014-08-23 18:49:00 +0200
commit6480747c69203f70b4f28d3a357f49e05df89c85 (patch)
tree7a4bed87e47ffa8470b27b65c79998fb50ff5a1c /src
parentc6fb75f66fa94444d07056f271980e3f05008f94 (diff)
downloadpx4-firmware-6480747c69203f70b4f28d3a357f49e05df89c85.tar.gz
px4-firmware-6480747c69203f70b4f28d3a357f49e05df89c85.tar.bz2
px4-firmware-6480747c69203f70b4f28d3a357f49e05df89c85.zip
Revert "airspeed_calibration: stop talking about Pa and and hashtags"
This reverts commit c6fb75f66fa94444d07056f271980e3f05008f94.
Diffstat (limited to 'src')
-rw-r--r--src/drivers/meas_airspeed/meas_airspeed.cpp8
-rw-r--r--src/modules/commander/airspeed_calibration.cpp18
2 files changed, 11 insertions, 15 deletions
diff --git a/src/drivers/meas_airspeed/meas_airspeed.cpp b/src/drivers/meas_airspeed/meas_airspeed.cpp
index bcdf4670a..c136c6641 100644
--- a/src/drivers/meas_airspeed/meas_airspeed.cpp
+++ b/src/drivers/meas_airspeed/meas_airspeed.cpp
@@ -232,8 +232,6 @@ MEASAirspeed::collect()
* tubes are connected backwards */
float diff_press_pa = diff_press_pa_raw;
- warnx("diff preasure: %.4f", (double)diff_press_pa);
-
/*
note that we return both the absolute value with offset
applied and a raw value without the offset applied. This
@@ -261,9 +259,9 @@ MEASAirspeed::collect()
report.differential_pressure_filtered_pa = _filter.apply(diff_press_pa);
/* the dynamics of the filter can make it overshoot into the negative range */
- //if (report.differential_pressure_filtered_pa < 0.0f) {
- // report.differential_pressure_filtered_pa = _filter.reset(diff_press_pa);
- //}
+ if (report.differential_pressure_filtered_pa < 0.0f) {
+ report.differential_pressure_filtered_pa = _filter.reset(diff_press_pa);
+ }
report.differential_pressure_raw_pa = diff_press_pa_raw;
report.max_differential_pressure_pa = _max_differential_pressure_pa;
diff --git a/src/modules/commander/airspeed_calibration.cpp b/src/modules/commander/airspeed_calibration.cpp
index 339b11bbe..0e58c68b6 100644
--- a/src/modules/commander/airspeed_calibration.cpp
+++ b/src/modules/commander/airspeed_calibration.cpp
@@ -180,13 +180,11 @@ int do_airspeed_calibration(int mavlink_fd)
return ERROR;
}
- mavlink_log_critical(mavlink_fd, "Offset of %d Pascal", (int)diff_pres_offset);
+ mavlink_log_critical(mavlink_fd, "Offset of %d Pa, create airflow now!", (int)diff_pres_offset);
/* wait 500 ms to ensure parameter propagated through the system */
usleep(500 * 1000);
- mavlink_log_critical(mavlink_fd, "Create airflow now");
-
calibration_counter = 0;
const unsigned maxcount = 3000;
@@ -206,18 +204,18 @@ int do_airspeed_calibration(int mavlink_fd)
calibration_counter++;
if (fabsf(diff_pres.differential_pressure_raw_pa) < 50.0f) {
- if (calibration_counter % 500 == 0) {
- mavlink_log_info(mavlink_fd, "Create airflow! (%d, wanted: 50 Pa)",
- (int)diff_pres.differential_pressure_raw_pa);
+ if (calibration_counter % 100 == 0) {
+ mavlink_log_critical(mavlink_fd, "Missing airflow! (%d, wanted: 50 Pa, #h101)",
+ (int)diff_pres.differential_pressure_raw_pa);
}
continue;
}
/* do not allow negative values */
if (diff_pres.differential_pressure_raw_pa < 0.0f) {
- mavlink_log_critical(mavlink_fd, "Swap static and dynamic ports!");
- mavlink_log_info(mavlink_fd, "ERROR: Negative pressure difference detected! (%d Pa)",
- (int)diff_pres.differential_pressure_raw_pa);
+ mavlink_log_info(mavlink_fd, "negative pressure: ERROR (%d Pa)",
+ (int)diff_pres.differential_pressure_raw_pa);
+ mavlink_log_critical(mavlink_fd, "%d Pa: swap static and dynamic ports!", (int)diff_pres.differential_pressure_raw_pa);
close(diff_pres_sub);
/* the user setup is wrong, wipe the calibration to force a proper re-calibration */
@@ -238,7 +236,7 @@ int do_airspeed_calibration(int mavlink_fd)
mavlink_log_info(mavlink_fd, CAL_FAILED_MSG, sensor_name);
return ERROR;
} else {
- mavlink_log_info(mavlink_fd, "Positive pressure: OK (%d Pa)",
+ mavlink_log_info(mavlink_fd, "positive pressure: OK (%d Pa)",
(int)diff_pres.differential_pressure_raw_pa);
break;
}