[wpimath] LinearSystemLoop: Add extern templates for common cases

This commit is contained in:
Peter Johnson
2022-04-29 23:42:52 -07:00
parent dac1429aa9
commit e28776d361
2 changed files with 22 additions and 1 deletions

View File

@@ -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