rusefi-1/firmware/controllers/gear_controller.cpp

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
}