only: isEtbMode const

This commit is contained in:
rusefi 2024-05-04 12:08:16 -04:00
parent 11d88c2812
commit f7184751d0
3 changed files with 5 additions and 5 deletions

View File

@ -50,7 +50,7 @@ public:
virtual void setWastegatePosition(percent_t pos) = 0;
virtual void update() = 0;
virtual void autoCalibrateTps() = 0;
virtual bool isEtbMode() = 0;
virtual bool isEtbMode() const = 0;
virtual const pid_state_s& getPidState() const = 0;

View File

@ -38,7 +38,7 @@ public:
// Called when the configuration may have changed. Controller will
// reset if necessary.
void onConfigurationChange(pid_s* previousConfiguration);
// Print this throttle's status.
void showStatus();
@ -98,7 +98,7 @@ private:
* @return true if OK, false if should be disabled
*/
bool checkStatus();
bool isEtbMode() {
bool isEtbMode() const override {
return m_function == DC_Throttle1 || m_function == DC_Throttle2;
}
@ -124,7 +124,7 @@ private:
// These are set to correct order of magnitude starting points
// so we converge more quickly on the correct values
float m_a = 8;
float m_tu = 0.1f;
float m_tu = 0.1f;
uint8_t m_autotuneCounter = 0;
uint8_t m_autotuneCurrentParam = 0;

View File

@ -20,7 +20,7 @@ public:
// IEtbController mocks
MOCK_METHOD(void, reset, (), (override));
MOCK_METHOD(bool, isEtbMode, (), (override));
MOCK_METHOD(bool, isEtbMode, (), (const, override));
MOCK_METHOD(void, update, (), (override));
MOCK_METHOD(bool, init, (dc_function_e function, DcMotor* motor, pid_s* pidParameters, const ValueProvider3D* pedalMap, bool initializeThrottles), (override));
MOCK_METHOD(void, setIdlePosition, (percent_t pos), (override));