refactoring: method name
This commit is contained in:
parent
6729347ac1
commit
6ec6b0b82a
|
@ -22,7 +22,7 @@ void initVbatt();
|
||||||
void initMaf();
|
void initMaf();
|
||||||
void initMap();
|
void initMap();
|
||||||
void initTps();
|
void initTps();
|
||||||
void initOilPressure();
|
void initFluidPressure();
|
||||||
void initThermistors();
|
void initThermistors();
|
||||||
void initCanSensors();
|
void initCanSensors();
|
||||||
void initLambda();
|
void initLambda();
|
||||||
|
@ -39,7 +39,7 @@ void initInputShaftSpeedSensor();
|
||||||
void deinitVbatt();
|
void deinitVbatt();
|
||||||
void deinitTps();
|
void deinitTps();
|
||||||
void deinitThermistors();
|
void deinitThermistors();
|
||||||
void deinitOilPressure();
|
void deinitFluidPressure();
|
||||||
void deInitFlexSensor();
|
void deInitFlexSensor();
|
||||||
void deInitVehicleSpeedSensor();
|
void deInitVehicleSpeedSensor();
|
||||||
void deinitTurbochargerSpeedSensor();
|
void deinitTurbochargerSpeedSensor();
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void initFluidPressure(LinearFunc& func, FunctionalSensor& sensor, const
|
||||||
sensor.Register();
|
sensor.Register();
|
||||||
}
|
}
|
||||||
|
|
||||||
void initOilPressure() {
|
void initFluidPressure() {
|
||||||
initFluidPressure(oilpSensorFunc, oilpSensor, engineConfiguration->oilPressure, 10);
|
initFluidPressure(oilpSensorFunc, oilpSensor, engineConfiguration->oilPressure, 10);
|
||||||
initFluidPressure(fuelPressureFuncLow, fuelPressureSensorLow, engineConfiguration->lowPressureFuel, 10);
|
initFluidPressure(fuelPressureFuncLow, fuelPressureSensorLow, engineConfiguration->lowPressureFuel, 10);
|
||||||
initFluidPressure(fuelPressureFuncHigh, fuelPressureSensorHigh, engineConfiguration->highPressureFuel, 100);
|
initFluidPressure(fuelPressureFuncHigh, fuelPressureSensorHigh, engineConfiguration->highPressureFuel, 100);
|
||||||
|
@ -67,7 +67,7 @@ void initOilPressure() {
|
||||||
injectorPressure.Register();
|
injectorPressure.Register();
|
||||||
}
|
}
|
||||||
|
|
||||||
void deinitOilPressure() {
|
void deinitFluidPressure() {
|
||||||
AdcSubscription::UnsubscribeSensor(oilpSensor);
|
AdcSubscription::UnsubscribeSensor(oilpSensor);
|
||||||
AdcSubscription::UnsubscribeSensor(fuelPressureSensorLow);
|
AdcSubscription::UnsubscribeSensor(fuelPressureSensorLow);
|
||||||
AdcSubscription::UnsubscribeSensor(fuelPressureSensorHigh);
|
AdcSubscription::UnsubscribeSensor(fuelPressureSensorHigh);
|
||||||
|
|
|
@ -53,7 +53,7 @@ void initNewSensors() {
|
||||||
initVbatt();
|
initVbatt();
|
||||||
initMap();
|
initMap();
|
||||||
initTps();
|
initTps();
|
||||||
initOilPressure();
|
initFluidPressure();
|
||||||
initThermistors();
|
initThermistors();
|
||||||
initLambda();
|
initLambda();
|
||||||
initFlexSensor();
|
initFlexSensor();
|
||||||
|
@ -88,7 +88,7 @@ void stopSensors() {
|
||||||
deInitOldAnalogInputs();
|
deInitOldAnalogInputs();
|
||||||
|
|
||||||
deinitTps();
|
deinitTps();
|
||||||
deinitOilPressure();
|
deinitFluidPressure();
|
||||||
deinitVbatt();
|
deinitVbatt();
|
||||||
deinitThermistors();
|
deinitThermistors();
|
||||||
deInitFlexSensor();
|
deInitFlexSensor();
|
||||||
|
@ -102,7 +102,7 @@ void stopSensors() {
|
||||||
void reconfigureSensors() {
|
void reconfigureSensors() {
|
||||||
initMap();
|
initMap();
|
||||||
initTps();
|
initTps();
|
||||||
initOilPressure();
|
initFluidPressure();
|
||||||
initVbatt();
|
initVbatt();
|
||||||
initThermistors();
|
initThermistors();
|
||||||
initFlexSensor();
|
initFlexSensor();
|
||||||
|
|
|
@ -171,7 +171,7 @@ TEST(SensorInit, OilPressure) {
|
||||||
engineConfiguration->oilPressure.value1 = 0;
|
engineConfiguration->oilPressure.value1 = 0;
|
||||||
engineConfiguration->oilPressure.value2 = 1000;
|
engineConfiguration->oilPressure.value2 = 1000;
|
||||||
|
|
||||||
initOilPressure();
|
initFluidPressure();
|
||||||
|
|
||||||
// Ensure the sensors were registered
|
// Ensure the sensors were registered
|
||||||
auto s = const_cast<Sensor*>(Sensor::getSensorOfType(SensorType::OilPressure));
|
auto s = const_cast<Sensor*>(Sensor::getSensorOfType(SensorType::OilPressure));
|
||||||
|
|
Loading…
Reference in New Issue