mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpimath] LinearSystemLoop: Add extern templates for common cases
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wpi/SymbolExports.h>
|
||||
|
||||
#include "frc/EigenCore.h"
|
||||
#include "frc/controller/LinearPlantInversionFeedforward.h"
|
||||
#include "frc/controller/LinearQuadraticRegulator.h"
|
||||
@@ -210,7 +212,7 @@ class LinearSystemLoop {
|
||||
* Return the observer used internally.
|
||||
*/
|
||||
const KalmanFilter<States, Inputs, Outputs>& Observer() const {
|
||||
return m_observer;
|
||||
return *m_observer;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -282,4 +284,9 @@ class LinearSystemLoop {
|
||||
static constexpr int kOutputs = Outputs;
|
||||
};
|
||||
|
||||
extern template class EXPORT_TEMPLATE_DECLARE(WPILIB_DLLEXPORT)
|
||||
LinearSystemLoop<1, 1, 1>;
|
||||
extern template class EXPORT_TEMPLATE_DECLARE(WPILIB_DLLEXPORT)
|
||||
LinearSystemLoop<2, 1, 1>;
|
||||
|
||||
} // namespace frc
|
||||
|
||||
Reference in New Issue
Block a user