diff --git a/EKF/ekf_helper.cpp b/EKF/ekf_helper.cpp index bf9c9edfdd..09377f9537 100644 --- a/EKF/ekf_helper.cpp +++ b/EKF/ekf_helper.cpp @@ -319,7 +319,7 @@ void Ekf::get_heading_innov_var(float *heading_innov_var) // get GPS check status void Ekf::get_gps_check_status(uint16_t *val) { - memcpy(val, &_gps_check_fail_status, sizeof(uint16_t)); + *val = _gps_check_fail_status.value; } // get the state vector at the delayed time horizon