rusEFI
The most advanced open source ECU
|
#include <electronic_throttle_impl.h>
Public Member Functions | |
bool | init (dc_function_e function, DcMotor *motor, pid_s *pidParameters, const ValueProvider3D *pedalMap) override |
void | setIdlePosition (percent_t pos) override |
void | setWastegatePosition (percent_t pos) override |
void | reset (const char *reason) override |
void | update () override |
void | onConfigurationChange (pid_s *previousConfiguration) |
void | showStatus () |
expected< percent_t > | observePlant () override |
expected< percent_t > | getSetpoint () override |
expected< percent_t > | getSetpointEtb () |
expected< percent_t > | getSetpointWastegate () const |
expected< percent_t > | getSetpointIdleValve () const |
expected< percent_t > | getOpenLoop (percent_t target) override |
expected< percent_t > | getClosedLoop (percent_t setpoint, percent_t observation) override |
expected< percent_t > | getClosedLoopAutotune (percent_t setpoint, percent_t actualThrottlePosition) |
dc_function_e | getFunction () const |
void | checkJam (percent_t setpoint, percent_t observation) |
void | setOutput (expected< percent_t > outputValue) override |
const pid_state_s & | getPidState () const override |
virtual percent_t | getThrottleTrim (float, percent_t) const |
float | getCurrentTarget () const override |
bool | isEtbMode () const override |
void | setLuaAdjustment (percent_t adjustment) override |
float | getLuaAdjustment () const |
![]() | |
virtual void | autoCalibrateTps (bool reportToTs=true) |
![]() | |
void | update () |
Protected Member Functions | |
DcMotor * | getMotor () |
Protected Attributes | |
bool | hadTpsError = false |
bool | hadPpsError = false |
Private Member Functions | |
bool | checkStatus () |
Private Attributes | |
dc_function_e | m_function = DC_None |
SensorType | m_positionSensor = SensorType::Invalid |
DcMotor * | m_motor = nullptr |
Pid | m_pid |
bool | m_shouldResetPid = false |
ErrorAccumulator | m_targetErrorAccumulator |
Timer | m_jamDetectTimer |
const ValueProvider3D * | m_pedalProvider = nullptr |
float | m_idlePosition = 0 |
bool | m_isAutotune = false |
bool | m_lastIsPositive = false |
Timer | m_cycleTimer |
float | m_minCycleTps = 0 |
float | m_maxCycleTps = 0 |
float | m_a = 8 |
float | m_tu = 0.1f |
uint8_t | m_autotuneCounter = 0 |
uint8_t | m_autotuneCurrentParam = 0 |
Timer | m_luaAdjustmentTimer |
efitimeus_t | lastTickUs |
Definition at line 28 of file electronic_throttle_impl.h.
Definition at line 690 of file electronic_throttle.cpp.
Referenced by getClosedLoop().
|
private |
Definition at line 593 of file electronic_throttle.cpp.
Referenced by update().
|
overridevirtual |
Implements ClosedLoopController< percent_t, percent_t >.
Definition at line 525 of file electronic_throttle.cpp.
expected< percent_t > EtbController::getClosedLoopAutotune | ( | percent_t | setpoint, |
percent_t | actualThrottlePosition | ||
) |
Definition at line 430 of file electronic_throttle.cpp.
Referenced by getClosedLoop().
|
inlineoverridevirtual |
Implements IEtbController.
Definition at line 72 of file electronic_throttle_impl.h.
|
inline |
Definition at line 57 of file electronic_throttle_impl.h.
float EtbController::getLuaAdjustment | ( | ) | const |
positive adjustment opens TPS, negative closes TPS
Definition at line 392 of file electronic_throttle.cpp.
Referenced by getSetpointEtb(), and getSetpointWastegate().
|
inlineprotected |
Definition at line 90 of file electronic_throttle_impl.h.
Implements ClosedLoopController< percent_t, percent_t >.
Definition at line 406 of file electronic_throttle.cpp.
|
inlineoverridevirtual |
|
overridevirtual |
Implements ClosedLoopController< percent_t, percent_t >.
Definition at line 262 of file electronic_throttle.cpp.
expected< percent_t > EtbController::getSetpointEtb | ( | ) |
Definition at line 303 of file electronic_throttle.cpp.
Referenced by getSetpoint().
expected< percent_t > EtbController::getSetpointIdleValve | ( | ) | const |
Definition at line 276 of file electronic_throttle.cpp.
Referenced by getSetpoint().
expected< percent_t > EtbController::getSetpointWastegate | ( | ) | const |
Definition at line 285 of file electronic_throttle.cpp.
Referenced by getSetpoint().
Reimplemented in EtbController2.
Definition at line 67 of file electronic_throttle_impl.h.
Referenced by getSetpointEtb().
|
overridevirtual |
Implements IEtbController.
Definition at line 170 of file electronic_throttle.cpp.
|
inlineoverridevirtual |
Implements IEtbController.
Definition at line 76 of file electronic_throttle_impl.h.
Referenced by checkStatus(), init(), setOutput(), and update().
|
overridevirtual |
Implements ClosedLoopController< percent_t, percent_t >.
Definition at line 248 of file electronic_throttle.cpp.
void EtbController::onConfigurationChange | ( | pid_s * | previousConfiguration | ) |
Definition at line 235 of file electronic_throttle.cpp.
Referenced by onConfigurationChangeElectronicThrottleCallback().
|
overridevirtual |
Implements IEtbController.
Definition at line 223 of file electronic_throttle.cpp.
|
overridevirtual |
Implements IEtbController.
Definition at line 254 of file electronic_throttle.cpp.
|
overridevirtual |
Implements IEtbController.
Definition at line 384 of file electronic_throttle.cpp.
|
overridevirtual |
Implements ClosedLoopController< percent_t, percent_t >.
Definition at line 551 of file electronic_throttle.cpp.
|
overridevirtual |
Implements IEtbController.
Definition at line 258 of file electronic_throttle.cpp.
void EtbController::showStatus | ( | ) |
Definition at line 244 of file electronic_throttle.cpp.
|
overridevirtual |
Implements IEtbController.
Definition at line 665 of file electronic_throttle.cpp.
|
protected |
Definition at line 88 of file electronic_throttle_impl.h.
Referenced by checkStatus().
|
protected |
Definition at line 87 of file electronic_throttle_impl.h.
Referenced by checkStatus().
|
private |
Definition at line 134 of file electronic_throttle_impl.h.
|
private |
Definition at line 124 of file electronic_throttle_impl.h.
Referenced by getClosedLoopAutotune().
|
private |
Definition at line 128 of file electronic_throttle_impl.h.
Referenced by getClosedLoopAutotune().
|
private |
Definition at line 129 of file electronic_throttle_impl.h.
Referenced by getClosedLoopAutotune().
|
private |
Definition at line 118 of file electronic_throttle_impl.h.
Referenced by getClosedLoop(), and getClosedLoopAutotune().
|
private |
Definition at line 93 of file electronic_throttle_impl.h.
Referenced by checkStatus(), getFunction(), getOpenLoop(), getSetpoint(), init(), isEtbMode(), and setOutput().
|
private |
Definition at line 111 of file electronic_throttle_impl.h.
Referenced by getSetpointEtb(), getSetpointIdleValve(), and setIdlePosition().
|
private |
Definition at line 114 of file electronic_throttle_impl.h.
Referenced by checkStatus(), getClosedLoop(), and getSetpointEtb().
|
private |
Definition at line 106 of file electronic_throttle_impl.h.
Referenced by checkJam().
|
private |
Definition at line 117 of file electronic_throttle_impl.h.
Referenced by getClosedLoopAutotune().
|
private |
Definition at line 132 of file electronic_throttle_impl.h.
Referenced by getLuaAdjustment(), and setLuaAdjustment().
|
private |
Definition at line 120 of file electronic_throttle_impl.h.
Referenced by getClosedLoopAutotune().
|
private |
Definition at line 119 of file electronic_throttle_impl.h.
Referenced by getClosedLoopAutotune().
|
private |
Definition at line 95 of file electronic_throttle_impl.h.
Referenced by getMotor(), init(), onConfigurationChange(), setOutput(), and update().
|
private |
Definition at line 109 of file electronic_throttle_impl.h.
Referenced by getSetpointEtb(), and init().
|
private |
Definition at line 96 of file electronic_throttle_impl.h.
Referenced by checkStatus(), getClosedLoop(), getPidState(), init(), onConfigurationChange(), and showStatus().
|
private |
Definition at line 94 of file electronic_throttle_impl.h.
Referenced by checkStatus(), init(), and observePlant().
|
private |
Definition at line 97 of file electronic_throttle_impl.h.
Referenced by getClosedLoop(), onConfigurationChange(), and reset().
|
private |
Definition at line 99 of file electronic_throttle_impl.h.
Referenced by getClosedLoop(), and init().
|
private |
Definition at line 125 of file electronic_throttle_impl.h.
Referenced by getClosedLoopAutotune().
float EtbController::prevOutput = 0 |
Definition at line 84 of file electronic_throttle_impl.h.