fix #539 reducing idle stepper reaction time

This commit is contained in:
rusefi 2018-01-21 12:19:36 -05:00
parent 7925600d9d
commit 53394cd506
8 changed files with 16 additions and 17 deletions

View File

@ -756,7 +756,6 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->idleRpmPid.maxValue = 95;
boardConfiguration->idlePidDeactivationTpsThreshold = 2;
boardConfiguration->idleStepperPulseDuration = 10;
boardConfiguration->idle.solenoidFrequency = 200;
// set idle_position 50
boardConfiguration->manIdlePosition = 50;

View File

@ -1,4 +1,4 @@
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Jan 17 18:44:14 EST 2018
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 21 12:13:41 EST 2018
// begin
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
#define ENGINE_CONFIGURATION_GENERATED_H_
@ -721,7 +721,7 @@ typedef struct {
/**
* offset 582
*/
int16_t idleStepperPulseDuration;
int16_t unusedPD;
/**
* offset 584
*/
@ -1651,6 +1651,7 @@ typedef struct {
*/
pin_output_mode_e stepperDirectionPinMode;
/**
* on ECU start turn fuel pump on to build fuel pressure
* offset 2008
*/
int16_t startUpFuelPumpDuration;
@ -1834,7 +1835,7 @@ typedef struct {
*/
brain_input_pin_e camInput;
/**
* IAC cranking position
* IAC position during cranking
* offset 2380
*/
int crankingIACposition;
@ -2320,4 +2321,4 @@ typedef struct {
#endif
// end
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Jan 17 18:44:14 EST 2018
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 21 12:13:41 EST 2018

View File

@ -706,8 +706,8 @@
#define mapMinBufferLength_offset_hex 4a0
#define idlePidDeactivationTpsThreshold_offset 1188
#define idlePidDeactivationTpsThreshold_offset_hex 4a4
#define idleStepperPulseDuration_offset 1190
#define idleStepperPulseDuration_offset_hex 4a6
#define unusedPD_offset 1190
#define unusedPD_offset_hex 4a6
#define nb2ratioFrom_offset 1192
#define nb2ratioFrom_offset_hex 4a8
#define nb2ratioTo_offset 1196

View File

@ -65,7 +65,7 @@ static msg_t stThread(StepperMotor *motor) {
int currentPosition = motor->currentPosition;
if (targetPosition == currentPosition) {
chThdSleepMilliseconds(boardConfiguration->idleStepperPulseDuration);
chThdSleepMilliseconds(motor->reactionTime);
continue;
}
bool isIncrementing = targetPosition > currentPosition;
@ -111,9 +111,9 @@ void StepperMotor::pulse() {
palWritePad(enablePort, enablePin, false); // ebable stepper
palWritePad(stepPort, stepPin, true);
chThdSleepMilliseconds(boardConfiguration->idleStepperPulseDuration);
chThdSleepMilliseconds(reactionTime);
palWritePad(stepPort, stepPin, false);
chThdSleepMilliseconds(boardConfiguration->idleStepperPulseDuration);
chThdSleepMilliseconds(reactionTime);
palWritePad(enablePort, enablePin, true); // disable stepper
}

View File

@ -574,7 +574,7 @@ custom uart_device_e 4 bits,U32, @OFFSET@, [0:1], "Off", "UART1", "UART2", "UA
uart_device_e consoleUartDevice;
int mapMinBufferLength;;"count", 1, 0, 0, 24, 0
int16_t idlePidDeactivationTpsThreshold;;"%", 1, 0, 0, 100.0, 0
int16_t idleStepperPulseDuration;;"ms", 1, 0, 0, 1000.0, 0
int16_t unusedPD;;"ms", 1, 0, 0, 1000.0, 0
float nb2ratioFrom;;"value", 1, 0, 0, 1000, 5
float nb2ratioTo;;"value", 1, 0, 0, 1000, 5

View File

@ -263,5 +263,5 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20180119;
return 20180121;
}

View File

@ -1295,7 +1295,6 @@ cmd_stop_engine = "w\x00\x99\x00\x00"
field = "Idle Stepper Dir Mode", stepperDirectionPinMode
field = "Idle Stepper Step", idle_stepperStepPin
field = "Idle Stepper Enable", stepperEnablePin
field = "Idle Stepper Pulse", idleStepperPulseDuration
field = "Fuel Pump Pin", fuelPumpPin
field = "ETB Dir #1", etbDirectionPin1
field = "ETB Dir #2", etbDirectionPin2

View File

@ -1,6 +1,6 @@
package com.rusefi.config;
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Jan 10 22:53:42 EST 2018
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 21 12:13:41 EST 2018
public class Fields {
public static final int LE_COMMAND_LENGTH = 200;
public static final int BLOCKING_FACTOR = 400;
@ -492,7 +492,7 @@ public class Fields {
public static final int consoleUartDevice_offset = 1180;
public static final int mapMinBufferLength_offset = 1184;
public static final int idlePidDeactivationTpsThreshold_offset = 1188;
public static final int idleStepperPulseDuration_offset = 1190;
public static final int unusedPD_offset = 1190;
public static final int nb2ratioFrom_offset = 1192;
public static final int nb2ratioTo_offset = 1196;
public static final int triggerErrorPin_offset = 1200;
@ -1453,7 +1453,7 @@ public class Fields {
public static final Field CONSOLEUARTDEVICE = Field.create("CONSOLEUARTDEVICE", 1180, FieldType.INT);
public static final Field MAPMINBUFFERLENGTH = Field.create("MAPMINBUFFERLENGTH", 1184, FieldType.INT);
public static final Field IDLEPIDDEACTIVATIONTPSTHRESHOLD = Field.create("IDLEPIDDEACTIVATIONTPSTHRESHOLD", 1188, FieldType.INT);
public static final Field IDLESTEPPERPULSEDURATION = Field.create("IDLESTEPPERPULSEDURATION", 1190, FieldType.INT);
public static final Field UNUSEDPD = Field.create("UNUSEDPD", 1190, FieldType.INT);
public static final Field NB2RATIOFROM = Field.create("NB2RATIOFROM", 1192, FieldType.FLOAT);
public static final Field NB2RATIOTO = Field.create("NB2RATIOTO", 1196, FieldType.FLOAT);
public static final Field TRIGGERERRORPIN = Field.create("TRIGGERERRORPIN", 1200, FieldType.INT, brain_pin_e);