rusEFI
The most advanced open source ECU
|
Controllers package entry point code.
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 engine_controller.cpp.
Functions | |
void | initDataStructures () |
static void | doPeriodicSlowCallback () |
static void | resetAccel () |
void | initPeriodicEvents () |
char * | getPinNameByAdcChannel (const char *msg, adc_channel_e hwChannel, char *buffer, size_t bufferSize) |
static void | printSensorInfo () |
static void | getShort (int offset) |
static void | getByte (int offset) |
static void | setBit (const char *offsetStr, const char *bitStr, const char *valueStr) |
static void | setShort (const int offset, const int value) |
static void | setByte (const int offset, const int value) |
static void | getBit (int offset, int bit) |
static void | getInt (int offset) |
static void | setInt (const int offset, const int value) |
static void | getFloat (int offset) |
static void | setFloat (const char *offsetStr, const char *valueStr) |
static void | initConfigActions () |
void | commonInitEngineController () |
PUBLIC_API_WEAK bool | validateBoardConfig () |
bool | validateConfigOnStartUpOrBurn () |
void | commonEarlyInit () |
void | initRealHardwareEngineController () |
int | getRusEfiVersion (void) |
Variables | |
Engine ___engine | CCM_OPTIONAL |
Engine * | engine |
static PeriodicFastController | fastController |
static PeriodicSlowController | slowController |
static EngineStateBlinkingTask | engineStateBlinkingTask |
AdcDevice | fastAdc |
static volatile char | UNUSED_RAM_SIZE [RAM_UNUSED_SIZE] |
void commonEarlyInit | ( | ) |
Initialize hardware drivers
Definition at line 682 of file engine_controller.cpp.
Referenced by runRusEfiWithConfig().
void commonInitEngineController | ( | ) |
This has to go after 'enginePins.startPins()' in order to properly detect un-assigned output pins
Definition at line 418 of file engine_controller.cpp.
Referenced by initRealHardwareEngineController().
|
static |
rusEfi usually runs on hardware which halts execution while writing to internal flash, so we postpone writes to until engine is stopped. Writes in case of self-stimulation are fine.
todo: allow writing if 2nd bank of flash is used
Definition at line 185 of file engine_controller.cpp.
|
static |
this response is part of rusEfi console API
Definition at line 340 of file engine_controller.cpp.
Referenced by initConfigActions().
|
static |
this response is part of rusEfi console API
Definition at line 283 of file engine_controller.cpp.
Referenced by initConfigActions(), and setByte().
|
static |
this response is part of rusEfi console API
Definition at line 371 of file engine_controller.cpp.
Referenced by initConfigActions(), and setFloat().
|
static |
this response is part of rusEfi console API
Definition at line 351 of file engine_controller.cpp.
Referenced by initConfigActions(), and setInt().
char* getPinNameByAdcChannel | ( | const char * | msg, |
adc_channel_e | hwChannel, | ||
char * | buffer, | ||
size_t | bufferSize | ||
) |
Definition at line 240 of file engine_controller.cpp.
Referenced by AdcSubscription::PrintInfo(), printMAPInfo(), and printTpsSenser().
int getRusEfiVersion | ( | void | ) |
See also SIGNATURE_HASH
Definition at line 762 of file engine_controller.cpp.
Referenced by firmwareError(), handleGetVersion(), myerror(), printVersionForConsole(), readFromFlash(), sayHello(), and updateTunerStudioState().
|
static |
this response is part of rusEfi console API
Definition at line 272 of file engine_controller.cpp.
Referenced by initConfigActions(), and setShort().
|
static |
Definition at line 401 of file engine_controller.cpp.
Referenced by commonInitEngineController().
void initDataStructures | ( | ) |
Definition at line 109 of file engine_controller.cpp.
Referenced by runRusEfi().
void initPeriodicEvents | ( | ) |
Definition at line 235 of file engine_controller.cpp.
Referenced by runRusEfi().
void initRealHardwareEngineController | ( | ) |
Definition at line 723 of file engine_controller.cpp.
Referenced by runRusEfiWithConfig().
|
static |
Definition at line 259 of file engine_controller.cpp.
Referenced by commonInitEngineController().
|
static |
Definition at line 175 of file engine_controller.cpp.
Referenced by commonInitEngineController(), and doPeriodicSlowCallback().
|
static |
this response is part of rusEfi console API
Definition at line 294 of file engine_controller.cpp.
Referenced by initConfigActions().
|
static |
Definition at line 331 of file engine_controller.cpp.
Referenced by initConfigActions().
|
static |
Definition at line 382 of file engine_controller.cpp.
Referenced by initConfigActions().
|
static |
Definition at line 362 of file engine_controller.cpp.
Referenced by initConfigActions().
|
static |
Definition at line 322 of file engine_controller.cpp.
Referenced by initConfigActions().
PUBLIC_API_WEAK bool validateBoardConfig | ( | ) |
Definition at line 526 of file engine_controller.cpp.
Referenced by validateConfigOnStartUpOrBurn().
bool validateConfigOnStartUpOrBurn | ( | ) |
Definition at line 531 of file engine_controller.cpp.
Referenced by handleBurnCommand(), and runRusEfiWithConfig().
volatile char UNUSED_CCM_SIZE [CCM_UNUSED_SIZE] CCM_OPTIONAL |
Would love to pass reference to configuration object into constructor but C++ does allow attributes after parenthesized initializer
Definition at line 100 of file engine_controller.cpp.
Engine* engine |
Definition at line 104 of file engine_controller.cpp.
Referenced by WallFuel::adjust(), applyIACposition(), applyNonPersistentConfiguration(), applyPidSettings(), applyPinState(), assertTimeIsLinear(), RpmCalculator::assignRpmValue(), attachMsdSdCard(), auxPlainPinTurnOn(), blipIdle(), boardInitHardware(), brain_pin_markUsed(), HpfpQuantity::calcFuelPercent(), canDashboardHaltech(), canInfo(), RpmCalculator::checkIfSpinning(), TriggerCentral::checkIfTriggerConfigChanged(), EtbController::checkStatus(), TunerStudio::cmdOutputChannels(), commonInitEngineController(), completionCallback(), configureRusefiLuaHooks(), TriggerCentral::decodeMapCam(), AemXSeriesWideband::decodeRusefiDiag(), detectHellenBoardType(), IdleController::determinePhase(), disableTriggerStimulator(), disengageStarterIfNeeded(), doInitElectronicThrottle(), StepperMotorBase::doIteration(), doPeriodicSlowCallback(), emulatorApplyPinState(), enableExternalTriggerStimulator(), enableOrDisable(), enableTriggerStimulator(), etbAutocal(), etbPidReset(), executeTSCommand(), executorStatistics(), extIonCallback(), fastAdcErrorCB(), HpfpLobe::findNextLobe(), finishIdleTestIfNeeded(), fireSparkAndPrepareNextSchedule(), firmwareError(), fuelClosedLoopCorrection(), getAcrState(), getAdvance(), getAdvanceCorrections(), SpeedDensityAirmass::getAirmass(), getAirmassModel(), AngleBasedEvent::getAngleFromNow(), getBaseFuelMass(), getBoardId(), getBrainUsedPin(), getBrakePedalState(), VvtController::getClosedLoop(), BoostController::getClosedLoop(), AlternatorController::getClosedLoop(), IdleController::getClosedLoop(), EtbController::getClosedLoopAutotune(), getClutchDownState(), getClutchUpState(), getCoilDutyCycle(), getCrankingFuel(), getCrankingFuel3(), IdleController::getCrankingTaperFraction(), TriggerCentral::getCurrentEnginePhase(), getCurrentIgnitionMode(), getEngineRotationState(), getEngineState(), getExecutorInterface(), getFuelALSCorrection(), getFuelSchedule(), getIdlePosition(), IdleController::getIdlePosition(), IdleController::getIdleTimingAdjustment(), getIgnitionEvents(), getInjectionMass(), getInjectorDutyCycle(), getInjectorDutyCycleStage2(), ClosedLoopFuelCellImpl::getLambdaError(), getLimpManager(), getLiveData(), SpeedDensityAirmass::getMap(), LambdaMonitor::getMaxAllowedLambda(), getMultiSparkCount(), BoostController::getOpenLoop(), RpmCalculator::getOperationMode(), getOutputValueByName(), getPerCylinderFiringOrderOffset(), PrimeController::getPrimeDuration(), getRunningAdvance(), getRunningFuel(), IdleController::getRunningOpenLoop(), BoostController::getSetpoint(), VvtController::getSetpoint(), EtbController::getSetpointEtb(), EtbController::getSetpointIdleValve(), IgnitionState::getSparkDwell(), DfcoController::getState(), FanController::getState(), IdleController::getTargetRpm(), TpsAccelEnrichment::getTpsEnrichment(), getTriggerCentral(), getTunerStudioOutputChannels(), AirmassVeModelBase::getVe(), getWrappedAdvance(), grabPedalIsUp(), grabPedalIsWideOpen(), handleCommandX14(), handleFuel(), handleGetDataRequest(), handleShaftSignal(), TriggerCentral::handleShaftSignal(), handleTestCommand(), handleVvtCamSignal(), hipThread(), incrementGlobalConfigurationVersion(), Generic4TransmissionController::init(), Gm4l6xTransmissionController::init(), initAlternatorCtrl(), initAuxValves(), initBoostCtrl(), initDataStructures(), initDcMotor(), initElectronicThrottle(), initGearController(), initGpPwm(), initializeIgnitionActions(), initSpeedometer(), initStartStopButton(), initTachometer(), initVrThresholdPwm(), initVvtActuators(), is_F_OrOlder(), LambdaMonitorBase::isCurrentlyGood(), isMegaModuleRevision(), isTriggerErrorNow(), lua_getDigital(), lua_setDebug(), mainTriggerCallback(), mapAveragingAdcCallback(), mapAveragingTriggerCallback(), mountMmc(), myAlloc(), obdOnCanPacketRx(), VvtController::observePlant(), onConfigurationChangeTriggerCallback(), onEcuStartDoSomethingTriggerInputPins(), onFastAdcComplete(), HpfpController::onFastCallback(), WallFuelController::onFastCallback(), KnockControllerBase::onKnockSenseCompleted(), PrimeController::onPrimeStart(), RpmCalculator::onSlowCallback(), IdleController::onSlowCallback(), FanController::onSlowCallback(), FuelPumpController::onSlowCallback(), HarleyAcr::onSlowCallback(), MainRelayController::onSlowCallback(), TripOdometer::onSlowCallback(), IgnitionController::onSlowCallback(), SensorChecker::onSlowCallback(), onStartStopButtonToggle(), onTdcCallback(), PrimaryTriggerDecoder::onTriggerError(), onTriggerEventSparkLogic(), Engine::OnTriggerSynchronization(), InjectionEvent::onTriggerTooth(), overFireSparkAndPrepareNextSchedule(), Engine::periodicFastCallback(), EngineState::periodicFastCallback(), Engine::periodicSlowCallback(), CanWrite::PeriodicTask(), pokeAuxDigital(), populateFrame(), postCanState(), StepperMotorBase::postCurrentPosition(), GearControllerBase::postState(), Engine::preCalculate(), prepareCylinderIgnitionSchedule(), prepareIgnitionSchedule(), prepareOutputSignals(), printConfiguration(), printErrorCounters(), printUid(), processCanRxImu_BoschM5_10_RollX(), processCanRxImu_BoschM5_10_YawY(), processCanRxImu_BoschM5_10_Z(), processLastKnockEvent(), StepDirectionStepper::pulse(), readFromFlash(), readGppwmChannel(), recalculateAuxValveTiming(), CanStreamerState::receiveFrame(), refreshMapAveragingPreCalc(), reportLogicAnalyzerToTS(), resetAccel(), resetLua(), rpmShaftPositionCallback(), runBench(), runOneLua(), runRusEfi(), sayHello(), scheduleByAngle(), TriggerScheduler::scheduleEventsUntilNextTriggerTooth(), HpfpController::scheduleNextCycle(), scheduleOpen(), scheduleSparkEvent(), sendQcBenchAuxDigitalCounters(), sendQcBenchButtonCounters(), sendQcBenchEventCounters(), sendWidebandInfo(), SentDecoderThread(), setAltPFactor(), setBoardConfigOverrides(), setEngineType(), setEtbIdlePosition(), setEtbLuaAdjustment(), setEtbWastegatePosition(), IgnitionOutputPin::setHigh(), StepperMotorBase::setInitialPosition(), IgnitionOutputPin::setLow(), SetNextCompositeEntry(), EtbController::setOutput(), Generic4TransmissionController::setPcState(), setPin(), RpmCalculator::setRpmValue(), RpmCalculator::setSpinningUp(), RpmCalculator::setStopped(), setToothLogReady(), setTpsAccelLen(), setTriggerEmulatorRPM(), setTriggerType(), setValue(), setWholeTimingMapCmd(), shouldCorrect(), shouldUpdateCorrection(), slowAdcErrorCB(), slowStartStopButtonCallback(), startAveraging(), startBoostPin(), AdcDevice::startConversionI(), startDwellByTurningSparkPinHigh(), startIdleBench(), startIdleThread(), startKnockSampling(), startLua(), startPwm(), startSimulatedTriggerSignal(), startTriggerInputPins(), tdcMarkCallback(), THD_FUNCTION(), tle8888PostState(), tle8888startup(), triggerScopeDisable(), triggerScopeGetBuffer(), turnSparkPinHighStartCharging(), turnVvtPidOn(), undoIdleBlipIfNeeded(), InjectionEvent::update(), SimpleTransmissionController::update(), DynoView::update(), updateDevConsoleState(), updateEgtSensors(), updateFlags(), updateFuelCorrections(), updateFuelInfo(), updateFuelResults(), updateFuelSensors(), updateGppwm(), updateIgnition(), updateLambda(), updateMiscSensors(), updatePressures(), updateRawSensors(), updateSdCardLiveFlags(), EngineState::updateSparkSkip(), LimpManager::updateState(), Engine::updateSwitchInputs(), EngineState::updateTChargeK(), updateTempSensors(), updateThrottles(), Engine::updateTriggerWaveform(), updateTriggerWaveformIfNeeded(), updateTunerStudioState(), updateVehicleSpeed(), updateVvtSensors(), updateWarningCodes(), TriggerCentral::updateWaveform(), validateHardwareTimer(), warning(), watchDogBuddyCallback(), writeToFlashNow(), and CanTxMessage::~CanTxMessage().
|
static |
Definition at line 173 of file engine_controller.cpp.
Referenced by initRealHardwareEngineController().
|
extern |
Referenced by fastAdcDoneCB(), fastAdcTrigger(), AdcDevice::getAdcChannelToken(), and AdcDevice::getAvgAdcValue().
|
static |
Definition at line 148 of file engine_controller.cpp.
Referenced by initPeriodicEvents().
|
static |
Definition at line 149 of file engine_controller.cpp.
Referenced by initPeriodicEvents().
|
static |
Definition at line 756 of file engine_controller.cpp.
Referenced by getRusEfiVersion().