[EPIC] [Feature Request] Transmission Control #1454
This commit is contained in:
parent
cd161f1b79
commit
bf5802ee29
|
@ -367,5 +367,8 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 0, 0
|
|||
pid_status_s etbStatus
|
||||
pid_status_s boostStatus
|
||||
|
||||
uint8_t[76 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0
|
||||
uint16_t auxSpeed1;"aux speed 1";"s",1, 0, 0, 0, 0
|
||||
uint16_t auxSpeed2;"aux speed 2";"s",1, 0, 0, 0, 0
|
||||
|
||||
uint8_t[72 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0
|
||||
end_struct
|
||||
|
|
|
@ -32,6 +32,7 @@ void initBaro();
|
|||
void initAuxSensors();
|
||||
void initVehicleSpeedSensor();
|
||||
void initTurbochargerSpeedSensor();
|
||||
void initAuxSpeedSensors();
|
||||
|
||||
// Sensor reconfiguration
|
||||
void deinitVbatt();
|
||||
|
@ -42,3 +43,4 @@ void deInitFlexSensor();
|
|||
void deInitVehicleSpeedSensor();
|
||||
void deinitTurbochargerSpeedSensor();
|
||||
void deinitMap();
|
||||
void deinitAuxSpeedSensors();
|
||||
|
|
|
@ -4,4 +4,30 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "init.h"
|
||||
#include "frequency_sensor.h"
|
||||
|
||||
static FrequencySensor auxSpeed1(SensorType::AuxSpeed1, MS2NT(500), 0.05f);
|
||||
static FrequencySensor auxSpeed2(SensorType::AuxSpeed2, MS2NT(500), 0.05f);
|
||||
|
||||
static class : public SensorConverter {
|
||||
public:
|
||||
SensorResult convert(float frequency) const override {
|
||||
auto hz = frequency;
|
||||
|
||||
auto rpm = hz * 60;
|
||||
|
||||
return rpm;
|
||||
}
|
||||
} converter;
|
||||
|
||||
|
||||
void initAuxSpeedSensors() {
|
||||
auxSpeed1.initIfValid(engineConfiguration->auxSpeedSensorInputPin[0], converter);
|
||||
auxSpeed2.initIfValid(engineConfiguration->auxSpeedSensorInputPin[1], converter);
|
||||
}
|
||||
|
||||
void deinitAuxSpeedSensors() {
|
||||
auxSpeed1.deInit();
|
||||
auxSpeed2.deInit();
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void initNewSensors() {
|
|||
initAuxSensors();
|
||||
initVehicleSpeedSensor();
|
||||
initTurbochargerSpeedSensor();
|
||||
initAuxSpeedSensors();
|
||||
|
||||
#if !EFI_UNIT_TEST
|
||||
initFuelLevel();
|
||||
|
@ -83,6 +84,7 @@ void stopSensors() {
|
|||
deInitFlexSensor();
|
||||
deInitVehicleSpeedSensor();
|
||||
deinitTurbochargerSpeedSensor();
|
||||
deinitAuxSpeedSensors();
|
||||
deinitMap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue