fix #539 reducing idle stepper reaction time

This commit is contained in:
rusefi 2018-01-21 12:19:36 -05:00
parent e78b4f25a1
commit 371decae53
9 changed files with 19 additions and 21 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

@ -63,7 +63,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Jan 17 22:57:39 EST 2018
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 21 12:13:41 EST 2018
pageSize = 20000
page = 1
@ -372,7 +372,7 @@ page = 1
consoleUartDevice = bits,U32, 1180, [0:1], "Off", "UART1", "UART2", "UART3"
mapMinBufferLength = scalar, S32, 1184, "count", 1, 0, 0, 24, 0
idlePidDeactivationTpsThreshold = scalar, S16, 1188, "%", 1, 0, 0, 100.0, 0
idleStepperPulseDuration = scalar, S16, 1190, "ms", 1, 0, 0, 1000.0, 0
unusedPD = scalar, S16, 1190, "ms", 1, 0, 0, 1000.0, 0
nb2ratioFrom = scalar, F32, 1192, "value", 1, 0, 0, 1000, 5
nb2ratioTo = scalar, F32, 1196, "value", 1, 0, 0, 1000, 5
triggerErrorPin = bits, U32, 1200, [0:6], "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
@ -2103,7 +2103,7 @@ cmd_stop_engine = "w\x00\x99\x00\x00"
field = "brakePedalPin", brakePedalPin
dialog = allPins2
field = "Tachometer output Pin", tachOutputPin
field = "Tachometer output Pin", tachOutputPin
field = "Dizzy out Pin", dizzySparkOutputPin
field = "O2 heater pin", o2heaterPin
field = "Idle Solenoid Pin", idle_solenoidPin
@ -2111,7 +2111,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

@ -1287,7 +1287,7 @@ cmd_stop_engine = "w\x00\x99\x00\x00"
field = "brakePedalPin", brakePedalPin
dialog = allPins2
field = "Tachometer output Pin", tachOutputPin
field = "Tachometer output Pin", tachOutputPin
field = "Dizzy out Pin", dizzySparkOutputPin
field = "O2 heater pin", o2heaterPin
field = "Idle Solenoid Pin", idle_solenoidPin
@ -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);