2019-09-21 12:33:13 -07:00
|
|
|
/**
|
|
|
|
* @file init.h
|
|
|
|
*/
|
|
|
|
|
2019-09-21 11:33:38 -07:00
|
|
|
#pragma once
|
|
|
|
|
2021-03-19 05:39:08 -07:00
|
|
|
#include "engine_ptr.h"
|
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-04-18 17:02:32 -07:00
|
|
|
void initNewSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
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.
|
2020-04-05 06:10:08 -07:00
|
|
|
void reconfigureSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|
|
|
|
|
|
|
// Internal init functions for individual systems
|
|
|
|
// Sensor init/config
|
2021-02-03 05:55:40 -08:00
|
|
|
void initVbatt(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
2020-12-30 05:43:49 -08:00
|
|
|
void initMap(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
2020-08-31 04:45:52 -07:00
|
|
|
void initTps(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
|
|
|
void initOilPressure(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
|
|
|
void initThermistors(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
|
|
|
void initCanSensors();
|
2020-09-01 13:22:31 -07:00
|
|
|
void initLambda(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
2021-01-05 04:57:26 -08:00
|
|
|
void initFlexSensor(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
2021-03-19 05:39:08 -07:00
|
|
|
void initFuelLevel(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
2021-03-04 19:39:20 -08:00
|
|
|
void initBaro();
|
2020-04-05 06:10:08 -07:00
|
|
|
|
|
|
|
// Sensor reconfiguration
|
2021-02-03 05:55:40 -08:00
|
|
|
void reconfigureVbatt(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
2020-08-31 04:45:52 -07:00
|
|
|
void reconfigureTps(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
|
|
|
void reconfigureThermistors(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
|
|
|
void reconfigureOilPressure(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|