Browse Source

Merge branch 'master' into swissfang

sbg
Lorenz Meier 11 years ago
parent
commit
c9a92e6030
  1. 3
      ROMFS/px4fmu_common/init.d/3031_phantom
  2. 4
      src/drivers/sf0x/sf0x.cpp
  3. 2
      src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp

3
ROMFS/px4fmu_common/init.d/3031_phantom

@ -30,6 +30,9 @@ then @@ -30,6 +30,9 @@ then
param set FW_RR_P 0.08
param set FW_R_LIM 50
param set FW_R_RMAX 0
# Bottom of bay and nominal zero-pitch attitude differ
# the payload bay is pitched up about 7 degrees
param set SENS_BOARD_Y_OFF 7.0
fi
set MIXER phantom

4
src/drivers/sf0x/sf0x.cpp

@ -606,7 +606,7 @@ SF0X::collect() @@ -606,7 +606,7 @@ SF0X::collect()
si_units = strtod(_linebuf, &end);
/* we require at least four characters for a valid number */
if (end > _linebuf + 4) {
if (end > _linebuf + 3) {
valid = true;
} else {
si_units = -1.0f;
@ -615,7 +615,7 @@ SF0X::collect() @@ -615,7 +615,7 @@ SF0X::collect()
}
}
debug("val (float): %8.4f, raw: %s, valid: %s\n", (double)si_units, _linebuf, ((valid) ? "OK" : "NO"));
debug("val (float): %8.4f, raw: %s, valid: %s", (double)si_units, _linebuf, ((valid) ? "OK" : "NO"));
/* done with this chunk, resetting - even if invalid */
_linebuf_index = 0;

2
src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp

@ -823,7 +823,7 @@ float FixedwingPositionControl::get_relative_landingalt(float land_setpoint_alt, @@ -823,7 +823,7 @@ float FixedwingPositionControl::get_relative_landingalt(float land_setpoint_alt,
* the measurement is valid
* the estimated relative altitude (from global altitude estimate and landing waypoint) <= range_finder_use_relative_alt
*/
if (range_finder_use_relative_alt < 0 || !range_finder.valid || rel_alt_estimated > range_finder_use_relative_alt ) {
if (range_finder_use_relative_alt < 0 || !range_finder.valid || range_finder.distance > range_finder_use_relative_alt ) {
return rel_alt_estimated;
}

Loading…
Cancel
Save