GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 33.3% 1 / 0 / 3
Functions: 50.0% 1 / 0 / 2
Branches: -% 0 / 0 / 0
Decisions: -% 0 / - / 0

firmware/controllers/sensors/converters/sensor_converter_func.h
Line Branch Decision Exec Source
1 #pragma once
2
3 #include "sensor.h"
4
5 struct SensorConverter {
6 // Trying to copy a converter func by value is almost guaranteed to be a bug - disallow it
7 SensorConverter(const SensorConverter&) = delete;
8 // ...but doing so requires explicitly declaring the default constructor, so do that too.
9 64 SensorConverter() = default;
10
11 virtual SensorResult convert(float raw) const = 0;
12 virtual void showInfo(float testRawValue) const {
13 // Unused base - nothing to print
14 (void)testRawValue;
15 }
16 };
17