rusEFI
The most advanced open source ECU
Functions | Variables
settings.cpp File Reference

Detailed Description

This file is about configuring engine via the human-readable protocol.

Date
Dec 30, 2012
Author
Andrey Belomutskiy, (c) 2012-2020

Definition in file settings.cpp.

Functions

void printSpiState ()
 
static void printOutputs ()
 
void printConfiguration ()
 Prints current engine configuration to human-readable console. More...
 
static void doPrintConfiguration ()
 
static void setFixedModeTiming (int value)
 
static void setTimingMode (int value)
 
static void setIdleSolenoidFrequency (int value)
 
static void setSensorChartMode (int value)
 
static void printTpsSenser (const char *msg, SensorType sensor, int16_t min, int16_t max, adc_channel_e channel)
 
void printTPSInfo (void)
 
static void setCrankingRpm (int value)
 
static void setAlgorithmInt (int value)
 
static void setFiringOrder (int value)
 
static void setRpmHardLimit (int value)
 
static void setCrankingIACExtra (float percent)
 
static void setCrankingFuel (float timeMs)
 
static void setGlobalTriggerAngleOffset (float value)
 
static void setCrankingTimingAngle (float value)
 
static void setCrankingInjectionMode (int value)
 
static void setInjectionMode (int value)
 
static void setIgnitionMode (int value)
 
static void setIndividualCoilsIgnition ()
 
static void setTriggerType (int value)
 
static void setDebugMode (int value)
 
static void setWholeTimingMap (float value)
 
static void setWholePhaseMapCmd (float value)
 
static void setWholeTimingMapCmd (float value)
 
static void setWholeVeCmd (float value)
 
static brain_pin_e parseBrainPinWithErrorMessage (const char *pinName)
 
static void setIgnitionPin (const char *indexStr, const char *pinName)
 
void readPin (const char *pinName)
 
static void benchSetPinValue (const char *pinName, int bit)
 
static void benchClearPin (const char *pinName)
 
static void benchSetPin (const char *pinName)
 
static void setIndividualPin (const char *pinName, brain_pin_e *targetPin, const char *name)
 
static void setVssPin (const char *pinName)
 
static void setIdlePin (const char *pinName)
 
static void setMainRelayPin (const char *pinName)
 
static void setTriggerSyncPin (const char *pinName)
 
static void setStarterRelayPin (const char *pinName)
 
static void setAlternatorPin (const char *pinName)
 
static void setACRelayPin (const char *pinName)
 
static void setFuelPumpPin (const char *pinName)
 
static void setInjectionPin (const char *indexStr, const char *pinName)
 
static void setTriggerInputPin (const char *indexStr, const char *pinName)
 
static void setTriggerSimulatorPin (const char *indexStr, const char *pinName)
 
static void setAnalogInputPin (const char *sensorStr, const char *pinName)
 
static void setLogicInputPin (const char *indexStr, const char *pinName)
 
static void showPinFunction (const char *pinName)
 
static void setSpiMode (int index, bool mode)
 
static void enableOrDisable (const char *param, bool isEnabled)
 
static void enable (const char *param)
 
static void disable (const char *param)
 
static void enableSpi (int index)
 
static void disableSpi (int index)
 
void scheduleStopEngine ()
 
static void getValue (const char *paramStr)
 
static void setScriptCurve1Value (float value)
 
static void setScriptCurve2Value (float value)
 
static void setValue (const char *paramStr, const char *valueStr)
 
void initSettings ()
 
void printDateTime ()
 
void setDateTime (const char *const isoDateTime)
 
void setEngineTypeAndSave (int value)
 
void setEngineType (int value, bool isWriteToFlash)
 

Variables

int waveChartUsedSize
 
WaveChart waveChart
 
bool verboseRxCan = false
 
const command_f_s commandsF []
 
const command_i_s commandsI []
 

Function Documentation

◆ benchClearPin()

static void benchClearPin ( const char *  pinName)
static

Definition at line 370 of file settings.cpp.

370  {
371  benchSetPinValue(pinName, 0);
372 }
static void benchSetPinValue(const char *pinName, int bit)
Definition: settings.cpp:360

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ benchSetPin()

static void benchSetPin ( const char *  pinName)
static

Definition at line 374 of file settings.cpp.

374  {
375  benchSetPinValue(pinName, 1);
376 }

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ benchSetPinValue()

static void benchSetPinValue ( const char *  pinName,
int  bit 
)
static

Definition at line 360 of file settings.cpp.

360  {
362  if (pin == Gpio::Invalid) {
363  return;
364  }
365  palWritePad(getHwPort("write", pin), getHwPin("write", pin), bit);
366  efiPrintf("pin %s set value", hwPortname(pin));
367  readPin(pinName);
368 }
Gpio
@ Invalid
ioportid_t getHwPort(const char *msg, brain_pin_e brainPin)
ioportmask_t getHwPin(const char *msg, brain_pin_e brainPin)
const char * hwPortname(brain_pin_e brainPin)
static brain_pin_e parseBrainPinWithErrorMessage(const char *pinName)
Definition: settings.cpp:321
void readPin(const char *pinName)
Definition: settings.cpp:350
brain_pin_e pin
Definition: stm32_adc.cpp:15

Referenced by benchClearPin(), and benchSetPin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disable()

static void disable ( const char *  param)
static

Definition at line 635 of file settings.cpp.

635  {
636  enableOrDisable(param, false);
637 }
static void enableOrDisable(const char *param, bool isEnabled)
Definition: settings.cpp:550
static tstrWifiInitParam param

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disableSpi()

static void disableSpi ( int  index)
static

Definition at line 643 of file settings.cpp.

643  {
644  setSpiMode(index, false);
645 }
static void setSpiMode(int index, bool mode)
Definition: settings.cpp:530

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ doPrintConfiguration()

static void doPrintConfiguration ( )
static

Definition at line 148 of file settings.cpp.

148  {
150 }
void printConfiguration()
Prints current engine configuration to human-readable console.
Definition: settings.cpp:90

Referenced by initSettings(), setAlgorithmInt(), setCrankingInjectionMode(), setCrankingRpm(), setCrankingTimingAngle(), setEngineType(), setFiringOrder(), setFixedModeTiming(), setGlobalTriggerAngleOffset(), setIgnitionMode(), setInjectionMode(), setRpmHardLimit(), setSensorChartMode(), setTimingMode(), and setTriggerType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enable()

static void enable ( const char *  param)
static

