rusefi/firmware/controllers/gear_controller.cpp

31 lines
663 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
tsOutputChannels.tcuDesiredGear = getDesiredGear();
#endif
}