less hacky testing implementation
This commit is contained in:
parent
535cd04de7
commit
675cce3854
|
@ -12,11 +12,11 @@ public:
|
||||||
|
|
||||||
void init(bool usePwm, SimplePwm* pwm, OutputPin* outputPin, const ValueProvider3D* table, const gppwm_channel* config);
|
void init(bool usePwm, SimplePwm* pwm, OutputPin* outputPin, const ValueProvider3D* table, const gppwm_channel* config);
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
private:
|
|
||||||
float getOutput() const;
|
float getOutput() const;
|
||||||
void setOutput(float result);
|
void setOutput(float result);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
// Store the current state so we can apply hysteresis
|
// Store the current state so we can apply hysteresis
|
||||||
bool m_state = false;
|
bool m_state = false;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ public:
|
||||||
|
|
||||||
void showInfo(Logging* logger, float testRawValue) const override;
|
void showInfo(Logging* logger, float testRawValue) const override;
|
||||||
|
|
||||||
private:
|
|
||||||
// Steinhart-Hart coefficients
|
// Steinhart-Hart coefficients
|
||||||
float m_a = 0;
|
float m_a = 0;
|
||||||
float m_b = 0;
|
float m_b = 0;
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
using ::testing::Return;
|
using ::testing::Return;
|
||||||
|
|
||||||
// This lets us inspect private state from unit tests
|
// This lets us inspect private state from unit tests
|
||||||
#define private public
|
// cool hack but probably should not be used, even conditional private/public compilation is more obvious
|
||||||
|
//#define private public
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These are usually used with ASSETR_NEAR(val1, val2, abs_error)
|
* These are usually used with ASSETR_NEAR(val1, val2, abs_error)
|
||||||
|
|
Loading…
Reference in New Issue