◆ enableOrDisable()

static void enableOrDisable ( const char *  param,
bool  isEnabled 
)
static

Definition at line 550 of file settings.cpp.

550  {
551  if (strEqualCaseInsensitive(param, "useTLE8888_cranking_hack")) {
553 #if EFI_SHAFT_POSITION_INPUT
554  } else if (strEqualCaseInsensitive(param, CMD_TRIGGER_HW_INPUT)) {
556 #endif // EFI_SHAFT_POSITION_INPUT
557  } else if (strEqualCaseInsensitive(param, "verboseTLE8888")) {
558  engineConfiguration->verboseTLE8888 = isEnabled;
559  } else if (strEqualCaseInsensitive(param, "verboseRxCan")) {
560  verboseRxCan = isEnabled;
561  } else if (strEqualCaseInsensitive(param, "verboseCan")) {
562  engineConfiguration->verboseCan = isEnabled;
563  } else if (strEqualCaseInsensitive(param, "verboseIsoTp")) {
564  engineConfiguration->verboseIsoTp = isEnabled;
565  } else if (strEqualCaseInsensitive(param, "artificialMisfire")) {
567  } else if (strEqualCaseInsensitive(param, "logic_level_trigger")) {
569  } else if (strEqualCaseInsensitive(param, "can_broadcast")) {
571  } else if (strEqualCaseInsensitive(param, "etb_auto")) {
572  engine->etbAutoTune = isEnabled;
573  } else if (strEqualCaseInsensitive(param, "verboseKLine")) {
574  engineConfiguration->verboseKLine = isEnabled;
575  } else if (strEqualCaseInsensitive(param, "stepperidle")) {
576  engineConfiguration->useStepperIdle = isEnabled;
577  } else if (strEqualCaseInsensitive(param, "boardUseTempPullUp")) {
580  } else if (strEqualCaseInsensitive(param, "boardUseTachPullUp")) {
583  } else if (strEqualCaseInsensitive(param, "two_wire_wasted_spark")) {
586  } else if (strEqualCaseInsensitive(param, "tpic_advanced_mode")) {
588  } else if (strEqualCaseInsensitive(param, "altcontrol")) {
590  } else if (strEqualCaseInsensitive(param, "sd")) {
592  } else if (strEqualCaseInsensitive(param, CMD_FUNCTIONAL_TEST_MODE)) {
593  engine->isFunctionalTestMode = isEnabled;
594  } else if (strEqualCaseInsensitive(param, "can_read")) {
595  engineConfiguration->canReadEnabled = isEnabled;
596  } else if (strEqualCaseInsensitive(param, "can_write")) {
598  } else if (strEqualCaseInsensitive(param, CMD_INJECTION)) {
600  } else if (strEqualCaseInsensitive(param, CMD_PWM)) {
601  engine->isPwmEnabled = isEnabled;
602  } else if (strEqualCaseInsensitive(param, "trigger_details")) {
604  } else if (strEqualCaseInsensitive(param, "vvt_details")) {
606  } else if (strEqualCaseInsensitive(param, "invertCamVVTSignal")) {
608  } else if (strEqualCaseInsensitive(param, CMD_IGNITION)) {
610 #if EFI_EMULATE_POSITION_SENSORS
611  } else if (strEqualCaseInsensitive(param, CMD_SELF_STIMULATION)) {
612  if (isEnabled) {
614  } else {
616  }
617  } else if (strEqualCaseInsensitive(param, CMD_EXTERNAL_STIMULATION)) {
618  if (isEnabled) {
620  } else {
622  }
623 #endif // EFI_EMULATE_POSITION_SENSORS
624  } else {
625  efiPrintf("unexpected [%s]", param);
626  return; // well, MISRA would not like this 'return' here :(
627  }
628  efiPrintf("[%s] %s", param, isEnabled ? "enabled" : "disabled");
629 }
bool etbAutoTune
Definition: engine.h:264
bool isFunctionalTestMode
Definition: engine.h:308
bool isPwmEnabled
Definition: engine.h:107
bool hwTriggerInputEnabled
TriggerCentral * getTriggerCentral()
Definition: engine.cpp:591
void incrementGlobalConfigurationVersion(const char *msg)
Engine * engine
engine_configuration_s * engineConfiguration
bool verboseRxCan
Definition: settings.cpp:548
void disableTriggerStimulator()
void enableExternalTriggerStimulator()
void enableTriggerStimulator(bool incGlobalConfiguration)

Referenced by disable(), and enable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enableSpi()

static void enableSpi ( int  index)
static

Definition at line 639 of file settings.cpp.

639  {
640  setSpiMode(index, true);
641 }

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getValue()

static void getValue ( const char *  paramStr)
static

Definition at line 654 of file settings.cpp.

654  {
655 
656  {
657  float value = getConfigValueByName(paramStr);
658  if (value != EFI_ERROR_CODE) {
659  efiPrintf("%s value: %.2f", paramStr, value);
660  return;
661  }
662  }
663 
664  if (strEqualCaseInsensitive(paramStr, "tps_min")) {
665  efiPrintf("tps_min=%d", engineConfiguration->tpsMin);
666  } else if (strEqualCaseInsensitive(paramStr, "tps_max")) {
667  efiPrintf("tps_max=%d", engineConfiguration->tpsMax);
668  } else if (strEqualCaseInsensitive(paramStr, "global_trigger_offset_angle")) {
669  efiPrintf("global_trigger_offset=%.2f", engineConfiguration->globalTriggerAngleOffset);
670 #if EFI_SHAFT_POSITION_INPUT
671  } else if (strEqualCaseInsensitive(paramStr, "trigger_hw_input")) {
672  efiPrintf("trigger_hw_input=%s", boolToString(getTriggerCentral()->hwTriggerInputEnabled));
673 #endif // EFI_SHAFT_POSITION_INPUT
674  } else if (strEqualCaseInsensitive(paramStr, "is_enabled_spi_1")) {
675  efiPrintf("is_enabled_spi_1=%s", boolToString(engineConfiguration->is_enabled_spi_1));
676  } else if (strEqualCaseInsensitive(paramStr, "is_enabled_spi_2")) {
677  efiPrintf("is_enabled_spi_2=%s", boolToString(engineConfiguration->is_enabled_spi_2));
678  } else if (strEqualCaseInsensitive(paramStr, "is_enabled_spi_3")) {
679  efiPrintf("is_enabled_spi_3=%s", boolToString(engineConfiguration->is_enabled_spi_3));
680  } else if (strEqualCaseInsensitive(paramStr, "isHip9011Enabled")) {
681  efiPrintf("isHip9011Enabled=%d", engineConfiguration->isHip9011Enabled);
682  } else if (strEqualCaseInsensitive(paramStr, CMD_DATE)) {
683  printDateTime();
684  } else {
685  efiPrintf("Invalid Parameter: %s", paramStr);
686  }
687 }
const char * boolToString(bool value)
Definition: efilib.cpp:18
void printDateTime()
Definition: settings.cpp:900
float getConfigValueByName(const char *name)

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initSettings()

