|
7 | 7 |
|
8 | 8 | const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
9 | 9 |
|
10 |
| -class DummyVehicle { |
11 |
| -public: |
12 |
| - bool start_cmd(const AP_Mission::Mission_Command& cmd) { return true; }; |
13 |
| - bool verify_cmd(const AP_Mission::Mission_Command& cmd) { return true; }; |
14 |
| - void mission_complete() { }; |
15 |
| - AP_AHRS ahrs{AP_AHRS::FLAG_ALWAYS_USE_EKF}; |
16 |
| - |
17 |
| - AP_Mission mission{ |
18 |
| - FUNCTOR_BIND_MEMBER(&DummyVehicle::start_cmd, bool, const AP_Mission::Mission_Command &), |
19 |
| - FUNCTOR_BIND_MEMBER(&DummyVehicle::verify_cmd, bool, const AP_Mission::Mission_Command &), |
20 |
| - FUNCTOR_BIND_MEMBER(&DummyVehicle::mission_complete, void)}; |
21 |
| - AP_Terrain terrain; |
22 |
| -}; |
| 10 | +AP_AHRS ahrs{AP_AHRS::FLAG_ALWAYS_USE_EKF}; |
| 11 | +AP_Terrain terrain; |
23 | 12 |
|
24 | 13 | GCS_Dummy _gcs;
|
25 | 14 |
|
26 |
| -static DummyVehicle vehicle; |
27 |
| - |
28 | 15 | #define EXPECT_VECTOR2F_EQ(v1, v2) \
|
29 | 16 | do { \
|
30 | 17 | EXPECT_FLOAT_EQ(v1[0], v2[0]); \
|
@@ -210,7 +197,7 @@ TEST(Location, Tests)
|
210 | 197 | }
|
211 | 198 | }
|
212 | 199 | // NO TERRAIN, NO ORIGIN
|
213 |
| - EXPECT_TRUE(vehicle.ahrs.set_home(test_home)); |
| 200 | + EXPECT_TRUE(ahrs.set_home(test_home)); |
214 | 201 | for (auto current_frame = Location::AltFrame::ABSOLUTE;
|
215 | 202 | current_frame <= Location::AltFrame::ABOVE_TERRAIN;
|
216 | 203 | current_frame = static_cast<Location::AltFrame>(
|
@@ -340,7 +327,7 @@ TEST(Location, Sanitize)
|
340 | 327 | // we will sanitize test_loc with test_default_loc
|
341 | 328 | // test_home is just for reference
|
342 | 329 | const Location test_home{-35362938, 149165085, 100, Location::AltFrame::ABSOLUTE};
|
343 |
| - EXPECT_TRUE(vehicle.ahrs.set_home(test_home)); |
| 330 | + EXPECT_TRUE(ahrs.set_home(test_home)); |
344 | 331 | const Location test_default_loc{-35362938, 149165085, 200, Location::AltFrame::ABSOLUTE};
|
345 | 332 | Location test_loc;
|
346 | 333 | test_loc.set_alt_cm(0, Location::AltFrame::ABOVE_HOME);
|
|
0 commit comments