mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
70779cedcd
commit
bf36263a31
|
@ -438,6 +438,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
// boardConfiguration->clutchUpPin = GPIOA_14; // note SWCLK - conflict with SWD
|
// boardConfiguration->clutchUpPin = GPIOA_14; // note SWCLK - conflict with SWD
|
||||||
boardConfiguration->clutchUpPinMode = PI_PULLUP;
|
boardConfiguration->clutchUpPinMode = PI_PULLUP;
|
||||||
|
|
||||||
|
engineConfiguration->activateAuxPid1 = 1;
|
||||||
engineConfiguration->auxPidPins[0] = GPIOD_5; // playing with AUX PID for alternator
|
engineConfiguration->auxPidPins[0] = GPIOD_5; // playing with AUX PID for alternator
|
||||||
engineConfiguration->auxPidFrequency[0] = 300;
|
engineConfiguration->auxPidFrequency[0] = 300;
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,14 @@
|
||||||
#if EFI_AUX_PID || defined(__DOXYGEN__)
|
#if EFI_AUX_PID || defined(__DOXYGEN__)
|
||||||
#include "pwm_generator.h"
|
#include "pwm_generator.h"
|
||||||
#include "tunerstudio_configuration.h"
|
#include "tunerstudio_configuration.h"
|
||||||
|
#include "fsio_impl.h"
|
||||||
|
#include "engine_math.h"
|
||||||
|
|
||||||
EXTERN_ENGINE
|
EXTERN_ENGINE
|
||||||
;
|
;
|
||||||
|
|
||||||
|
extern fsio8_Map3D_f32t fsioTable1;
|
||||||
|
|
||||||
// todo: this is to some extent a copy-paste of alternatorController. maybe same loop
|
// todo: this is to some extent a copy-paste of alternatorController. maybe same loop
|
||||||
// for all PIDs?
|
// for all PIDs?
|
||||||
|
|
||||||
|
@ -42,8 +46,20 @@ static msg_t auxPidThread(int param) {
|
||||||
if (parametersVersion.isOld())
|
if (parametersVersion.isOld())
|
||||||
auxPid.reset();
|
auxPid.reset();
|
||||||
|
|
||||||
|
float rpm = engine->rpmCalculator.rpmValue;
|
||||||
|
|
||||||
|
// todo: make this configurable?
|
||||||
|
bool enabledAtCurrentRpm = rpm > engineConfiguration->cranking.rpm;
|
||||||
|
|
||||||
|
if (!enabledAtCurrentRpm) {
|
||||||
|
// we need to avoid accumulating iTerm while engine is not running
|
||||||
|
auxPid.reset();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
float value = getVBatt(PASS_ENGINE_PARAMETER_F); // that's temporary
|
float value = getVBatt(PASS_ENGINE_PARAMETER_F); // that's temporary
|
||||||
float targetValue = engineConfiguration->targetVBatt; // that's temporary
|
float targetValue = fsioTable1.getValue(rpm, getEngineLoadT(PASS_ENGINE_PARAMETER_F));
|
||||||
|
|
||||||
float pwm = auxPid.getValue(targetValue, value, 1);
|
float pwm = auxPid.getValue(targetValue, value, 1);
|
||||||
if (engineConfiguration->isVerboseAuxPid) {
|
if (engineConfiguration->isVerboseAuxPid) {
|
||||||
|
@ -55,6 +71,7 @@ static msg_t auxPidThread(int param) {
|
||||||
if (engineConfiguration->debugMode == AUX_PID_1) {
|
if (engineConfiguration->debugMode == AUX_PID_1) {
|
||||||
tsOutputChannels.debugFloatField1 = pwm;
|
tsOutputChannels.debugFloatField1 = pwm;
|
||||||
auxPid.postState(&tsOutputChannels);
|
auxPid.postState(&tsOutputChannels);
|
||||||
|
tsOutputChannels.debugIntField3 = 10 * targetValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
auxPid1.setSimplePwmDutyCycle(pwm / 100);
|
auxPid1.setSimplePwmDutyCycle(pwm / 100);
|
||||||
|
|
|
@ -96,8 +96,8 @@ float baseFuel;+Fuel squirt duration while cranking\nA number of curves adjust t
|
||||||
int16_t rpm;+Cranking mode threshold. Special cranking logic controls fuel and spark while RPM is below this threshold;"RPM", 1, 0, 0, 3000, 0
|
int16_t rpm;+Cranking mode threshold. Special cranking logic controls fuel and spark while RPM is below this threshold;"RPM", 1, 0, 0, 3000, 0
|
||||||
end_struct
|
end_struct
|
||||||
|
|
||||||
#define debug_mode_e_enum "Alternator", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "mode6", "mode7"
|
#define debug_mode_e_enum "Alternator", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "mode8", "mode9", "mode10", "mode11", "mode12", "mode13", "mode14", "mode15"
|
||||||
custom debug_mode_e 4 bits, U32, @OFFSET@, [0:2], @@debug_mode_e_enum@@
|
custom debug_mode_e 4 bits, U32, @OFFSET@, [0:3], @@debug_mode_e_enum@@
|
||||||
|
|
||||||
|
|
||||||
#define brain_input_pin_e_enum "INVALID", "INVALID", "PA2", "PA3", "INVALID", "PA5", "INVALID", "INVALID", "PA8", "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", "PC6", "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", "PE5", "INVALID", "PE7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "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"
|
#define brain_input_pin_e_enum "INVALID", "INVALID", "PA2", "PA3", "INVALID", "PA5", "INVALID", "INVALID", "PA8", "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", "PC6", "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", "PE5", "INVALID", "PE7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "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"
|
||||||
|
|
|
@ -42,7 +42,7 @@ enable2ndByteCanID = false
|
||||||
|
|
||||||
; see PAGE_0_SIZE in C source code
|
; see PAGE_0_SIZE in C source code
|
||||||
; CONFIG_DEFINITION_START
|
; CONFIG_DEFINITION_START
|
||||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jul 02 16:24:07 EDT 2016
|
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jul 02 18:47:29 EDT 2016
|
||||||
|
|
||||||
pageSize = 16376
|
pageSize = 16376
|
||||||
page = 1
|
page = 1
|
||||||
|
@ -552,7 +552,7 @@ page = 1
|
||||||
tpsDecelEnleanmentThreshold = scalar, F32, 2232, "roc", 1, 0, 0, 200, 3
|
tpsDecelEnleanmentThreshold = scalar, F32, 2232, "roc", 1, 0, 0, 200, 3
|
||||||
tpsDecelEnleanmentMultiplier = scalar, F32, 2236, "coeff", 1, 0, 0, 200, 3
|
tpsDecelEnleanmentMultiplier = scalar, F32, 2236, "coeff", 1, 0, 0, 200, 3
|
||||||
slowAdcAlpha = scalar, F32, 2240, "coeff", 1, 0, 0, 200, 3
|
slowAdcAlpha = scalar, F32, 2240, "coeff", 1, 0, 0, 200, 3
|
||||||
debugMode = bits, U32, 2244, [0:2], "Alternator", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "mode6", "mode7"
|
debugMode = bits, U32, 2244, [0:3], "Alternator", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "mode8", "mode9", "mode10", "mode11", "mode12", "mode13", "mode14", "mode15"
|
||||||
warmupAfrPid_pFactor = scalar, F32, 2248, "value", 1, 0, 0, 1000, 5
|
warmupAfrPid_pFactor = scalar, F32, 2248, "value", 1, 0, 0, 1000, 5
|
||||||
warmupAfrPid_iFactor = scalar, F32, 2252, "value", 1, 0, 0, 1000, 5
|
warmupAfrPid_iFactor = scalar, F32, 2252, "value", 1, 0, 0, 1000, 5
|
||||||
warmupAfrPid_dFactor = scalar, F32, 2256, "value", 1, 0, 0, 1000, 5
|
warmupAfrPid_dFactor = scalar, F32, 2256, "value", 1, 0, 0, 1000, 5
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.rusefi.config;
|
package com.rusefi.config;
|
||||||
|
|
||||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jul 02 16:24:07 EDT 2016
|
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jul 02 18:47:29 EDT 2016
|
||||||
public class Fields {
|
public class Fields {
|
||||||
public static final int LE_COMMAND_LENGTH = 200;
|
public static final int LE_COMMAND_LENGTH = 200;
|
||||||
public static final int FSIO_ADC_COUNT = 4;
|
public static final int FSIO_ADC_COUNT = 4;
|
||||||
|
@ -1432,7 +1432,7 @@ public class Fields {
|
||||||
public static final Field TPSDECELENLEANMENTTHRESHOLD = Field.create("TPSDECELENLEANMENTTHRESHOLD", 2232, FieldType.FLOAT);
|
public static final Field TPSDECELENLEANMENTTHRESHOLD = Field.create("TPSDECELENLEANMENTTHRESHOLD", 2232, FieldType.FLOAT);
|
||||||
public static final Field TPSDECELENLEANMENTMULTIPLIER = Field.create("TPSDECELENLEANMENTMULTIPLIER", 2236, FieldType.FLOAT);
|
public static final Field TPSDECELENLEANMENTMULTIPLIER = Field.create("TPSDECELENLEANMENTMULTIPLIER", 2236, FieldType.FLOAT);
|
||||||
public static final Field SLOWADCALPHA = Field.create("SLOWADCALPHA", 2240, FieldType.FLOAT);
|
public static final Field SLOWADCALPHA = Field.create("SLOWADCALPHA", 2240, FieldType.FLOAT);
|
||||||
public static final String[] debug_mode_e = {"Alternator", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "mode6", "mode7"};
|
public static final String[] debug_mode_e = {"Alternator", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "mode8", "mode9", "mode10", "mode11", "mode12", "mode13", "mode14", "mode15"};
|
||||||
public static final Field DEBUGMODE = Field.create("DEBUGMODE", 2244, FieldType.INT, debug_mode_e);
|
public static final Field DEBUGMODE = Field.create("DEBUGMODE", 2244, FieldType.INT, debug_mode_e);
|
||||||
public static final Field WARMUPAFRPID_PFACTOR = Field.create("WARMUPAFRPID_PFACTOR", 2248, FieldType.FLOAT);
|
public static final Field WARMUPAFRPID_PFACTOR = Field.create("WARMUPAFRPID_PFACTOR", 2248, FieldType.FLOAT);
|
||||||
public static final Field WARMUPAFRPID_IFACTOR = Field.create("WARMUPAFRPID_IFACTOR", 2252, FieldType.FLOAT);
|
public static final Field WARMUPAFRPID_IFACTOR = Field.create("WARMUPAFRPID_IFACTOR", 2252, FieldType.FLOAT);
|
||||||
|
|
Loading…
Reference in New Issue