mirror of https://github.com/rusefi/rusefi-1.git
31 lines
669 B
C++
31 lines
669 B
C++
#include "pch.h"
|
|
|
|
#include "gear_controller.h"
|
|
|
|
void GearControllerBase::init() {
|
|
transmissionController.init();
|
|
}
|
|
|
|
void GearControllerBase::update() {
|
|
// We are responsible for telling the transmission controller
|
|
// what gear we want.
|
|
transmissionController.update(getDesiredGear());
|
|
// Post state to TS
|
|
postState();
|
|
}
|
|
|
|
gear_e GearControllerBase::getDesiredGear() const {
|
|
return desiredGear;
|
|
}
|
|
|
|
gear_e GearControllerBase::setDesiredGear(gear_e gear) {
|
|
desiredGear = gear;
|
|
return getDesiredGear();
|
|
}
|
|
|
|
void GearControllerBase::postState() {
|
|
#if EFI_TUNER_STUDIO
|
|
engine->outputChannels.tcuDesiredGear = getDesiredGear();
|
|
#endif
|
|
}
|