TCU usability #2118
This commit is contained in:
parent
d181d64a4a
commit
bbf161752e
|
@ -2,20 +2,18 @@
|
|||
#include "efi_gpio.h"
|
||||
#include "engine_configuration.h"
|
||||
|
||||
EXTERN_CONFIG;
|
||||
|
||||
OutputPin tcuSolenoids[TCU_SOLENOID_COUNT];
|
||||
EXTERN_ENGINE;
|
||||
|
||||
void SimpleTransmissionController::init() {
|
||||
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) {
|
||||
for (size_t i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) {
|
||||
#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
|
||||
}
|
||||
setCurrentGear(gear);
|
||||
|
|
|
@ -207,6 +207,8 @@ public:
|
|||
InjectorOutputPin injectors[INJECTION_PIN_COUNT];
|
||||
IgnitionOutputPin coils[IGNITION_PIN_COUNT];
|
||||
NamedOutputPin auxValve[AUX_DIGITAL_VALVE_COUNT];
|
||||
OutputPin tcuSolenoids[TCU_SOLENOID_COUNT];
|
||||
|
||||
private:
|
||||
void startInjectionPins();
|
||||
void startIgnitionPins();
|
||||
|
|
Loading…
Reference in New Issue