rusefi-1/firmware/controllers/tcu.cpp

32 lines
651 B
C++

/**
* @file tcu.cpp
* @brief Base classes for gear selection and transmission control
*
* @date Aug 31, 2020
* @author David Holdeman, (c) 2020
*/
#include "pch.h"
#include "tcu.h"
void TransmissionControllerBase::update(gear_e gear) {
setCurrentGear(gear);
postState();
}
gear_e TransmissionControllerBase::setCurrentGear(gear_e gear) {
currentGear = gear;
return getCurrentGear();
}
gear_e TransmissionControllerBase::getCurrentGear() const {
return currentGear;
}
void TransmissionControllerBase::postState() {
#if EFI_TUNER_STUDIO
engine->outputChannels.tcuCurrentGear = getCurrentGear();
#endif
}