void initSettings ( )

Definition at line 837 of file settings.cpp.

837  {
838 #if EFI_SIMULATOR
839  printf("initSettings\n");
840 #endif // EFI_SIMULATOR
841 
842  // todo: start saving values into flash right away?
843 
844  addConsoleAction("tpsinfo", printTPSInfo);
845  addConsoleAction("calibrate_tps_1_closed", grabTPSIsClosed);
846  addConsoleAction("calibrate_tps_1_wot", grabTPSIsWideOpen);
847 
848 
849 #if EFI_ENGINE_CONTROL
850  // used by HW CI
851  addConsoleAction(CMD_INDIVIDUAL_INJECTION, setIndividualCoilsIgnition);
852  addConsoleAction("showconfig", doPrintConfiguration);
853  addConsoleActionF("set_whole_phase_map", setWholePhaseMapCmd);
854  addConsoleActionF("set_whole_timing_map", setWholeTimingMapCmd);
855  addConsoleActionF("set_whole_ve_map", setWholeVeCmd);
856  addConsoleActionF("set_whole_ign_corr_map", setWholeIgnitionIatCorr);
857 #endif // EFI_ENGINE_CONTROL
858 
859  addConsoleAction("stopengine", (Void) scheduleStopEngine);
860 
861  // todo: refactor this - looks like all boolean flags should be controlled with less code duplication
862  addConsoleActionI("enable_spi", enableSpi);
863  addConsoleActionI("disable_spi", disableSpi);
864 
865  addConsoleActionS(CMD_ENABLE, enable);
866  addConsoleActionS(CMD_DISABLE, disable);
867 
868  addConsoleActionSS(CMD_SET, setValue);
869  addConsoleActionS(CMD_GET, getValue);
870 
871 #if EFI_PROD_CODE
873  addConsoleActionSS(CMD_INJECTION_PIN, setInjectionPin);
874  addConsoleActionSS(CMD_IGNITION_PIN, setIgnitionPin);
875  addConsoleActionSS(CMD_TRIGGER_PIN, setTriggerInputPin);
876  addConsoleActionSS(CMD_TRIGGER_SIMULATOR_PIN, setTriggerSimulatorPin);
877 
878  addConsoleActionI(CMD_ECU_UNLOCK, unlockEcu);
879 
880  addConsoleActionS("set_fuel_pump_pin", setFuelPumpPin);
881  addConsoleActionS("set_acrelay_pin", setACRelayPin);
882  addConsoleActionS(CMD_ALTERNATOR_PIN, setAlternatorPin);
883  addConsoleActionS(CMD_IDLE_PIN, setIdlePin);
884  addConsoleActionS("set_main_relay_pin", setMainRelayPin);
885  addConsoleActionS("set_starter_relay_pin", setStarterRelayPin);
886  addConsoleActionS("set_trigger_sync_pin", setTriggerSyncPin);
887 
888  addConsoleActionS("bench_clearpin", benchClearPin);
889  addConsoleActionS("bench_setpin", benchSetPin);
890  addConsoleActionS("readpin", readPin);
891 
892 #if HAL_USE_ADC
893  addConsoleAction("adc_report", printFullAdcReport);
894  addConsoleActionSS("set_analog_input_pin", setAnalogInputPin);
895 #endif // HAL_USE_ADC
896  addConsoleActionSS(CMD_LOGIC_PIN, setLogicInputPin);
897 #endif // EFI_PROD_CODE
898 }
void printFullAdcReport(void)
Definition: adc_inputs.cpp:326
void addConsoleActionF(const char *token, VoidFloat callback)
void addConsoleActionS(const char *token, VoidCharPtr callback)
void addConsoleAction(const char *token, Void callback)
Register console action without parameters.
void addConsoleActionSS(const char *token, VoidCharPtrCharPtr callback)
void addConsoleActionI(const char *token, VoidInt callback)
Register a console command with one Integer parameter.
void(* Void)(void)
Definition: cli_registry.h:52
void unlockEcu(int password)
Definition: engine2.cpp:265
void setWholeIgnitionIatCorr(float value)
static void enableSpi(int index)
Definition: settings.cpp:639
static void setInjectionPin(const char *indexStr, const char *pinName)
Definition: settings.cpp:422
void printTPSInfo(void)
Definition: settings.cpp:192
static void setFuelPumpPin(const char *pinName)
Definition: settings.cpp:418
static void enable(const char *param)
Definition: settings.cpp:631
static void showPinFunction(const char *pinName)
Definition: settings.cpp:520
static void setIgnitionPin(const char *indexStr, const char *pinName)
Definition: settings.cpp:335
static void benchSetPin(const char *pinName)
Definition: settings.cpp:374
static void setWholeVeCmd(float value)
Definition: settings.cpp:309
static void getValue(const char *paramStr)
Definition: settings.cpp:654
static void disableSpi(int index)
Definition: settings.cpp:643
static void setTriggerSyncPin(const char *pinName)
Definition: settings.cpp:402
static void setIndividualCoilsIgnition()
Definition: settings.cpp:278
static void setValue(const char *paramStr, const char *valueStr)
Definition: settings.cpp:757
static void setMainRelayPin(const char *pinName)
Definition: settings.cpp:398
static void setAlternatorPin(const char *pinName)
Definition: settings.cpp:410
static void benchClearPin(const char *pinName)
Definition: settings.cpp:370
void scheduleStopEngine()
Definition: settings.cpp:650
static void setStarterRelayPin(const char *pinName)
Definition: settings.cpp:406
static void setWholeTimingMapCmd(float value)
Definition: settings.cpp:303
static void setTriggerSimulatorPin(const char *indexStr, const char *pinName)
Definition: settings.cpp:454
static void setTriggerInputPin(const char *indexStr, const char *pinName)
Definition: settings.cpp:441
static void setACRelayPin(const char *pinName)
Definition: settings.cpp:414
static void setAnalogInputPin(const char *sensorStr, const char *pinName)
Definition: settings.cpp:470
static void setWholePhaseMapCmd(float value)
Definition: settings.cpp:298
static void setIdlePin(const char *pinName)
Definition: settings.cpp:394
static void setLogicInputPin(const char *indexStr, const char *pinName)
Definition: settings.cpp:506
static void disable(const char *param)
Definition: settings.cpp:635
static void doPrintConfiguration()
Definition: settings.cpp:148
void grabTPSIsWideOpen()
Definition: tps.cpp:15
void grabTPSIsClosed()
Definition: tps.cpp:7
printf("\n")

