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

33 lines
899 B
C
Raw Normal View History

2015-12-31 13:02:30 -08:00
/**
2017-01-03 03:05:22 -08:00
* @author Andrey Belomutskiy, (c) 2012-2017
2015-12-31 13:02:30 -08:00
*/
2015-07-10 06:01:56 -07:00
#ifndef MAP_H_
#define MAP_H_
#include "engine_configuration.h"
#include "sensor_types.h"
void initMapDecoder(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
/**
* @return Raw MAP sensor value right now
*/
float getRawMap(DECLARE_ENGINE_PARAMETER_F);
float getBaroPressure(DECLARE_ENGINE_PARAMETER_F);
2016-01-11 14:01:33 -08:00
bool hasBaroSensor(DECLARE_ENGINE_PARAMETER_F);
2016-12-17 08:01:40 -08:00
bool hasMapSensor(DECLARE_ENGINE_PARAMETER_F);
2015-07-10 06:01:56 -07:00
/**
* @return MAP value averaged within a window of measurement
*/
float getMap(void);
float getMapVoltage(void);
float getMapByVoltage(float voltage DECLARE_ENGINE_PARAMETER_S);
2016-06-18 09:01:50 -07:00
float decodePressure(float voltage, air_pressure_sensor_config_s * mapConfig DECLARE_ENGINE_PARAMETER_S);
2015-09-06 18:02:46 -07:00
float validateMap(float mapKPa DECLARE_ENGINE_PARAMETER_S);
2015-07-10 06:01:56 -07:00
2016-06-26 11:01:41 -07:00
#define INHG2KPA(inhg) ((inhg * 3.386375))
#define KPA2INHG(kpa) ((kpa) / 3.386375)
2015-07-10 06:01:56 -07:00
#endif