|
| TESTABLE_INLINE_STATIC int16_t | fastMap10Bit (uint16_t value, int16_t rangeMin, int16_t rangeMax) |
| | A specialist function to map a value in the range [0, 1023] (I.e. 10-bit) to a different range.
|
| |
| static uint16_t | readAnalogPin (uint8_t pin) |
| |
| static uint16_t | readAnalogSensor (uint8_t pin) |
| |
| static uint16_t | readMAPSensor (uint8_t pin) |
| |
| void | initialiseADC (void) |
| |
| TESTABLE_INLINE_STATIC bool | instanteneousMAPReading (void) |
| |
| static bool | cycleAverageMAPReadingAccumulate (map_cycle_average_t &cycle_average, const map_adc_readings_t &sensorReadings) |
| |
| static void | reset (const statuses ¤t, map_cycle_average_t &cycle_average, const map_adc_readings_t &sensorReadings) |
| |
| static bool | cycleAverageEndCycle (const statuses ¤t, map_cycle_average_t &cycle_average, map_adc_readings_t &sensorReadings) |
| |
| static bool | isCycleCurrent (const statuses ¤t, uint32_t cycleStartIndex) |
| |
| static bool | isCycleCurrent (const statuses ¤t, const map_cycle_average_t &cycle_avg) |
| |
| TESTABLE_INLINE_STATIC bool | canUseCycleAverage (const statuses ¤t, const config2 &page2) |
| |
| TESTABLE_INLINE_STATIC bool | cycleAverageMAPReading (const statuses ¤t, const config2 &page2, map_cycle_average_t &cycle_average, map_adc_readings_t &sensorReadings) |
| |
| static bool | cycleMinimumAccumulate (map_cycle_min_t &cycle_min, const map_adc_readings_t &sensorReadings) |
| |
| static void | reset (const statuses ¤t, map_cycle_min_t &cycle_min, const map_adc_readings_t &sensorReadings) |
| |
| static bool | cycleMinimumEndCycle (const statuses ¤t, map_cycle_min_t &cycle_min, map_adc_readings_t &sensorReadings) |
| |
| static bool | isCycleCurrent (const statuses ¤t, const map_cycle_min_t &cycle_min) |
| |
| TESTABLE_INLINE_STATIC bool | cycleMinimumMAPReading (const statuses ¤t, const config2 &page2, map_cycle_min_t &cycle_min, map_adc_readings_t &sensorReadings) |
| |
| static bool | eventAverageAccumulate (map_event_average_t &eventAverage, const map_adc_readings_t &sensorReadings) |
| |
| static bool | isIgnitionEventValid (const map_event_average_t &eventAverage) |
| |
| static void | reset (map_event_average_t &eventAverage, const map_adc_readings_t &sensorReadings) |
| |
| static bool | eventAverageEndEvent (map_event_average_t &eventAverage, map_adc_readings_t &sensorReadings) |
| |
| static bool | isIgnitionEventCurrent (const map_event_average_t &eventAverage) |
| |
| TESTABLE_INLINE_STATIC bool | canUseEventAverage (const statuses ¤t, const config2 &page2) |
| |
| TESTABLE_INLINE_STATIC bool | eventAverageMAPReading (const statuses ¤t, const config2 &page2, map_event_average_t &eventAverage, map_adc_readings_t &sensorReadings) |
| |
| static bool | isValidMapSensorReading (uint16_t reading) |
| |
| TESTABLE_INLINE_STATIC uint16_t | validateFilterMapSensorReading (uint16_t reading, uint8_t alpha, uint16_t prior) |
| |
| static uint16_t | readFilteredMapADC (uint8_t pin, uint8_t alpha, uint16_t prior) |
| |
| static map_adc_readings_t | readMapSensors (const map_adc_readings_t &previousReadings, const config4 &page4, bool useEMAP) |
| |
| static void | storeLastMAPReadings (map_last_read_t &lastRead, uint16_t oldMAPValue) |
| |
| static uint16_t | mapADCToMAP (uint16_t mapADC, int8_t mapMin, uint16_t mapMax) |
| |
| static void | setMAPValuesFromReadings (const map_adc_readings_t &readings, const config2 &page2, bool useEMAP, statuses ¤t) |
| |
| void | readMAP (void) |
| |
| int16_t | getMAPDelta (void) |
| | Get the MAP change between the last 2 readings.
|
| |
| uint32_t | getMAPDeltaTime (void) |
| | Get the time in µS between the last 2 MAP readings.
|
| |
| void | readTPS (bool useFilter) |
| |
| void | readCLT (bool useFilter) |
| |
| void | readIAT (void) |
| |
| static bool | isValidBaro (uint8_t baro) |
| |
| static void | setBaroFromSensorReading (uint16_t sensorReading) |
| |
| static void | setBaroFromMAP (void) |
| |
| void | readBaro (void) |
| |
| void | initialiseMAPBaro (void) |
| | Initialize the MAP calculation & Baro values.
|
| |
| void | resetMAPcycleAndEvent (void) |
| |
| void | readO2 (void) |
| |
| void | readO2_2 (void) |
| |
| void | readBat (void) |
| |
| uint32_t | vssGetPulseGap (uint8_t historyIndex) |
| | Returns the VSS pulse gap for a given history point.
|
| |
| uint16_t | getSpeed (void) |
| |
| byte | getGear (void) |
| |
| byte | getFuelPressure (void) |
| |
| byte | getOilPressure (void) |
| |
| uint8_t | getAnalogKnock (void) |
| |
| void | flexPulse (void) |
| |
| void | knockPulse (void) |
| |
| void | vssPulse (void) |
| | The ISR function for VSS pulses.
|
| |
| uint16_t | readAuxanalog (uint8_t analogPin) |
| |
| uint16_t | readAuxdigital (uint8_t digitalPin) |
| |
Read sensors with appropriate timing / scheduling.
A specialist function to map a value in the range [0, 1023] (I.e. 10-bit) to a different range.
Mostly used for analog input voltage level to real world value conversions.
analogRead returns a number in the range [0, 1023], representing the pin input voltage from min to max (typically 0V - 5V) We need to convert that value to the real world value the sensor is reading (pressure, temperature etc.) If:
- rangeMin is the real world value when the sensor is reading 0V
- rangeMax is the real world measurement when the sensor is reading 5V
- There is a linear relationship between voltage output and the real world value.
then this function will return the real world measurement (kPa, °C etc)
- Parameters
-
| value | Value to map (should be in range [0, 1023]) |
| rangeMin | Minimum of the output range |
| rangeMax | Maximum of the output range |
- Returns
- int16_t