| Line | Branch | Decision | Exec | Source |
|---|---|---|---|---|
| 1 | #include "pch.h" | |||
| 2 | ||||
| 3 | #include "adc_subscription.h" | |||
| 4 | #include "fuel_level_sensor.h" | |||
| 5 | ||||
| 6 | static FuelLevelSensor fuelSensor(SensorType::FuelLevel, /* timeout = */ MS2NT(500)); | |||
| 7 | ||||
| 8 | 2 | void initFuelLevel() { | ||
| 9 | 2 | adc_channel_e channel = engineConfiguration->fuelLevelSensor; | ||
| 10 | ||||
| 11 |
1/2✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
|
1/2✓ Decision 'true' taken 2 times.
✗ Decision 'false' not taken.
|
2 | if (!isAdcChannelValid(channel)) { |
| 12 | 2 | return; | ||
| 13 | } | |||
| 14 | ||||
| 15 | // noisy data from fuel tank slosh is handled on an higher level | |||
| 16 | ✗ | AdcSubscription::SubscribeSensor(fuelSensor, channel, /*lowpassCutoff =*/ 100); | ||
| 17 | ✗ | fuelSensor.Register(); | ||
| 18 | } | |||
| 19 |