19#if EFI_PROD_CODE && HAL_USE_ADC
38#if EFI_PROD_CODE && HAL_USE_ADC
46 criticalError(
"Please pick either analog AFR or CAN AFR input not both.");
113#if EFI_PROD_CODE && EFI_CAN_SUPPORT
135#if defined(HARDWARE_CI) && !defined(HW_PROTEUS)
136 chThdSleepMilliseconds(100);
177 using namespace rusefi::stringutil;
179 addConsoleActionSS(
"set_sensor_mock", [](
const char* typeName,
const char* valueStr) {
183 efiPrintf(
"Invalid sensor type specified: %s", typeName);
187 float value = atoff(valueStr);
void efiSetPadMode(const char *msg, brain_pin_e brainPin, iomode_t mode)
SimpleSwitchedState luaDigitalInputState[LUA_DIGITAL_INPUT_COUNT]
static void setMockValue(SensorType type, float value, bool mockRedundant=false)
static void showAllSensorInfo()
virtual void showInfo(const char *sensorName) const =0
static float getOrZero(SensorType type)
static void resetAllMocks()
bool update(bool newState)
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.
Command-line interface commands registry.
brain_pin_e getAdcChannelBrainPin(const char *msg, adc_channel_e hwChannel)
static EngineAccessor engine
engine_configuration_s & activeConfiguration
static constexpr engine_configuration_s * engineConfiguration
void deInitVehicleSpeedSensor()
void initTurbochargerSpeedSensor()
void deinitTurbochargerSpeedSensor()
void initFlexSensor(bool isFirstTime)
void deinitInputShaftSpeedSensor()
void deinitFluidPressure()
void deinitAuxSpeedSensors()
void initInputShaftSpeedSensor()
void initVehicleSpeedSensor()
void initAuxSpeedSensors()
void deInitIfValid(const char *msg, adc_channel_e channel)
static LuaOverrideSensor overrideBatteryVoltage(SensorType::DashOverrideBatteryVoltage, SensorType::BatteryVoltage)
void initIfValid(const char *msg, adc_channel_e channel)
static void sensorStartUpOrReconfiguration(bool isFirstTime)
void reconfigureSensors()
void initOverrideSensors()
static void deInitAuxDigital()
static void deInitOldAnalogInputs()
static void initOldAnalogInputs()
static void initSensorCli()
static void initAuxDigital()
static LuaOverrideSensor overrideVehicleSpeed(SensorType::DashOverrideVehicleSpeed, SensorType::VehicleSpeed)
static LuaOverrideSensor overrideClt(SensorType::DashOverrideClt, SensorType::Clt)
static LuaOverrideSensor overrideRpm(SensorType::DashOverrideRpm, SensorType::Rpm)
void efiSetPadUnused(brain_pin_e brainPin)
this file is about general input/output utility methods, not much EFI-specifics
bool getAuxDigital(int index)
void brain_pin_markUnused(brain_pin_e brainPin)
SensorType findSensorTypeByName(const char *name)
@ DashOverrideBatteryVoltage
@ DashOverrideVehicleSpeed
switch_input_pin_e luaDigitalInputPins[LUA_DIGITAL_INPUT_COUNT]
adc_channel_e auxFastSensor1_adcChannel
pin_input_mode_e luaDigitalInputPinModes[LUA_DIGITAL_INPUT_COUNT]