2019-09-21 12:33:13 -07:00
|
|
|
/**
|
|
|
|
* @file init.h
|
|
|
|
*/
|
|
|
|
|
2019-09-21 11:33:38 -07:00
|
|
|
#pragma once
|
|
|
|
|
2020-04-05 06:10:08 -07:00
|
|
|
|
2020-02-08 01:22:23 -08:00
|
|
|
// Call this once at startup to initialize, configure, and subscribe sensors
|
2021-11-16 01:15:29 -08:00
|
|
|
void initNewSensors();
|
2020-02-08 01:22:23 -08:00
|
|
|
|
2021-11-16 01:15:29 -08:00
|
|
|
void stopSensors();
|
2021-08-24 13:41:16 -07:00
|
|
|
|
2020-02-08 01:22:23 -08:00
|
|
|
// Call this whenever the configuration may have changed, so any sensors
|
|
|
|
// can be reconfigured with the new settings.
|
|
|
|
// Note: this may not be necessarily possible for all sensors, so some may
|
|
|
|
// do nothing when this is called.
|
2021-11-16 01:15:29 -08:00
|
|
|
void reconfigureSensors();
|
2020-04-05 06:10:08 -07:00
|
|
|
|
|
|
|
// Internal init functions for individual systems
|
|
|
|
// Sensor init/config
|
2021-11-16 01:15:29 -08:00
|
|
|
void initVbatt();
|
|
|
|
void initMaf();
|
|
|
|
void initMap();
|
|
|
|
void initTps();
|
|
|
|
void initOilPressure();
|
|
|
|
void initThermistors();
|
2020-08-31 04:45:52 -07:00
|
|
|
void initCanSensors();
|
2021-11-16 01:15:29 -08:00
|
|
|
void initLambda();
|
|
|
|
void initFlexSensor();
|
|
|
|
void initFuelLevel();
|
|
|
|
void initBaro();
|
|
|
|
void initAuxSensors();
|
|
|
|
void initVehicleSpeedSensor();
|
|
|
|
void initTurbochargerSpeedSensor();
|
2020-04-05 06:10:08 -07:00
|
|
|
|
|
|
|
// Sensor reconfiguration
|
2021-08-24 13:41:16 -07:00
|
|
|
void deinitVbatt();
|
|
|
|
void deinitTps();
|
|
|
|
void deinitThermistors();
|
2021-09-30 16:58:01 -07:00
|
|
|
void deinitOilPressure();
|
2021-08-20 23:02:05 -07:00
|
|
|
void deInitFlexSensor();
|
2021-08-23 21:55:41 -07:00
|
|
|
void deInitVehicleSpeedSensor();
|
2021-09-19 17:50:11 -07:00
|
|
|
void deinitTurbochargerSpeedSensor();
|
2021-10-04 14:18:08 -07:00
|
|
|
void deinitMap();
|