38 void check_path(
const std::vector<Vector3f> &correct_path,
const char* test_name, uint32_t time_us);
52 uint32_t reference_time, run_time;
96 void check_path(
const std::vector<Vector3f>& correct_path,
const char* test_name, uint32_t time_us)
103 bool points_match =
true;
104 uint16_t failure_index = 0;
105 for (uint16_t i = 0; i < points_to_compare; i++) {
108 points_match =
false;
113 hal.
console->
printf(
"%s: %s time:%u us\n", test_name, (num_points_match && points_match) ?
"success" :
"fail", (
unsigned)time_us);
120 for (uint16_t j = failure_index; j < points_to_compare; j++) {
122 hal.
console->
printf(
" expected point %d to be %4.2f,%4.2f,%4.2f, got %4.2f,%4.2f,%4.2f\n",
124 (
double)correct_path[j].
x,
125 (
double)correct_path[j].y,
126 (
double)correct_path[j].z,
127 (
double)smartrtl_point.
x,
128 (
double)smartrtl_point.
y,
129 (
double)smartrtl_point.
z
static DummyVehicle vehicle
AP_SerialManager serial_manager
std::vector< Vector3f > test_path_complete
AP_HAL::UARTDriver * console
virtual bool is_initialized()=0
bool request_thorough_cleanup(ThoroughCleanupType clean_type=THOROUGH_CLEAN_DEFAULT)
static AP_SerialManager serial_manager
const Vector3f & get_point(uint16_t index) const
std::vector< Vector3f > test_path_after_adding
virtual void delay(uint16_t ms)=0
void run_background_cleanup()
virtual void printf(const char *,...) FMT_PRINTF(2
void check_path(const std::vector< Vector3f > &correct_path, const char *test_name, uint32_t time_us)
std::vector< Vector3f > test_path_before
void update(bool position_ok, bool save_position)
uint16_t get_num_points() const
static AP_InertialSensor ins
AP_BoardConfig board_config
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
void set_home(bool position_ok)
Catch-all header that defines all supported RangeFinder classes.
AP_HAL::Scheduler * scheduler
std::vector< Vector3f > test_path_after_simplifying