mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 15:43:34 +08:00
double promotion warning fix or ignore per module
This commit is contained in:
committed by
Lorenz Meier
parent
11d348ec4f
commit
cf74166801
@@ -229,7 +229,7 @@ bool Geofence::checkAll(double lat, double lon, float altitude)
|
||||
|
||||
const double home_lat = _navigator->get_home_position()->lat;
|
||||
const double home_lon = _navigator->get_home_position()->lon;
|
||||
const double home_alt = _navigator->get_home_position()->alt;
|
||||
const float home_alt = _navigator->get_home_position()->alt;
|
||||
|
||||
float dist_xy = -1.0f;
|
||||
float dist_z = -1.0f;
|
||||
|
||||
@@ -452,8 +452,8 @@ MissionBlock::issue_command(const mission_item_s &item)
|
||||
vcmd.param2 = item.params[1];
|
||||
vcmd.param3 = item.params[2];
|
||||
vcmd.param4 = item.params[3];
|
||||
vcmd.param5 = item.params[4];
|
||||
vcmd.param6 = item.params[5];
|
||||
vcmd.param5 = (double)item.params[4];
|
||||
vcmd.param6 = (double)item.params[5];
|
||||
|
||||
if (item.nav_cmd == NAV_CMD_DO_SET_ROI_LOCATION && item.altitude_is_relative) {
|
||||
vcmd.param7 = item.params[6] + _navigator->get_home_position()->alt;
|
||||
@@ -644,8 +644,8 @@ MissionBlock::set_land_item(struct mission_item_s *item, bool at_current_locatio
|
||||
|
||||
/* use current position */
|
||||
if (at_current_location) {
|
||||
item->lat = NAN; //descend at current position
|
||||
item->lon = NAN; //descend at current position
|
||||
item->lat = (double)NAN; //descend at current position
|
||||
item->lon = (double)NAN; //descend at current position
|
||||
item->yaw = _navigator->get_local_position()->yaw;
|
||||
|
||||
} else {
|
||||
|
||||
@@ -522,8 +522,8 @@ MissionFeasibilityChecker::checkDistancesBetweenWaypoints(const mission_s &missi
|
||||
return true;
|
||||
}
|
||||
|
||||
double last_lat = NAN;
|
||||
double last_lon = NAN;
|
||||
double last_lat = (double)NAN;
|
||||
double last_lon = (double)NAN;
|
||||
|
||||
/* Go through all waypoints */
|
||||
for (size_t i = 0; i < mission.count; i++) {
|
||||
|
||||
@@ -407,8 +407,8 @@ Navigator::run()
|
||||
|
||||
} else {
|
||||
// If one of them is non-finite, reset both
|
||||
rep->current.lat = NAN;
|
||||
rep->current.lon = NAN;
|
||||
rep->current.lat = (double)NAN;
|
||||
rep->current.lon = (double)NAN;
|
||||
}
|
||||
|
||||
rep->current.alt = cmd.param7;
|
||||
|
||||
Reference in New Issue
Block a user