sensor API progress, I promise to be careful
This commit is contained in:
parent
a5a8e4538a
commit
80066add40
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue