rusEFI
The most advanced open source ECU
|
Electronic Throttle driver.
PPS=pedal position sensor=AcceleratorPedal TPS=throttle position sensor, this one is inside ETB=electronic throttle body
Limited user documentation at https://github.com/rusefi/rusefi/wiki/HOWTO_electronic_throttle_body
ETB is controlled according to pedal position input (pedal position sensor is a potentiometer) pedal 0% means pedal not pressed / idle pedal 100% means pedal all the way down (not TPS - not the one you can calibrate in TunerStudio)
See also pid.cpp
This file is part of rusEfi - see http://rusefi.com
rusEfi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file electronic_throttle.cpp.
Variables | |
static pedal2tps_t | pedal2tpsMap {"p2t"} |
static Map3D< ETB2_TRIM_SIZE, ETB2_TRIM_SIZE, int8_t, uint8_t, uint8_t > | throttle2TrimTable {"t2t"} |
static Map3D< TRACTION_CONTROL_ETB_DROP_SLIP_SIZE, TRACTION_CONTROL_ETB_DROP_SPEED_SIZE, int8_t, uint16_t, uint8_t > | tcEtbDropTable {"tce"} |
constexpr float | etbPeriodSeconds = 1.0f / ETB_LOOP_FREQUENCY |
static const float | hardCodedetbHitachiBiasBins [8] = {0.0, 19.0, 21.0, 22.0, 23.0, 25.0, 30.0, 100.0} |
static const float | hardCodedetbHitachiBiasValues [8] = {-18.0, -17.0, -15.0, 0.0, 16.0, 20.0, 20.0, 20.0} |
int | ebtResetCounter |
EtbImpl< EtbController1 > | etb1 |
EtbImpl< EtbController2 > | etb2 (throttle2TrimTable) |
static EtbController * | etbControllers [] = { &etb1, &etb2 } |
static DcThread dcThread | CCM_OPTIONAL |
static const float | boschBiasBins [] |
static const float | boschBiasValues [] |
static const float | defaultBiasBins [] |
static const float | defaultBiasValues [] |
void blinkEtbErrorCodes | ( | bool | blinkPhase | ) |
Definition at line 733 of file electronic_throttle.cpp.
Referenced by updateTunerStudioState().
Definition at line 299 of file electronic_throttle.cpp.
Referenced by EtbController::getSetpointEtb().
void doInitElectronicThrottle | ( | bool | isStartupInit | ) |
Unexpected electronic throttle start-up position is worth a critical error
Definition at line 898 of file electronic_throttle.cpp.
Referenced by configureRusefiLuaHooks(), initElectronicThrottle(), and EtbController::onConfigurationChange().
void etbAutocal | ( | dc_function_e | function, |
bool | reportToTs | ||
) |
Definition at line 774 of file electronic_throttle.cpp.
Referenced by handleCommandX14(), and initElectronicThrottle().
Definition at line 789 of file electronic_throttle.cpp.
void etbPidReset | ( | ) |
Definition at line 763 of file electronic_throttle.cpp.
|
static |
Definition at line 136 of file electronic_throttle.cpp.
Referenced by EtbImpl< TBase >::doAutocal().
|
static |
Definition at line 127 of file electronic_throttle.cpp.
Referenced by EtbImpl< TBase >::doAutocal().
|
static |
Definition at line 153 of file electronic_throttle.cpp.
Referenced by EtbImpl< TBase >::doAutocal().
|
static |
Definition at line 145 of file electronic_throttle.cpp.
Referenced by EtbImpl< TBase >::doAutocal().
|
static |
Definition at line 87 of file electronic_throttle.cpp.
Referenced by EtbController::init().
|
static |
Definition at line 97 of file electronic_throttle.cpp.
Referenced by EtbController::init().
|
static |
Definition at line 107 of file electronic_throttle.cpp.
Referenced by EtbImpl< TBase >::doAutocal().
|
static |
Definition at line 117 of file electronic_throttle.cpp.
Referenced by EtbImpl< TBase >::doAutocal().
const electronic_throttle_s * getLiveData | ( | size_t | idx | ) |
Definition at line 1084 of file electronic_throttle.cpp.
|
static |
Definition at line 887 of file electronic_throttle.cpp.
Referenced by doInitElectronicThrottle().
float getSanitizedPedal | ( | ) |
Definition at line 291 of file electronic_throttle.cpp.
Referenced by EtbController::getSetpointEtb().
void initElectronicThrottle | ( | ) |
Definition at line 952 of file electronic_throttle.cpp.
Referenced by commonInitEngineController().
PUBLIC_API_WEAK bool isBoardAllowingLackOfPps | ( | ) |
Definition at line 166 of file electronic_throttle.cpp.
Referenced by EtbController::checkStatus(), and EtbController::init().
void onConfigurationChangeElectronicThrottleCallback | ( | engine_configuration_s * | previousConfiguration | ) |
Definition at line 863 of file electronic_throttle.cpp.
Referenced by incrementGlobalConfigurationVersion().
PUBLIC_API_WEAK ValueProvider3D * pedal2TpsProvider | ( | ) |
Definition at line 894 of file electronic_throttle.cpp.
Referenced by doInitElectronicThrottle().
void setBoschVAGETB | ( | ) |
Definition at line 808 of file electronic_throttle.cpp.
Referenced by commonPassatB6(), and hellen121_vag_boardDefaultConfiguration().
void setBoschVNH2SP30Curve | ( | ) |
Definition at line 821 of file electronic_throttle.cpp.
Referenced by setEtbTestConfiguration().
void setDefaultEtbBiasCurve | ( | ) |
Definition at line 876 of file electronic_throttle.cpp.
Referenced by setDefaultEngineConfiguration().
void setDefaultEtbParameters | ( | ) |
Definition at line 826 of file electronic_throttle.cpp.
Referenced by setDefaultEngineConfiguration().
void setEtbIdlePosition | ( | percent_t | pos | ) |
Definition at line 996 of file electronic_throttle.cpp.
Referenced by applyIACposition().
void setEtbLuaAdjustment | ( | percent_t | pos | ) |
Definition at line 1014 of file electronic_throttle.cpp.
Referenced by configureRusefiLuaHooks().
void setEtbWastegatePosition | ( | percent_t | pos | ) |
Definition at line 1005 of file electronic_throttle.cpp.
Referenced by BoostController::setOutput().
void setEwgLuaAdjustment | ( | percent_t | pos | ) |
Definition at line 1028 of file electronic_throttle.cpp.
Referenced by configureRusefiLuaHooks().
void setHitachiEtbBiasBins | ( | ) |
Definition at line 82 of file electronic_throttle.cpp.
Referenced by setHitachiEtbCalibration().
void setHitachiEtbCalibration | ( | ) |
Definition at line 1046 of file electronic_throttle.cpp.
Referenced by setProteusHitachiEtbDefaults().
void setProteusHitachiEtbDefaults | ( | ) |
Definition at line 1066 of file electronic_throttle.cpp.
Referenced by setEngineBMW_M73_Proteus().
void setToyota89281_33010_pedal_position_sensor | ( | ) |
Definition at line 1042 of file electronic_throttle.cpp.
Referenced by setHitachiEtbCalibration().
void unregisterEtbPins | ( | ) |
Definition at line 883 of file electronic_throttle.cpp.
Referenced by EnginePins::unregisterPins().
|
static |
This specific throttle has default position of about 7% open
Definition at line 801 of file electronic_throttle.cpp.
Referenced by setBoschVNH2SP30Curve().
|
static |
Definition at line 804 of file electronic_throttle.cpp.
Referenced by setBoschVNH2SP30Curve().
|
static |
Definition at line 758 of file electronic_throttle.cpp.
|
static |
Definition at line 869 of file electronic_throttle.cpp.
Referenced by proteusLuaDemo(), and setDefaultEtbBiasCurve().
|
static |
Definition at line 872 of file electronic_throttle.cpp.
Referenced by proteusLuaDemo(), and setDefaultEtbBiasCurve().
int ebtResetCounter |
Definition at line 220 of file electronic_throttle.cpp.
Referenced by etbPidReset(), and EtbController::reset().
EtbImpl<EtbController1> etb1 |
Things running on a timer (instead of a thread) don't participate it the RTOS's thread priority system, and operate essentially "first come first serve", which risks starvation. Since ETB is a safety critical device, we need the hard RTOS guarantee that it will be scheduled over other less important tasks.
Definition at line 727 of file electronic_throttle.cpp.
EtbImpl< EtbController2 > etb2(throttle2TrimTable) | ( | throttle2TrimTable | ) |
|
static |
Definition at line 730 of file electronic_throttle.cpp.
Referenced by blinkEtbErrorCodes(), etbAutocal(), etbGetState(), getLiveData(), initElectronicThrottle(), onConfigurationChangeElectronicThrottleCallback(), setEtbLuaAdjustment(), and setEwgLuaAdjustment().
|
constexpr |
Definition at line 71 of file electronic_throttle.cpp.
Referenced by EtbController::init().
|
static |
Definition at line 77 of file electronic_throttle.cpp.
Referenced by setHitachiEtbBiasBins().
|
static |
Definition at line 79 of file electronic_throttle.cpp.
Referenced by setHitachiEtbBiasBins().
|
static |
Definition at line 67 of file electronic_throttle.cpp.
Referenced by initElectronicThrottle(), and pedal2TpsProvider().
|
static |
Definition at line 69 of file electronic_throttle.cpp.
Referenced by EtbController::getSetpointEtb(), and initElectronicThrottle().
|
static |
Definition at line 68 of file electronic_throttle.cpp.
Referenced by initElectronicThrottle().