mirror of https://github.com/FOME-Tech/fome-fw.git
CUSTOM_INSTANT_MAP_DECODING
This commit is contained in:
parent
7654c84c41
commit
ac03dc55d8
|
@ -2123,7 +2123,7 @@ typedef enum {
|
|||
CUSTOM_ERR_6728 = 6728,
|
||||
CUSTOM_ARTIFICIAL_MISFIRE = 6729,
|
||||
|
||||
|
||||
CUSTOM_INSTANT_MAP_DECODING = 6899,
|
||||
STACK_USAGE_COMMUNICATION = 6900,
|
||||
STACK_USAGE_MIL = 6901,
|
||||
STACK_USAGE_BENCH = 6902,
|
||||
|
|
|
@ -104,7 +104,12 @@ void mapAveragingAdcCallback(adcsample_t adcValue) {
|
|||
efiAssertVoid(CUSTOM_ERR_6650, getCurrentRemainingStack() > 128, "lowstck#9a");
|
||||
|
||||
float instantVoltage = adcToVoltsDivided(adcValue);
|
||||
float instantMap = convertMap(instantVoltage).value_or(0);
|
||||
SensorResult mapResult = convertMap(instantVoltage);
|
||||
if (!mapResult) {
|
||||
// hopefully this warning is not too much CPU consumption for fast ADC callback
|
||||
warning(CUSTOM_INSTANT_MAP_DECODING, "Invalid MAP at %f", instantVoltage);
|
||||
}
|
||||
float instantMap = mapResult.value_or(0);
|
||||
#if EFI_TUNER_STUDIO
|
||||
engine->outputChannels.instantMAPValue = instantMap;
|
||||
#endif // EFI_TUNER_STUDIO
|
||||
|
|
Loading…
Reference in New Issue