mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-02 10:23:25 +08:00
AP_NavEKF3: pin P references in non-writing files to const
Change their define so they don't use the mutable original, only the name through a const-cast pointer. There are no writes to the covariance matrix in these files, so nothing else needs changing.
This commit is contained in:
committed by
Andrew Tridgell
parent
c114fb1254
commit
2125137117
@@ -4,7 +4,7 @@
|
||||
#include "AP_NavEKF3_core.h"
|
||||
#include <AP_DAL/AP_DAL.h>
|
||||
|
||||
#define P (Pmut)
|
||||
#define P (const_cast<const Matrix24 &>(Pmut))
|
||||
|
||||
/********************************************************
|
||||
* RESET FUNCTIONS *
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wnarrowing"
|
||||
|
||||
#define P (Pmut)
|
||||
#define P (const_cast<const Matrix24 &>(Pmut))
|
||||
|
||||
void NavEKF3_core::Log_Write_XKF1(uint64_t time_us) const
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <AP_DAL/AP_DAL.h>
|
||||
#include <AP_InternalError/AP_InternalError.h>
|
||||
|
||||
#define P (Pmut)
|
||||
#define P (const_cast<const Matrix24 &>(Pmut))
|
||||
|
||||
#if AP_RANGEFINDER_ENABLED
|
||||
/********************************************************
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <GCS_MAVLink/GCS.h>
|
||||
#include <AP_DAL/AP_DAL.h>
|
||||
|
||||
#define P (Pmut)
|
||||
#define P (const_cast<const Matrix24 &>(Pmut))
|
||||
|
||||
/********************************************************
|
||||
* RESET FUNCTIONS *
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <AP_DAL/AP_DAL.h>
|
||||
#include <GCS_MAVLink/GCS.h>
|
||||
|
||||
#define P (Pmut)
|
||||
#define P (const_cast<const Matrix24 &>(Pmut))
|
||||
|
||||
// Check basic filter health metrics and return a consolidated health status
|
||||
bool NavEKF3_core::healthy(void) const
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <AP_DAL/AP_DAL.h>
|
||||
|
||||
#define P (Pmut)
|
||||
#define P (const_cast<const Matrix24 &>(Pmut))
|
||||
|
||||
// initialise state:
|
||||
void NavEKF3_core::BeaconFusion::InitialiseVariables()
|
||||
|
||||
Reference in New Issue
Block a user