Feed mapAveragingAdcCallback() with volts not adc raw values (#4940)
This commit is contained in:
parent
8718ca076e
commit
a274b1f777
|
@ -125,11 +125,9 @@ void MapAverager::stop() {
|
|||
* @note This method is invoked OFTEN, this method is a potential bottleneck - the implementation should be
|
||||
* as fast as possible
|
||||
*/
|
||||
void mapAveragingAdcCallback(adcsample_t adcValue) {
|
||||
void mapAveragingAdcCallback(float instantVoltage) {
|
||||
efiAssertVoid(CUSTOM_ERR_6650, getCurrentRemainingStack() > 128, "lowstck#9a");
|
||||
|
||||
float instantVoltage = adcToVoltsDivided(adcValue);
|
||||
|
||||
SensorResult mapResult = getMapAvg(currentMapAverager).submit(instantVoltage);
|
||||
|
||||
if (!mapResult) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#if EFI_MAP_AVERAGING
|
||||
|
||||
#if HAL_USE_ADC
|
||||
void mapAveragingAdcCallback(adcsample_t newValue);
|
||||
void mapAveragingAdcCallback(float instantVoltage);
|
||||
#endif
|
||||
|
||||
void initMapAveraging();
|
||||
|
|
|
@ -185,7 +185,7 @@ void onFastAdcComplete(adcsample_t*) {
|
|||
#endif /* EFI_SENSOR_CHART */
|
||||
|
||||
#if EFI_MAP_AVERAGING
|
||||
mapAveragingAdcCallback(getFastAdc(fastMapSampleIndex));
|
||||
mapAveragingAdcCallback(adcToVoltsDivided(getFastAdc(fastMapSampleIndex)));
|
||||
#endif /* EFI_MAP_AVERAGING */
|
||||
#if EFI_HIP_9011
|
||||
if (engineConfiguration->isHip9011Enabled) {
|
||||
|
|
Loading…
Reference in New Issue