Referenced by commonInitEngineController().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseBrainPinWithErrorMessage()

static brain_pin_e parseBrainPinWithErrorMessage ( const char *  pinName)
static

Definition at line 321 of file settings.cpp.

321  {
322  brain_pin_e pin = parseBrainPin(pinName);
323  if (pin == Gpio::Invalid) {
324  efiPrintf("invalid pin name [%s]", pinName);
325  }
326  return pin;
327 }
brain_pin_e parseBrainPin(const char *str)

Referenced by benchSetPinValue(), readPin(), setAnalogInputPin(), setIgnitionPin(), setIndividualPin(), setInjectionPin(), setLogicInputPin(), setTriggerInputPin(), setTriggerSimulatorPin(), and showPinFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printConfiguration()

void printConfiguration ( )

Prints current engine configuration to human-readable console.

Definition at line 90 of file settings.cpp.

90  {
91 
92  efiPrintf("Template %s/%d trigger %s/%s/%d", getEngine_type_e(engineConfiguration->engineType),
96 
97 
98  efiPrintf("configurationVersion=%d", engine->getGlobalConfigurationVersion());
99 
100  efiPrintf("rpmHardLimit: %d/operationMode=%d", engineConfiguration->rpmHardLimit,
101  getEngineRotationState()->getOperationMode());
102 
103  efiPrintf("globalTriggerAngleOffset=%.2f", engineConfiguration->globalTriggerAngleOffset);
104 
105  efiPrintf("=== cranking ===");
106  efiPrintf("crankingRpm: %d", engineConfiguration->cranking.rpm);
107  efiPrintf("cranking injection %s", getInjection_mode_e(engineConfiguration->crankingInjectionMode));
108 
109  efiPrintf("cranking timing %.2f", engineConfiguration->crankingTimingAngle);
110 
111  efiPrintf("=== ignition ===");
112 
113  efiPrintf("ignitionMode: %s/enabled=%s", getIgnition_mode_e(engineConfiguration->ignitionMode),
115  efiPrintf("timingMode: %s", getTiming_mode_e(engineConfiguration->timingMode));
116  if (engineConfiguration->timingMode == TM_FIXED) {
117  efiPrintf("fixedModeTiming: %d", (int) engineConfiguration->fixedModeTiming);
118  }
119 
120  efiPrintf("=== injection ===");
121  efiPrintf("injection %s enabled=%s", getInjection_mode_e(engineConfiguration->injectionMode),
123 
124  printOutputs();
125 
126  efiPrintf("map_avg=%s/wa=%s",
129 
130  efiPrintf("clutchUp@%s: %s", hwPortname(engineConfiguration->clutchUpPin),
132  efiPrintf("clutchDown@%s: %s", hwPortname(engineConfiguration->clutchDownPin),
134 
135  efiPrintf("digitalPotentiometerSpiDevice %d", engineConfiguration->digitalPotentiometerSpiDevice);
136 
137  for (int i = 0; i < DIGIPOT_COUNT; i++) {
138  efiPrintf("digitalPotentiometer CS%d %s", i,
140  }
141 
142 #if EFI_PROD_CODE
143  printSpiState();
144 #endif // EFI_PROD_CODE
145 }
const char * getIgnition_mode_e(ignition_mode_e value)
const char * getInjection_mode_e(injection_mode_e value)
const char * getEngine_load_mode_e(engine_load_mode_e value)
const char * getTiming_mode_e(timing_mode_e value)
const char * getTrigger_type_e(trigger_type_e value)
const char * getEngine_type_e(engine_type_e value)
int getGlobalConfigurationVersion(void) const
Definition: engine.cpp:302
EngineState engineState
Definition: engine.h:312
EngineRotationState * getEngineRotationState()
Definition: engine.cpp:574
void printSpiState()
Definition: settings.cpp:44
static void printOutputs()
Definition: settings.cpp:52

Referenced by doPrintConfiguration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printDateTime()

void printDateTime ( )

Definition at line 900 of file settings.cpp.

900  {
901 #if EFI_RTC
903 #else // EFI_RTC
904  efiPrintf("Cannot print time: RTC not supported");
905 #endif // EFI_RTC
906 }
void printRtcDateTime()
Definition: rtc_helper.cpp:42

Referenced by getValue(), and initRtc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printOutputs()

static void printOutputs ( )
static

Definition at line 52 of file settings.cpp.

52  {
53  efiPrintf("injectionPins: mode %s", getPin_output_mode_e(engineConfiguration->injectionPinMode));
54  for (size_t i = 0; i < engineConfiguration->cylindersCount; i++) {
56  efiPrintf("injection #%d @ %s", (1 + i), hwPortname(brainPin));
57  }
58 
59  efiPrintf("ignitionPins: mode %s", getPin_output_mode_e(engineConfiguration->ignitionPinMode));
60  for (size_t i = 0; i < engineConfiguration->cylindersCount; i++) {
62  efiPrintf("ignition #%d @ %s", (1 + i), hwPortname(brainPin));
63  }
64 
65  efiPrintf("idlePin: mode %s @ %s freq=%d", getPin_output_mode_e(engineConfiguration->idle.solenoidPinMode),
67  efiPrintf("malfunctionIndicator: %s mode=%s", hwPortname(engineConfiguration->malfunctionIndicatorPin),
69 
70  efiPrintf("fuelPumpPin: mode %s @ %s", getPin_output_mode_e(engineConfiguration->fuelPumpPinMode),
72 
73  efiPrintf("fanPin: mode %s @ %s", getPin_output_mode_e(engineConfiguration->fanPinMode),
75 
76  efiPrintf("mainRelay: mode %s @ %s", getPin_output_mode_e(engineConfiguration->mainRelayPinMode),
78 
79  efiPrintf("starterRelay: mode %s @ %s", getPin_output_mode_e(engineConfiguration->starterRelayDisablePinMode),
81 
82  efiPrintf("alternator field: mode %s @ %s",
85 }
const char * getPin_output_mode_e(pin_output_mode_e value)

Referenced by printConfiguration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printSpiState()

void printSpiState ( )

Definition at line 44 of file settings.cpp.

Referenced by printConfiguration(), and setSpiMode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printTPSInfo()

void printTPSInfo ( void  )

Definition at line 192 of file settings.cpp.

192  {
193  efiPrintf("pedal up %f / down %f",
196 
198 
199  if (!pps.Valid) {
200  efiPrintf("PPS not valid");
201  }
202 
205 }
virtual SensorResult get() const =0
static void printTpsSenser(const char *msg, SensorType sensor, int16_t min, int16_t max, adc_channel_e channel)
Definition: settings.cpp:175

Referenced by grabTPSIsClosed(), grabTPSIsWideOpen(), and initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printTpsSenser()

static void printTpsSenser ( const char *  msg,
SensorType  sensor,
int16_t  min,
int16_t  max,
adc_channel_e  channel 
)
static

Definition at line 175 of file settings.cpp.

175  {
176  auto tps = Sensor::get(sensor);
177  auto raw = Sensor::getRaw(sensor);
178 
179  if (!tps.Valid) {
180  efiPrintf("TPS not valid");
181  }
182 
183  char pinNameBuffer[16];
184 
185  efiPrintf("tps min (closed) %d/max (full) %d v=%.2f @%s", min, max,
186  raw, getPinNameByAdcChannel(msg, channel, pinNameBuffer));
187 
188 
189  efiPrintf("current 10bit=%d value=%.2f", convertVoltageTo10bitADC(raw), tps.value_or(0));
190 }
virtual float getRaw() const
Definition: sensor.h:162
char * getPinNameByAdcChannel(const char *msg, adc_channel_e hwChannel, char *buffer)
static Lps25Sensor sensor(device)
constexpr int convertVoltageTo10bitADC(float voltage)
Definition: tps.h:21

Referenced by printTPSInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readPin()

void readPin ( const char *  pinName)

Definition at line 350 of file settings.cpp.

350  {
352  if (pin == Gpio::Invalid) {
353  return;
354  }
355  int physicalValue = palReadPad(getHwPort("read", pin), getHwPin("read", pin));
356  efiPrintf("pin %s value %d", hwPortname(pin), physicalValue);
357 }

Referenced by benchSetPinValue(), and initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scheduleStopEngine()

void scheduleStopEngine ( )

See 'LimpManager::isEngineStop' for code which actually stops engine

Definition at line 650 of file settings.cpp.

650  {
652 }
void doScheduleStopEngine()

Referenced by executeTSCommand(), initSettings(), and Engine::isInShutdownMode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setACRelayPin()

static void setACRelayPin ( const char *  pinName)
static

Definition at line 414 of file settings.cpp.

414  {
416 }
static void setIndividualPin(const char *pinName, brain_pin_e *targetPin, const char *name)
Definition: settings.cpp:378

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAlgorithmInt()

static void setAlgorithmInt ( int  value)
static

this method is used in console - it also prints current configuration

Definition at line 216 of file settings.cpp.

216  {
219 }
void setAlgorithm(engine_load_mode_e algo)
engine_load_mode_e
Definition: rusefi_enums.h:146
Here is the call graph for this function:

◆ setAlternatorPin()

static void setAlternatorPin ( const char *  pinName)
static

Definition at line 410 of file settings.cpp.

410  {
412 }

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAnalogInputPin()

static void setAnalogInputPin ( const char *  sensorStr,
const char *  pinName 
)
static

Definition at line 470 of file settings.cpp.

470  {
472  if (pin == Gpio::Invalid) {
473  return;
474  }
475  adc_channel_e channel = getAdcChannel(pin);
476  if (channel == EFI_ADC_ERROR) {
477  efiPrintf("Error with [%s]", pinName);
478  return;
479  }
480  if (strEqual("map", sensorStr)) {
482  efiPrintf("setting MAP to %s/%d", pinName, channel);
483  } else if (strEqual("pps", sensorStr)) {
485  efiPrintf("setting PPS to %s/%d", pinName, channel);
486  } else if (strEqual("afr", sensorStr)) {
487  engineConfiguration->afr.hwChannel = channel;
488  efiPrintf("setting AFR to %s/%d", pinName, channel);
489  } else if (strEqual("clt", sensorStr)) {
491  efiPrintf("setting CLT to %s/%d", pinName, channel);
492  } else if (strEqual("iat", sensorStr)) {
494  efiPrintf("setting IAT to %s/%d", pinName, channel);
495  } else if (strEqual("tps", sensorStr)) {
497  efiPrintf("setting TPS1 to %s/%d", pinName, channel);
498  } else if (strEqual("tps2", sensorStr)) {
500  efiPrintf("setting TPS2 to %s/%d", pinName, channel);
501  }
503 }
adc_channel_e getAdcChannel(brain_pin_e pin)
adc_channel_e

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCrankingFuel()

static void setCrankingFuel ( float  timeMs)
static

Definition at line 236 of file settings.cpp.

236  {
238  efiPrintf("cranking_fuel %.2f", timeMs);
239 }

◆ setCrankingIACExtra()

static void setCrankingIACExtra ( float  percent)
static

Definition at line 231 of file settings.cpp.

231  {
233  efiPrintf("cranking_iac %.2f", percent);
234 }

◆ setCrankingInjectionMode()

static void setCrankingInjectionMode ( int  value)
static

Definition at line 257 of file settings.cpp.

Here is the call graph for this function:

◆ setCrankingRpm()

static void setCrankingRpm ( int  value)
static

Definition at line 208 of file settings.cpp.

208  {
211 }
Here is the call graph for this function:

◆ setCrankingTimingAngle()

static void setCrankingTimingAngle ( float  value)
static

Definition at line 251 of file settings.cpp.

Here is the call graph for this function:

◆ setDateTime()

void setDateTime ( const char *const  isoDateTime)

Definition at line 908 of file settings.cpp.

908  {
909 #if EFI_RTC
910  if (strlen(isoDateTime) >= 19 && isoDateTime[10] == 'T') {
911  efidatetime_t dateTime;
912  dateTime.year = atoi(isoDateTime);
913  dateTime.month = atoi(isoDateTime + 5);
914  dateTime.day = atoi(isoDateTime + 8);
915  dateTime.hour = atoi(isoDateTime + 11);
916  dateTime.minute = atoi(isoDateTime + 14);
917  dateTime.second = atoi(isoDateTime + 17);
918  if (dateTime.year != ATOI_ERROR_CODE &&
919  dateTime.month >= 1 && dateTime.month <= 12 &&
920  dateTime.day >= 1 && dateTime.day <= 31 &&
921  dateTime.hour <= 23 &&
922  dateTime.minute <= 59 &&
923  dateTime.second <= 59) {
924  // doesn't concern about leap years or seconds; ChibiOS doesn't support (added) leap seconds anyway
925  setRtcDateTime(&dateTime);
926  return;
927  }
928  }
929  efiPrintf("date_set Date parameter %s is wrong", isoDateTime);
930 #else // EFI_RTC
931  efiPrintf("Cannot set time: RTC not supported");
932 #endif // EFI_RTC
933 }
void setRtcDateTime(efidatetime_t const *const dateTime)
Definition: rtc_helper.cpp:50
uint8_t minute
Definition: rusefi_types.h:53
uint8_t hour
Definition: rusefi_types.h:52
uint8_t second
Definition: rusefi_types.h:54
uint32_t year
Definition: rusefi_types.h:49
uint8_t month
Definition: rusefi_types.h:50

Referenced by setValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDebugMode()

static void setDebugMode ( int  value)
static

Definition at line 290 of file settings.cpp.

◆ setEngineType()

void setEngineType ( int  value,
bool  isWriteToFlash 
)

Definition at line 941 of file settings.cpp.

941  {
942  {
943 #if EFI_PROD_CODE
944  chibios_rt::CriticalSectionLocker csl;
945 #endif // EFI_PROD_CODE
946 
950 
951 #if EFI_CONFIGURATION_STORAGE
952  if (isWriteToFlash) {
953  writeToFlashNow();
954  }
955 #endif /* EFI_CONFIGURATION_STORAGE */
956  }
958 #if EFI_ENGINE_CONTROL && ! EFI_UNIT_TEST
960 #endif // ! EFI_UNIT_TEST
961 }
void resetEngineSnifferIfInTestMode()
Definition: engine.cpp:56
void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e engineType)
engine_type_e
Definition: engine_types.h:18
void writeToFlashNow()
Definition: flash_main.cpp:135

Referenced by executeTSCommand(), processCanQcBenchTest(), and setEngineTypeAndSave().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setEngineTypeAndSave()

void setEngineTypeAndSave ( int  value)

Definition at line 937 of file settings.cpp.

937  {
938  setEngineType(value, true);
939 }
void setEngineType(int value, bool isWriteToFlash)
Definition: settings.cpp:941
Here is the call graph for this function:

◆ setFiringOrder()

static void setFiringOrder ( int  value)
static

Definition at line 221 of file settings.cpp.

Here is the call graph for this function:

◆ setFixedModeTiming()

static void setFixedModeTiming ( int  value)
static

Definition at line 152 of file settings.cpp.

Here is the call graph for this function:

◆ setFuelPumpPin()

static void setFuelPumpPin ( const char *  pinName)
static

Definition at line 418 of file settings.cpp.

418  {
419  setIndividualPin(pinName, &engineConfiguration->fuelPumpPin, "fuelPump");
420 }

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGlobalTriggerAngleOffset()

static void setGlobalTriggerAngleOffset ( float  value)
static

Definition at line 241 of file settings.cpp.

241  {
242  if (cisnan(value)) {
243  warning(ObdCode::CUSTOM_ERR_SGTP_ARGUMENT, "Invalid argument");
244  return;
245  }
249 }
bool warning(ObdCode code, const char *fmt,...)
@ CUSTOM_ERR_SGTP_ARGUMENT
Here is the call graph for this function:

◆ setIdlePin()

static void setIdlePin ( const char *  pinName)
static

Definition at line 394 of file settings.cpp.

394  {
396 }

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIdleSolenoidFrequency()

static void setIdleSolenoidFrequency ( int  value)
static

Definition at line 164 of file settings.cpp.

Here is the call graph for this function:

◆ setIgnitionMode()

static void setIgnitionMode ( int  value)
static

Definition at line 269 of file settings.cpp.

269  {
270 #if EFI_ENGINE_CONTROL
275 #endif // EFI_ENGINE_CONTROL
276 }
void prepareOutputSignals()
ignition_mode_e
Definition: rusefi_enums.h:307

Referenced by setIndividualCoilsIgnition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIgnitionPin()

static void setIgnitionPin ( const char *  indexStr,
const char *  pinName 
)
static

For example: set_ignition_pin 1 PD7 todo: this method counts index from 1 while at least 'set_trigger_input_pin' counts from 0. todo: make things consistent

Definition at line 335 of file settings.cpp.

335  {
336  int index = atoi(indexStr) - 1; // convert from human index into software index
337  if (index < 0 || index >= MAX_CYLINDER_COUNT)
338  return;
340  if (pin == Gpio::Invalid) {
341  return;
342  }
343  efiPrintf("setting ignition pin[%d] to %s please save&restart", index, hwPortname(pin));
346 }

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIndividualCoilsIgnition()

static void setIndividualCoilsIgnition ( )
static

Definition at line 278 of file settings.cpp.

278  {
279  setIgnitionMode((int)IM_INDIVIDUAL_COILS);
280 }
static void setIgnitionMode(int value)
Definition: settings.cpp:269

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIndividualPin()

static void setIndividualPin ( const char *  pinName,
brain_pin_e targetPin,
const char *  name 
)
static

Definition at line 378 of file settings.cpp.

378  {
380  if (pin == Gpio::Invalid) {
381  return;
382  }
383  efiPrintf("setting %s pin to %s please save&restart", name, hwPortname(pin));
384  *targetPin = pin;
386 }

Referenced by setACRelayPin(), setAlternatorPin(), setFuelPumpPin(), setIdlePin(), setMainRelayPin(), setStarterRelayPin(), setTriggerSyncPin(), and setVssPin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setInjectionMode()

static void setInjectionMode ( int  value)
static

Definition at line 263 of file settings.cpp.

Here is the call graph for this function:

◆ setInjectionPin()

static void setInjectionPin ( const char *  indexStr,
const char *  pinName 
)
static

Definition at line 422 of file settings.cpp.

422  {
423  int index = atoi(indexStr) - 1; // convert from human index into software index
424  if (index < 0 || index >= MAX_CYLINDER_COUNT)
425  return;
427  if (pin == Gpio::Invalid) {
428  return;
429  }
430  efiPrintf("setting injection pin[%d] to %s please save&restart", index, hwPortname(pin));
433 }

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLogicInputPin()

static void setLogicInputPin ( const char *  indexStr,
const char *  pinName 
)
static

Definition at line 506 of file settings.cpp.

506  {
507  int index = atoi(indexStr);
508  if (index < 0 || index > 2) {
509  return;
510  }
512  if (pin == Gpio::Invalid) {
513  return;
514  }
515  efiPrintf("setting logic input pin[%d] to %s please save&restart", index, hwPortname(pin));
518 }
brain_input_pin_e logicAnalyzerPins[LOGIC_ANALYZER_CHANNEL_COUNT]

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMainRelayPin()

static void setMainRelayPin ( const char *  pinName)
static

Definition at line 398 of file settings.cpp.

398  {
399  setIndividualPin(pinName, &engineConfiguration->mainRelayPin, "main relay");
400 }

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRpmHardLimit()

static void setRpmHardLimit ( int  value)
static

Definition at line 226 of file settings.cpp.

226  {
229 }
Here is the call graph for this function:

◆ setScriptCurve1Value()

static void setScriptCurve1Value ( float  value)
static

Definition at line 689 of file settings.cpp.

689  {
690  setLinearCurve(config->scriptCurve1, value, value, 1);
691 }
persistent_config_s * config
void setLinearCurve(TValue(&array)[TSize], float from, float to, float precision=0.01f)
Definition: table_helper.h:139
Here is the call graph for this function:

◆ setScriptCurve2Value()

static void setScriptCurve2Value ( float  value)
static

Definition at line 693 of file settings.cpp.

693  {
694  setLinearCurve(config->scriptCurve2, value, value, 1);
695 }
Here is the call graph for this function:

◆ setSensorChartMode()

static void setSensorChartMode ( int  value)
static

Definition at line 169 of file settings.cpp.

Here is the call graph for this function:

◆ setSpiMode()

static void setSpiMode ( int  index,
bool  mode 
)
static

Definition at line 530 of file settings.cpp.

530  {
531  switch (index) {
532  case 1:
534  break;
535  case 2:
537  break;
538  case 3:
540  break;
541  default:
542  efiPrintf("invalid spi index %d", index);
543  return;
544  }
545  printSpiState();
546 }

Referenced by disableSpi(), and enableSpi().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStarterRelayPin()

static void setStarterRelayPin ( const char *  pinName)
static

Definition at line 406 of file settings.cpp.

406  {
407  setIndividualPin(pinName, &engineConfiguration->starterRelayDisablePin, "starter disable relay");
408 }

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTimingMode()

static void setTimingMode ( int  value)
static

Definition at line 158 of file settings.cpp.

Here is the call graph for this function:

◆ setTriggerInputPin()

static void setTriggerInputPin ( const char *  indexStr,
const char *  pinName 
)
static

For example: set_trigger_input_pin 0 PA5 todo: this method counts index from 0 while at least 'set_ignition_pin' counts from 1. todo: make things consistent

Definition at line 441 of file settings.cpp.

441  {
442  int index = atoi(indexStr);
443  if (index < 0 || index > 2)
444  return;
446  if (pin == Gpio::Invalid) {
447  return;
448  }
449  efiPrintf("setting trigger pin[%d] to %s please save&restart", index, hwPortname(pin));
452 }
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTriggerSimulatorPin()

static void setTriggerSimulatorPin ( const char *  indexStr,
const char *  pinName 
)
static

Definition at line 454 of file settings.cpp.

454  {
455  int index = atoi(indexStr);
456  if (index < 0 || index >= TRIGGER_SIMULATOR_PIN_COUNT)
457  return;
459  if (pin == Gpio::Invalid) {
460  return;
461  }
462  efiPrintf("setting trigger simulator pin[%d] to %s please save&restart", index, hwPortname(pin));
465 }

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTriggerSyncPin()

static void setTriggerSyncPin ( const char *  pinName)
static

Definition at line 402 of file settings.cpp.

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTriggerType()

static void setTriggerType ( int  value)
static

Definition at line 282 of file settings.cpp.

282  {
286  efiPrintf("Do you need to also invoke set operation_mode X?");
288 }
trigger_type_e
Definition: engine_types.h:286
Here is the call graph for this function:

◆ setValue()

static void setValue ( const char *  paramStr,
const char *  valueStr 
)
static

Definition at line 757 of file settings.cpp.

757  {
758  float valueF = atoff(valueStr);
759  int valueI = atoi(valueStr);
760 
761  const command_f_s *currentF = &commandsF[0];
762  while (currentF < commandsF + sizeof(commandsF)/sizeof(commandsF[0])) {
763  if (strEqualCaseInsensitive(paramStr, currentF->token)) {
764  currentF->callback(valueF);
765  return;
766  }
767  currentF++;
768  }
769 
770  const command_i_s *currentI = &commandsI[0];
771  while (currentI < commandsI + sizeof(commandsI)/sizeof(commandsI[0])) {
772  if (strEqualCaseInsensitive(paramStr, currentI->token)) {
773  currentI->callback(valueI);
774  return;
775  }
776  currentI++;
777  }
778 
779 
780  if (strEqualCaseInsensitive(paramStr, "warning_period")) {
782  } else if (strEqualCaseInsensitive(paramStr, "dwell")) {
783  setConstantDwell(valueF);
784  } else if (strEqualCaseInsensitive(paramStr, CMD_ENGINESNIFFERRPMTHRESHOLD)) {
786  } else if (strEqualCaseInsensitive(paramStr, "tps_max")) {
787  engineConfiguration->tpsMax = valueI;
788  } else if (strEqualCaseInsensitive(paramStr, "tps_min")) {
789  engineConfiguration->tpsMin = valueI;
790 #if EFI_EMULATE_POSITION_SENSORS
791  } else if (strEqualCaseInsensitive(paramStr, CMD_RPM)) {
792  setTriggerEmulatorRPM(valueI);
793 #endif // EFI_EMULATE_POSITION_SENSORS
794  } else if (strEqualCaseInsensitive(paramStr, "mc33_hvolt")) {
796  } else if (strEqualCaseInsensitive(paramStr, "mc33_i_peak")) {
798  } else if (strEqualCaseInsensitive(paramStr, "mc33_i_hold")) {
800  } else if (strEqualCaseInsensitive(paramStr, "mc33_t_max_boost")) {
802  } else if (strEqualCaseInsensitive(paramStr, "mc33_t_peak_off")) {
804  } else if (strEqualCaseInsensitive(paramStr, "vvt_offset")) {
805  engineConfiguration->vvtOffsets[0] = valueF;
806  } else if (strEqualCaseInsensitive(paramStr, "vvt_mode")) {
807  engineConfiguration->vvtMode[0] = (vvt_mode_e)valueI;
808  } else if (strEqualCaseInsensitive(paramStr, "wwaeTau")) {
809  engineConfiguration->wwaeTau = valueF;
810  } else if (strEqualCaseInsensitive(paramStr, "wwaeBeta")) {
811  engineConfiguration->wwaeBeta = valueF;
812  } else if (strEqualCaseInsensitive(paramStr, "benchTestOffTime")) {
814  } else if (strEqualCaseInsensitive(paramStr, "benchTestCount")) {
816  } else if (strEqualCaseInsensitive(paramStr, "cranking_dwell")) {
818 #if EFI_PROD_CODE
819  } else if (strEqualCaseInsensitive(paramStr, CMD_VSS_PIN)) {
820  setVssPin(valueStr);
821 #endif // EFI_PROD_CODE
822  } else if (strEqualCaseInsensitive(paramStr, "targetvbatt")) {
824  } else if (strEqualCaseInsensitive(paramStr, CMD_DATE)) {
825  // rusEfi console invokes this method with timestamp in local timezone
826  setDateTime(valueStr);
827  }
828 
829  bool isGoodName = setConfigValueByName(paramStr, valueF);
830  if (isGoodName) {
831  efiPrintf("Settings: applying [%s][%f]", paramStr, valueF);
832  }
833 
835 }
void setConstantDwell(floatms_t dwellMs)
Sets the same dwell time across the whole getRpm() range set dwell X.
vvt_mode_e
Definition: rusefi_enums.h:122
const command_i_s commandsI[]
Definition: settings.cpp:719
const command_f_s commandsF[]
Definition: settings.cpp:707
static void setVssPin(const char *pinName)
Definition: settings.cpp:389
void setDateTime(const char *const isoDateTime)
Definition: settings.cpp:908
void setTriggerEmulatorRPM(int rpm)
bool setConfigValueByName(const char *name, float value)

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setVssPin()

static void setVssPin ( const char *  pinName)
static

Definition at line 389 of file settings.cpp.

Referenced by setValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWholePhaseMapCmd()

static void setWholePhaseMapCmd ( float  value)
static

Definition at line 298 of file settings.cpp.

298  {
299  efiPrintf("Setting whole injection phase map to %.2f", value);
300  setTable(config->injectionPhase, value);
301 }
int16_t injectionPhase[FUEL_LOAD_COUNT][FUEL_RPM_COUNT]
constexpr void setTable(TElement(&dest)[N][M], const VElement value)
Definition: table_helper.h:158

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWholeTimingMap()

static void setWholeTimingMap ( float  value)
static

Definition at line 294 of file settings.cpp.

294  {
295  setTable(config->ignitionTable, value);
296 }
scaled_channel< int16_t, 10, 1 > ignitionTable[IGN_LOAD_COUNT][IGN_RPM_COUNT]

Referenced by setWholeTimingMapCmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWholeTimingMapCmd()

static void setWholeTimingMapCmd ( float  value)
static

Definition at line 303 of file settings.cpp.

303  {
304  efiPrintf("Setting whole timing advance map to %.2f", value);
305  setWholeTimingMap(value);
307 }
static void setWholeTimingMap(float value)
Definition: settings.cpp:294

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWholeVeCmd()

static void setWholeVeCmd ( float  value)
static

Definition at line 309 of file settings.cpp.

309  {
310  efiPrintf("Setting whole VE map to %.2f", value);
311  if (engineConfiguration->fuelAlgorithm != LM_SPEED_DENSITY) {
312  efiPrintf("WARNING: setting VE map not in SD mode is pointless");
313  }
314  setTable(config->veTable, value);
316 }
scaled_channel< uint16_t, 10, 1 > veTable[FUEL_LOAD_COUNT][FUEL_RPM_COUNT]

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showPinFunction()

static void showPinFunction ( const char *  pinName)
static

Definition at line 520 of file settings.cpp.

520  {
522  if (pin == Gpio::Invalid) {
523  return;
524  }
525  efiPrintf("Pin %s: [%s]", pinName, getPinFunction(pin));
526 }
const char * getPinFunction(brain_input_pin_e brainPin)

Referenced by initSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ commandsF

const command_f_s commandsF[]
Initial value:
= {
#if EFI_ENGINE_CONTROL
{"global_trigger_offset_angle", setGlobalTriggerAngleOffset},
{"cranking_fuel", setCrankingFuel},
{"cranking_iac", setCrankingIACExtra},
{"cranking_timing_angle", setCrankingTimingAngle},
{"flat_injector_lag", setFlatInjectorLag},
#endif
{"script_curve_1_value", setScriptCurve1Value},
{"script_curve_2_value", setScriptCurve2Value},
}
void setFlatInjectorLag(float value)
static void setCrankingIACExtra(float percent)
Definition: settings.cpp:231
static void setScriptCurve1Value(float value)
Definition: settings.cpp:689
static void setCrankingTimingAngle(float value)
Definition: settings.cpp:251
static void setScriptCurve2Value(float value)
Definition: settings.cpp:693
static void setCrankingFuel(float timeMs)
Definition: settings.cpp:236
static void setGlobalTriggerAngleOffset(float value)
Definition: settings.cpp:241

Definition at line 707 of file settings.cpp.

Referenced by setValue().

◆ commandsI

const command_i_s commandsI[]

Definition at line 719 of file settings.cpp.

Referenced by setValue().

◆ verboseRxCan

bool verboseRxCan = false

Definition at line 548 of file settings.cpp.

Referenced by enableOrDisable(), and processCanRxMessage().

◆ waveChart

WaveChart waveChart
extern

Definition at line 33 of file trigger_central.cpp.

◆ waveChartUsedSize

int waveChartUsedSize
extern

Definition at line 60 of file engine_sniffer.cpp.

Referenced by WaveChart::publish().

Go to the source code of this file.