2019-09-21 11:33:38 -07:00
|
|
|
/**
|
|
|
|
* @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
|
|
|
|
|
2019-09-21 11:33:38 -07:00
|
|
|
/**
|
|
|
|
**************************************
|
|
|
|
* 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
|
2021-10-16 15:15:10 -07:00
|
|
|
Iat,
|
|
|
|
Rpm,
|
2021-11-14 18:24:44 -08:00
|
|
|
/**
|
|
|
|
* This value is result of averaging within user-defined window
|
|
|
|
* See also MapFast, MapSlow
|
|
|
|
*/
|
2021-10-16 15:15:10 -07:00
|
|
|
Map,
|
|
|
|
Maf,
|
2019-09-21 11:33:38 -07:00
|
|
|
|
2021-10-19 08:05:20 -07:00
|
|
|
OilPressure, // 6
|
2019-09-21 11:33:38 -07:00
|
|
|
|
2021-10-16 15:15:10 -07:00
|
|
|
FuelPressureLow, // in kPa
|
|
|
|
FuelPressureHigh, // in kPa
|
|
|
|
FuelPressureInjector,
|
2020-10-23 04:31:47 -07:00
|
|
|
|
2019-09-21 11:33:38 -07:00
|
|
|
// This is the "resolved" position, potentially composited out of the following two
|
2021-10-19 08:05:20 -07:00
|
|
|
Tps1, // 10
|
2019-09-21 11:33:38 -07:00
|
|
|
// This is the first sensor
|
2021-10-16 15:15:10 -07:00
|
|
|
Tps1Primary,
|
2019-09-21 11:33:38 -07:00
|
|
|
// This is the second sensor
|
2021-10-16 15:15:10 -07:00
|
|
|
Tps1Secondary,
|
2019-09-21 11:33:38 -07:00
|
|
|
|
2021-10-16 15:15:10 -07:00
|
|
|
Tps2,
|
|
|
|
Tps2Primary,
|
|
|
|
Tps2Secondary,
|
2020-02-03 22:54:05 -08:00
|
|
|
|
2020-03-22 14:09:46 -07:00
|
|
|
// Redundant and combined sensors for acc pedal
|
2021-10-16 15:15:10 -07:00
|
|
|
AcceleratorPedal,
|
|
|
|
AcceleratorPedalPrimary,
|
|
|
|
AcceleratorPedalSecondary,
|
2020-03-22 14:09:46 -07:00
|
|
|
|
2020-03-22 14:29:01 -07:00
|
|
|
// This maps to the pedal if we have one, and Tps1 if not.
|
2021-10-16 15:15:10 -07:00
|
|
|
DriverThrottleIntent,
|
2020-03-22 14:29:01 -07:00
|
|
|
|
2022-04-09 14:44:49 -07:00
|
|
|
AuxTemp1, // 20
|
2021-10-16 15:15:10 -07:00
|
|
|
AuxTemp2,
|
2020-04-07 13:07:09 -07:00
|
|
|
|
2021-10-16 15:15:10 -07:00
|
|
|
Lambda1,
|
|
|
|
Lambda2,
|
2020-09-01 13:22:31 -07:00
|
|
|
|
2021-10-16 15:15:10 -07:00
|
|
|
WastegatePosition,
|
|
|
|
IdlePosition,
|
2020-09-18 00:04:07 -07:00
|
|
|
|
2021-10-16 15:15:10 -07:00
|
|
|
FuelEthanolPercent,
|
2021-01-05 04:57:26 -08:00
|
|
|
|
2021-10-16 15:15:10 -07:00
|
|
|
BatteryVoltage,
|
2021-02-03 05:55:40 -08:00
|
|
|
|
2021-10-16 15:15:10 -07:00
|
|
|
BarometricPressure,
|
2021-02-07 15:54:41 -08:00
|
|
|
|
2021-10-16 15:15:10 -07:00
|
|
|
FuelLevel,
|
2021-03-19 05:39:08 -07:00
|
|
|
|
2021-10-16 15:15:10 -07:00
|
|
|
Aux1,
|
|
|
|
Aux2,
|
|
|
|
Aux3,
|
|
|
|
Aux4,
|
2021-10-19 16:48:18 -07:00
|
|
|
Aux5,
|
|
|
|
Aux6,
|
|
|
|
Aux7,
|
|
|
|
Aux8,
|
2021-05-09 16:47:37 -07:00
|
|
|
|
2021-10-16 15:15:10 -07:00
|
|
|
VehicleSpeed,
|
2021-08-12 12:16:51 -07:00
|
|
|
|
2021-10-16 15:15:10 -07:00
|
|
|
TurbochargerSpeed,
|
2021-09-20 12:39:41 -07:00
|
|
|
|
2021-10-04 14:18:08 -07:00
|
|
|
// Fast MAP is synchronous to crank angle - user selectable phase/window
|
2021-10-16 15:15:10 -07:00
|
|
|
MapFast,
|
2021-10-04 14:18:08 -07:00
|
|
|
// 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
|
2021-10-16 15:15:10 -07:00
|
|
|
MapSlow,
|
2021-10-04 14:18:08 -07:00
|
|
|
|
2022-03-20 17:13:04 -07:00
|
|
|
AuxLinear1,
|
|
|
|
AuxLinear2,
|
|
|
|
|
2022-03-28 23:06:58 -07:00
|
|
|
AuxSpeed1,
|
|
|
|
AuxSpeed2,
|
|
|
|
|
2022-04-21 06:07:52 -07:00
|
|
|
|
|
|
|
InputShaftSpeed,
|
|
|
|
|
2019-09-21 11:33:38 -07:00
|
|
|
// Leave me at the end!
|
2021-10-16 15:15:10 -07:00
|
|
|
PlaceholderLast,
|
2021-10-20 18:42:09 -07:00
|
|
|
};
|