TCU usability #2118
This commit is contained in:
parent
d181d64a4a
commit
bbf161752e
|
@ -2,20 +2,18 @@
|
||||||
#include "efi_gpio.h"
|
#include "efi_gpio.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
OutputPin tcuSolenoids[TCU_SOLENOID_COUNT];
|
|
||||||
|
|
||||||
void SimpleTransmissionController::init() {
|
void SimpleTransmissionController::init() {
|
||||||
for (size_t i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) {
|
for (size_t i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) {
|
||||||
tcuSolenoids[i].initPin("Transmission Solenoid", CONFIG(tcu_solenoid)[i], &CONFIG(tcu_solenoid_mode)[i]);
|
enginePins.tcuSolenoids[i].initPin("Transmission Solenoid", CONFIG(tcu_solenoid)[i], &CONFIG(tcu_solenoid_mode)[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleTransmissionController::update(gear_e gear) {
|
void SimpleTransmissionController::update(gear_e gear) {
|
||||||
for (size_t i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) {
|
for (size_t i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) {
|
||||||
#if ! EFI_UNIT_TEST
|
#if ! EFI_UNIT_TEST
|
||||||
tcuSolenoids[i].setValue(config->tcuSolenoidTable[i][static_cast<int>(gear) + 1]);
|
enginePins.tcuSolenoids[i].setValue(config->tcuSolenoidTable[i][static_cast<int>(gear) + 1]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
setCurrentGear(gear);
|
setCurrentGear(gear);
|
||||||
|
|
|
@ -207,6 +207,8 @@ public:
|
||||||
InjectorOutputPin injectors[INJECTION_PIN_COUNT];
|
InjectorOutputPin injectors[INJECTION_PIN_COUNT];
|
||||||
IgnitionOutputPin coils[IGNITION_PIN_COUNT];
|
IgnitionOutputPin coils[IGNITION_PIN_COUNT];
|
||||||
NamedOutputPin auxValve[AUX_DIGITAL_VALVE_COUNT];
|
NamedOutputPin auxValve[AUX_DIGITAL_VALVE_COUNT];
|
||||||
|
OutputPin tcuSolenoids[TCU_SOLENOID_COUNT];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void startInjectionPins();
|
void startInjectionPins();
|
||||||
void startIgnitionPins();
|
void startIgnitionPins();
|
||||||
|
|
Loading…
Reference in New Issue