hondavert-dev/lib/core/models/sensor_defs.dart
2026-07-26 23:51:56 +05:30

68 lines
2.6 KiB
Dart

import 'sensor_def.dart';
import 'flag_def.dart';
/// Master list of all analog sensor definitions.
const List<SensorDef> sensorDefs = [
SensorDef(id: 'rpm', displayName: 'RPM', unit: 'revs', min: 0, max: 9000),
SensorDef(id: 'vss', displayName: 'Speed', unit: 'mph', min: 0, max: 180),
SensorDef(
id: 'map',
displayName: 'Manifold pressure',
unit: 'psi',
min: -30,
max: 30),
SensorDef(
id: 'tps', displayName: 'Throttle pedal', unit: '%', min: 0, max: 100),
SensorDef(
id: 'inj', displayName: 'Injector duration', unit: 'ms', min: 0, max: 20),
SensorDef(
id: 'ign', displayName: 'Timing advance', unit: 'deg', min: -20, max: 60),
SensorDef(
id: 'ect', displayName: 'Coolant temp', unit: '°C', min: -40, max: 150),
SensorDef(
id: 'iat',
displayName: 'Intake air temp',
unit: '°C',
min: -40,
max: 150),
SensorDef(
id: 'bat', displayName: 'Battery voltage', unit: 'V', min: 0, max: 20),
SensorDef(id: 'o2', displayName: 'O2 sensor', unit: 'V', min: 0, max: 1.5),
SensorDef(id: 'gear', displayName: 'Gear', unit: '', min: 1, max: 6),
SensorDef(id: 'eth', displayName: 'Ethanol', unit: '%', min: 0, max: 100),
SensorDef(
id: 'pa', displayName: 'Baro pressure', unit: 'kPa', min: 0, max: 120),
SensorDef(id: 'afr', displayName: 'AFR', unit: 'λ', min: 0.5, max: 2.0),
SensorDef(
id: 'strim', displayName: 'Short trim', unit: '%', min: -30, max: 30),
SensorDef(
id: 'ltrim', displayName: 'Long trim', unit: '%', min: -30, max: 30),
SensorDef(
id: 'ain0', displayName: 'Analog input 0', unit: 'V', min: 0, max: 5),
SensorDef(
id: 'ain1', displayName: 'Analog input 1', unit: 'V', min: 0, max: 5),
SensorDef(
id: 'ain2', displayName: 'Analog input 2', unit: 'V', min: 0, max: 5),
SensorDef(
id: 'ain3', displayName: 'Analog input 3', unit: 'V', min: 0, max: 5),
SensorDef(
id: 'ain4', displayName: 'Analog input 4', unit: 'V', min: 0, max: 5),
SensorDef(
id: 'ain5', displayName: 'Analog input 5', unit: 'V', min: 0, max: 5),
SensorDef(
id: 'ain6', displayName: 'Analog input 6', unit: 'V', min: 0, max: 5),
SensorDef(
id: 'ain7', displayName: 'Analog input 7', unit: 'V', min: 0, max: 5),
];
/// Master list of boolean flag sensors.
const List<FlagDef> flagDefs = [
FlagDef(id: 'mil', displayName: 'MIL'),
FlagDef(id: 'fuelcut', displayName: 'Fuel Cut'),
FlagDef(id: 'fanout', displayName: 'FAN Out'),
FlagDef(id: 'vtec', displayName: 'VTEC'),
FlagDef(id: 'knock', displayName: 'Knock'),
FlagDef(id: 'revlimit', displayName: 'Rev Limit'),
FlagDef(id: 'launch', displayName: 'Launch'),
];