mirror of https://github.com/rusefi/rusefi-1.git
32 lines
651 B
C++
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
|
|
}
|