sensor API progress, I promise to be careful

This commit is contained in:
Andrey 2023-02-20 23:01:17 -05:00
parent a5a8e4538a
commit 80066add40
1 changed files with 0 additions and 3 deletions

View File

@ -155,13 +155,10 @@ void Sensor::unregister() {
return &s_sensorRegistry[index];
}
#if EFI_UNIT_TEST
// scary nullable return result thus you probably do not need this in production code
/*static*/ const Sensor *Sensor::getSensorOfType(SensorType type) {
auto entry = getEntryForType(type);
return entry ? entry->getSensor() : nullptr;
}
#endif // EFI_UNIT_TEST
/**
* @returns NotNull: sensor result or UnexpectedCode::Configuration if sensor is not registered