diff --git a/firmware/controllers/sensors/tps.cpp b/firmware/controllers/sensors/tps.cpp index cc89ed1aad..4155cf114a 100644 --- a/firmware/controllers/sensors/tps.cpp +++ b/firmware/controllers/sensors/tps.cpp @@ -62,7 +62,7 @@ percent_t getTpsValue(int adc DECLARE_ENGINE_PARAMETER_S) { warning(OBD_PCM_Processor_Fault, "Invalid TPS configuration: same value %d", engineConfiguration->tpsMin); return NAN; } - float result = interpolate(TPS_TS_CONVERSION * engineConfiguration->tpsMax, 0, TPS_TS_CONVERSION * engineConfiguration->tpsMin, 100, adc); + float result = interpolate(TPS_TS_CONVERSION * engineConfiguration->tpsMax, 100, TPS_TS_CONVERSION * engineConfiguration->tpsMin, 0, adc); // this would put the value into the 0-100 range return maxF(0, minF(100, result)); } diff --git a/firmware/controllers/trigger/trigger_mazda.cpp b/firmware/controllers/trigger/trigger_mazda.cpp index 8608a99c79..ac1918e800 100644 --- a/firmware/controllers/trigger/trigger_mazda.cpp +++ b/firmware/controllers/trigger/trigger_mazda.cpp @@ -22,7 +22,7 @@ void initializeMazdaMiataNaShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) { s->initialize(FOUR_STROKE_CAM_SENSOR, true); - s->setTriggerSynchronizationGap2(1.4930 * 0.7f, 1.4930 * 1.25f); + s->setTriggerSynchronizationGap2(1.4930 * 0.6f, 1.4930 * 1.3f); s->useRiseEdge = false; s->tdcPosition = 294; diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 5d684eb565..446d9a932f 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -3,6 +3,7 @@ ; this should stop TS from looking for the CAN ID in the 2nd byte location and allow the page reads to work correctly. enable2ndByteCanID = false +#unset tuneByMAF [TunerStudio] queryCommand = "S" @@ -677,8 +678,13 @@ page = 1 [VeAnalyze] + ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition +#if tuneByMAF + veAnalyzeMap = fuelTableTbl, afrTableTbl, AFRactual, egoCorrection, { 1 } +#else veAnalyzeMap = veTableTbl, afrTableTbl, AFRactual, egoCorrection, { 1 } +#endif ;lambdaTargetTables = afrTable1Tbl, afrTable2Tbl, afrTSCustom ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable