This commit is contained in:
parent
6704806c04
commit
7523f12194
|
@ -115,6 +115,7 @@ void Engine::reset() {
|
|||
sensorChartMode = SC_OFF;
|
||||
actualLastInjection = 0;
|
||||
fsioTimingAdjustment = 0;
|
||||
fsioIdleTargetRPMAdjustment = 0;
|
||||
isAlternatorControlEnabled = false;
|
||||
callFromPitStopEndTime = 0;
|
||||
rpmHardLimitTimestamp = 0;
|
||||
|
|
|
@ -380,6 +380,7 @@ public:
|
|||
bool isRunningPwmTest;
|
||||
|
||||
float fsioTimingAdjustment;
|
||||
float fsioIdleTargetRPMAdjustment;
|
||||
|
||||
float servoValues[SERVO_COUNT];
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Jul 26 15:39:48 EDT 2018
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jul 29 17:54:43 EDT 2018
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -1341,7 +1341,7 @@ typedef struct {
|
|||
bool useFSIO12ForServo5 : 1;
|
||||
/**
|
||||
offset 1472 bit 26 */
|
||||
bool unused_bit_1472_26 : 1;
|
||||
bool useFSIO15ForIdleRpmAdjustment : 1;
|
||||
/**
|
||||
offset 1472 bit 27 */
|
||||
bool unused_bit_1472_27 : 1;
|
||||
|
@ -2390,4 +2390,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Jul 26 15:39:48 EDT 2018
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jul 29 17:54:43 EDT 2018
|
||||
|
|
|
@ -918,8 +918,8 @@
|
|||
#define useFSIO11ForServo4_offset_hex 5c0
|
||||
#define useFSIO12ForServo5_offset 1472
|
||||
#define useFSIO12ForServo5_offset_hex 5c0
|
||||
#define unused_bit_1472_26_offset 1472
|
||||
#define unused_bit_1472_26_offset_hex 5c0
|
||||
#define useFSIO15ForIdleRpmAdjustment_offset 1472
|
||||
#define useFSIO15ForIdleRpmAdjustment_offset_hex 5c0
|
||||
#define unused_bit_1472_27_offset 1472
|
||||
#define unused_bit_1472_27_offset_hex 5c0
|
||||
#define hipOutputChannel_offset 1476
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#define NO_PWM 0
|
||||
|
||||
|
||||
// see useFSIO15ForIdleRpmAdjustment
|
||||
#define MAGIC_OFFSET_FOR_IDLE_TARGET_RPM 14
|
||||
// see useFSIO16ForTimingAdjustment
|
||||
#define MAGIC_OFFSET_FOR_TIMING_FSIO 15
|
||||
|
||||
|
@ -436,6 +438,16 @@ void runFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
if (boardConfiguration->fanPin != GPIO_UNASSIGNED) {
|
||||
setPinState("fan", &enginePins.fanRelay, radiatorFanLogic);
|
||||
}
|
||||
|
||||
if (engineConfiguration->useFSIO15ForIdleRpmAdjustment) {
|
||||
LEElement * element = fsioLogics[MAGIC_OFFSET_FOR_IDLE_TARGET_RPM];
|
||||
if (element == NULL) {
|
||||
warning(CUSTOM_FSIO_INVALID_EXPRESSION, "invalid expression for %s", "RPM targer");
|
||||
} else {
|
||||
engine->fsioIdleTargetRPMAdjustment = calc.getValue2(engine->fsioIdleTargetRPMAdjustment, element PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
|
||||
}
|
||||
if (engineConfiguration->useFSIO16ForTimingAdjustment) {
|
||||
LEElement * element = fsioLogics[MAGIC_OFFSET_FOR_TIMING_FSIO];
|
||||
|
||||
|
|
|
@ -211,6 +211,8 @@ static percent_t automaticIdleController() {
|
|||
} else {
|
||||
targetRpm = interpolate2d("cltRpm", clt, CONFIG(cltIdleRpmBins), CONFIG(cltIdleRpm), CLT_CURVE_SIZE);
|
||||
}
|
||||
targetRpm += engine->fsioIdleTargetRPMAdjustment;
|
||||
|
||||
|
||||
// check if within the dead zone
|
||||
int rpm = getRpmE(engine);
|
||||
|
|
|
@ -664,7 +664,7 @@ bit hasFrequencyReportingMapSensor;
|
|||
bit useFSIO10ForServo3
|
||||
bit useFSIO11ForServo4
|
||||
bit useFSIO12ForServo5
|
||||
bit unused_bit_1472_26;
|
||||
bit useFSIO15ForIdleRpmAdjustment;
|
||||
bit unused_bit_1472_27;
|
||||
adc_channel_e hipOutputChannel;
|
||||
|
||||
|
|
|
@ -2052,6 +2052,7 @@ cmd_stop_engine = "w\x00\x99\x00\x00"
|
|||
field = "#12", fsioFormulas12
|
||||
field = "#13", fsioFormulas13
|
||||
field = "#14", fsioFormulas14
|
||||
field = "use FSIO #15 for idle RPM adjustment", useFSIO15ForIdleRpmAdjustment
|
||||
field = "#15", fsioFormulas15
|
||||
field = "use FSIO #16 for timing adjustment", useFSIO16ForTimingAdjustment
|
||||
field = "#16", fsioFormulas16
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Jul 26 15:39:48 EDT 2018
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jul 29 17:54:43 EDT 2018
|
||||
public class Fields {
|
||||
public static final int LE_COMMAND_LENGTH = 200;
|
||||
public static final int BLOCKING_FACTOR = 400;
|
||||
|
@ -629,7 +629,7 @@ public class Fields {
|
|||
public static final int useFSIO10ForServo3_offset = 1472;
|
||||
public static final int useFSIO11ForServo4_offset = 1472;
|
||||
public static final int useFSIO12ForServo5_offset = 1472;
|
||||
public static final int unused_bit_1472_26_offset = 1472;
|
||||
public static final int useFSIO15ForIdleRpmAdjustment_offset = 1472;
|
||||
public static final int unused_bit_1472_27_offset = 1472;
|
||||
public static final int hipOutputChannel_offset = 1476;
|
||||
public static final int idleMode_offset = 1480;
|
||||
|
@ -1581,7 +1581,7 @@ public class Fields {
|
|||
public static final Field USEFSIO10FORSERVO3 = Field.create("USEFSIO10FORSERVO3", 1472, FieldType.BIT, 23);
|
||||
public static final Field USEFSIO11FORSERVO4 = Field.create("USEFSIO11FORSERVO4", 1472, FieldType.BIT, 24);
|
||||
public static final Field USEFSIO12FORSERVO5 = Field.create("USEFSIO12FORSERVO5", 1472, FieldType.BIT, 25);
|
||||
public static final Field UNUSED_BIT_1472_26 = Field.create("UNUSED_BIT_1472_26", 1472, FieldType.BIT, 26);
|
||||
public static final Field USEFSIO15FORIDLERPMADJUSTMENT = Field.create("USEFSIO15FORIDLERPMADJUSTMENT", 1472, FieldType.BIT, 26);
|
||||
public static final Field UNUSED_BIT_1472_27 = Field.create("UNUSED_BIT_1472_27", 1472, FieldType.BIT, 27);
|
||||
public static final Field HIPOUTPUTCHANNEL = Field.create("HIPOUTPUTCHANNEL", 1476, FieldType.INT, adc_channel_e);
|
||||
public static final Field IDLEMODE = Field.create("IDLEMODE", 1480, FieldType.INT);
|
||||
|
|
Loading…
Reference in New Issue