| Line | Branch | Decision | Exec | Source |
|---|---|---|---|---|
| 1 | #pragma once | |||
| 2 | ||||
| 3 | #include "sensor.h" | |||
| 4 | ||||
| 5 | class RedundantFordTps final : public Sensor | |||
| 6 | { | |||
| 7 | public: | |||
| 8 | RedundantFordTps( | |||
| 9 | SensorType outputType, | |||
| 10 | SensorType firstSensor, | |||
| 11 | SensorType secondSensor | |||
| 12 | ); | |||
| 13 | ||||
| 14 | void configure(float maxDifference, float secondaryMaximum); | |||
| 15 | ||||
| 16 | SensorResult get() const override; | |||
| 17 | ||||
| 18 | 1 | bool isRedundant() const override { | ||
| 19 | 1 | return true; | ||
| 20 | } | |||
| 21 | ||||
| 22 | void showInfo(const char* sensorName) const override; | |||
| 23 | ||||
| 24 | private: | |||
| 25 | // The two sensors we interpret to form one redundant sensor | |||
| 26 | const SensorType m_first; | |||
| 27 | const SensorType m_second; | |||
| 28 | ||||
| 29 | // How far apart do we allow the sensors to be before reporting an issue? | |||
| 30 | float m_maxDifference = 0; | |||
| 31 | ||||
| 32 | // At what primary % does the secondary hit 100%? | |||
| 33 | float m_secondaryMaximum = 0; | |||
| 34 | }; | |||
| 35 |