2020-09-02 12:39:50 -07:00
|
|
|
/**
|
|
|
|
* @file tcu.cpp
|
|
|
|
* @brief Base classes for gear selection and transmission control
|
|
|
|
*
|
|
|
|
* @date Aug 31, 2020
|
|
|
|
* @author David Holdeman, (c) 2020
|
|
|
|
*/
|
|
|
|
|
2021-07-25 22:05:17 -07:00
|
|
|
#include "pch.h"
|
|
|
|
|
2020-09-02 12:39:50 -07:00
|
|
|
#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
|
2021-12-07 17:18:47 -08:00
|
|
|
engine->outputChannels.tcuCurrentGear = getCurrentGear();
|
2020-09-02 12:39:50 -07:00
|
|
|
#endif
|
|
|
|
}
|