AP_Math: use past_interval_finish_line and line_path_proportion from Location

This commit is contained in:
Pierre Kancir 2019-04-12 10:23:03 +02:00 committed by Andrew Tridgell
parent 8168b3c8e4
commit 1854681e09

View File

@ -55,7 +55,7 @@ static void test_passed_waypoint(void)
struct Location loc = location_from_point(test_points[i].location);
struct Location wp1 = location_from_point(test_points[i].wp1);
struct Location wp2 = location_from_point(test_points[i].wp2);
if (location_passed_point(loc, wp1, wp2) != test_points[i].passed) {
if (loc.past_interval_finish_line(wp1, wp2) != test_points[i].passed) {
hal.console->printf("Failed waypoint test %u\n", (unsigned)i);
return;
}