MCPcopy Create free account
hub / github.com/PowerBroker2/ELMduino / selectCalculator(uint16_t pid))

Method selectCalculator(uint16_t pid))

src/ELMduino.cpp:769–896  ·  view source on GitHub ↗

double ELM327::selectCalculator(uint16_t pid))() Description: ------------ * Selects the appropriate calculation function for a given PID. Inputs: ------- * uint16_t pid - The Parameter ID (PID) from the service Return: ------- * double (*func()) - Pointer to a function to be used to calculate the value for this PID. Returns nullptr if the PID is cal

Source from the content-addressed store, hash-verified

767 implemented in conditionResponse(). (Maintained for backward compatibility)
768*/
769double (*ELM327::selectCalculator(uint16_t pid))()
770{
771 switch (pid)
772 {
773 case ENGINE_LOAD:
774 case ENGINE_COOLANT_TEMP:
775 case SHORT_TERM_FUEL_TRIM_BANK_1:
776 case LONG_TERM_FUEL_TRIM_BANK_1:
777 case SHORT_TERM_FUEL_TRIM_BANK_2:
778 case LONG_TERM_FUEL_TRIM_BANK_2:
779 case FUEL_PRESSURE:
780 case INTAKE_MANIFOLD_ABS_PRESSURE:
781 case VEHICLE_SPEED:
782 case TIMING_ADVANCE:
783 case INTAKE_AIR_TEMP:
784 case THROTTLE_POSITION:
785 case COMMANDED_EGR:
786 case EGR_ERROR:
787 case COMMANDED_EVAPORATIVE_PURGE:
788 case FUEL_TANK_LEVEL_INPUT:
789 case WARM_UPS_SINCE_CODES_CLEARED:
790 case ABS_BAROMETRIC_PRESSURE:
791 case RELATIVE_THROTTLE_POSITION:
792 case AMBIENT_AIR_TEMP:
793 case ABS_THROTTLE_POSITION_B:
794 case ABS_THROTTLE_POSITION_C:
795 case ABS_THROTTLE_POSITION_D:
796 case ABS_THROTTLE_POSITION_E:
797 case ABS_THROTTLE_POSITION_F:
798 case COMMANDED_THROTTLE_ACTUATOR:
799 case ETHANOL_FUEL_PERCENT:
800 case RELATIVE_ACCELERATOR_PEDAL_POS:
801 case HYBRID_BATTERY_REMAINING_LIFE:
802 case ENGINE_OIL_TEMP:
803 case DEMANDED_ENGINE_PERCENT_TORQUE:
804 case ACTUAL_ENGINE_TORQUE:
805 return nullptr;
806
807 case ENGINE_RPM:
808 return calculator_0C;
809
810 case MAF_FLOW_RATE:
811 return calculator_10;
812
813 case OXYGEN_SENSOR_1_A:
814 case OXYGEN_SENSOR_2_A:
815 case OXYGEN_SENSOR_3_A:
816 case OXYGEN_SENSOR_4_A:
817 case OXYGEN_SENSOR_5_A:
818 case OXYGEN_SENSOR_6_A:
819 case OXYGEN_SENSOR_7_A:
820 case OXYGEN_SENSOR_8_A:
821 case OXYGEN_SENSOR_1_B:
822 case OXYGEN_SENSOR_2_B:
823 case OXYGEN_SENSOR_3_B:
824 case OXYGEN_SENSOR_4_B:
825 case OXYGEN_SENSOR_6_B:
826 case OXYGEN_SENSOR_7_B:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected