mirror of https://github.com/ArduPilot/ardupilot
AP_Common: stop setting terrain pointer in test_location
Also enable/disable as required for testing
This commit is contained in:
parent
0a068d4d4b
commit
fc2338612e
|
@ -212,6 +212,7 @@ TEST(Location, Tests)
|
|||
EXPECT_EQ(Location::AltFrame::ABOVE_TERRAIN, test_location3.get_alt_frame());
|
||||
|
||||
// No TERRAIN, NO HOME, NO ORIGIN
|
||||
AP::terrain()->set_enabled(false);
|
||||
for (auto current_frame = Location::AltFrame::ABSOLUTE;
|
||||
current_frame <= Location::AltFrame::ABOVE_TERRAIN;
|
||||
current_frame = static_cast<Location::AltFrame>(
|
||||
|
@ -267,7 +268,7 @@ TEST(Location, Tests)
|
|||
}
|
||||
}
|
||||
// NO Origin
|
||||
Location::set_terrain(&vehicle.terrain);
|
||||
AP::terrain()->set_enabled(true);
|
||||
for (auto current_frame = Location::AltFrame::ABSOLUTE;
|
||||
current_frame <= Location::AltFrame::ABOVE_TERRAIN;
|
||||
current_frame = static_cast<Location::AltFrame>(
|
||||
|
|
Loading…
Reference in New Issue