rusefi-1/firmware/controllers/sensors/sensor_type.h

103 lines
1.8 KiB
C
Raw Normal View History

/**
* @file sensor_type.h
* @brief Enumeration of sensors supported by the ECU.
*
* @date September 12, 2019
* @author Matthew Kennedy, (c) 2019
*/
#pragma once
2021-03-11 19:44:59 -08:00
#define VBAT_FALLBACK_VALUE 12
/**
**************************************
* SEE sensor.h ON HOW TO ADD NEW SENSOR TYPES
**************************************
*/
2021-10-20 18:42:09 -07:00
enum class SensorType : unsigned char {
2021-10-19 08:05:20 -07:00
Invalid, // we need indeces for Lua consumers. At the moment we still do not expose constants into Lua :(
Clt, // 1
Iat,
Rpm,
2021-11-14 18:24:44 -08:00
/**
* This value is result of averaging within user-defined window
* See also MapFast, MapSlow
*/
Map,
Maf,
2021-10-19 08:05:20 -07:00
OilPressure, // 6
FuelPressureLow, // in kPa
FuelPressureHigh, // in kPa
FuelPressureInjector,
// This is the "resolved" position, potentially composited out of the following two
2021-10-19 08:05:20 -07:00
Tps1, // 10
// This is the first sensor
Tps1Primary,
// This is the second sensor
Tps1Secondary,
Tps2,
Tps2Primary,
Tps2Secondary,
// Redundant and combined sensors for acc pedal
AcceleratorPedal,
AcceleratorPedalPrimary,
AcceleratorPedalSecondary,
// This maps to the pedal if we have one, and Tps1 if not.
DriverThrottleIntent,
2022-04-09 14:44:49 -07:00
AuxTemp1, // 20
AuxTemp2,
Lambda1,
Lambda2,
WastegatePosition,
IdlePosition,
FuelEthanolPercent,
BatteryVoltage,
BarometricPressure,
FuelLevel,
Aux1,
Aux2,
Aux3,
Aux4,
2021-10-19 16:48:18 -07:00
Aux5,
Aux6,
Aux7,
Aux8,
VehicleSpeed,
TurbochargerSpeed,
// Fast MAP is synchronous to crank angle - user selectable phase/window
MapFast,
// Slow MAP is asynchronous - not synced to anything, normal analog sampling
2021-11-14 18:24:44 -08:00
// MAP decoding happens only that often thus this is NOT raw MAP as flows from ADC
MapSlow,
AuxLinear1,
AuxLinear2,
AuxSpeed1,
AuxSpeed2,
InputShaftSpeed,
// Leave me at the end!
PlaceholderLast,
2021-10-20 18:42:09 -07:00
};