mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 07:03:33 +08:00
run astyle
This commit is contained in:
committed by
Lorenz Meier
parent
cca2807ff0
commit
42e8fe159f
@@ -251,10 +251,12 @@ static int frsky_telemetry_thread_main(int argc, char *argv[])
|
|||||||
orb_copy(ORB_ID(sensor_combined), sensor_sub, &raw);
|
orb_copy(ORB_ID(sensor_combined), sensor_sub, &raw);
|
||||||
|
|
||||||
static float filtered_alt = NAN;
|
static float filtered_alt = NAN;
|
||||||
|
|
||||||
if (isnan(filtered_alt)) {
|
if (isnan(filtered_alt)) {
|
||||||
filtered_alt = raw.baro_alt_meter[0];
|
filtered_alt = raw.baro_alt_meter[0];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
filtered_alt = .05f * raw.baro_alt_meter[0] + (1.0f -.05f) * filtered_alt;
|
filtered_alt = .05f * raw.baro_alt_meter[0] + (1.0f - .05f) * filtered_alt;
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow a minimum of 500usec before reply
|
// allow a minimum of 500usec before reply
|
||||||
|
|||||||
Reference in New Issue
Block a user