auto-sync
This commit is contained in:
parent
bac390db03
commit
9384ef858b
|
@ -389,6 +389,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->algorithm = LM_SPEED_DENSITY;
|
||||
|
||||
boardConfiguration->alternatorControlPin = GPIOD_5;
|
||||
engineConfiguration->alternatorControlPFactor = 40;
|
||||
|
||||
// engineConfiguration->isCanEnabled = true;
|
||||
boardConfiguration->canTxPin = GPIOB_6;
|
||||
|
|
|
@ -308,6 +308,8 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->HD44780width = 20;
|
||||
engineConfiguration->HD44780height = 4;
|
||||
|
||||
engineConfiguration->alternatorControlPFactor = 30;
|
||||
|
||||
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
|
||||
engineConfiguration->vbattAdcChannel = EFI_ADC_5;
|
||||
engineConfiguration->cltAdcChannel = EFI_ADC_6;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated by config_definition.jar on Sun Mar 22 13:03:07 EDT 2015
|
||||
// this section was generated by config_definition.jar on Sun Mar 22 19:43:37 EDT 2015
|
||||
// begin
|
||||
#include "rusefi_types.h"
|
||||
typedef struct {
|
||||
|
@ -1080,7 +1080,19 @@ typedef struct {
|
|||
/**
|
||||
* offset 5208
|
||||
*/
|
||||
int unused3[143];
|
||||
float alternatorControlPFactor;
|
||||
/**
|
||||
* offset 5212
|
||||
*/
|
||||
float alternatorControlIFactor;
|
||||
/**
|
||||
* offset 5216
|
||||
*/
|
||||
float alternatorControlDFactor;
|
||||
/**
|
||||
* offset 5220
|
||||
*/
|
||||
int unused3[140];
|
||||
/**
|
||||
* offset 5780
|
||||
*/
|
||||
|
@ -1184,4 +1196,4 @@ typedef struct {
|
|||
} engine_configuration_s;
|
||||
|
||||
// end
|
||||
// this section was generated by config_definition.jar on Sun Mar 22 13:03:07 EDT 2015
|
||||
// this section was generated by config_definition.jar on Sun Mar 22 19:43:37 EDT 2015
|
||||
|
|
|
@ -49,9 +49,14 @@ static msg_t AltCtrlThread(int param) {
|
|||
#endif
|
||||
}
|
||||
|
||||
static void setAltPid(float p) {
|
||||
static void applySettings(void) {
|
||||
altPid.updateFactors(engineConfiguration->alternatorControlPFactor, 0, 0);
|
||||
}
|
||||
|
||||
static void setAltPFactor(float p) {
|
||||
engineConfiguration->alternatorControlPFactor = p;
|
||||
scheduleMsg(logger, "setAltPid: %f", p);
|
||||
altPid.updateFactors(p, 0, 0);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
static void applyAlternatorPinState(PwmConfig *state, int stateIndex) {
|
||||
|
@ -79,6 +84,8 @@ void initAlternatorCtrl(Logging *sharedLogger) {
|
|||
chThdCreateStatic(alternatorControlThreadStack, sizeof(alternatorControlThreadStack), LOWPRIO,
|
||||
(tfunc_t) AltCtrlThread, NULL);
|
||||
|
||||
addConsoleActionF("alt_pid", setAltPid);
|
||||
addConsoleActionF("set_alt_p", setAltPFactor);
|
||||
addConsoleAction("altinfo", showAltInfo);
|
||||
|
||||
applySettings();
|
||||
}
|
||||
|
|
|
@ -473,7 +473,10 @@ custom pin_input_mode_e 4 scalar, F32, @OFFSET@, "ms", 1, 0, 0, 200, 1
|
|||
pin_input_mode_e[LE_COMMAND_COUNT iterate] fsioInputModes;
|
||||
|
||||
adc_channel_e externalKnockSenseAdc;
|
||||
int[143] unused3;
|
||||
float alternatorControlPFactor;
|
||||
float alternatorControlIFactor;
|
||||
float alternatorControlDFactor;
|
||||
int[140] unused3;
|
||||
|
||||
int accelLength;;"len", 1, 0, 0, 200, 3
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated by ConfigDefinition.jar on Sun Mar 22 13:03:09 EDT 2015
|
||||
; this section was generated by ConfigDefinition.jar on Sun Mar 22 19:43:39 EDT 2015
|
||||
|
||||
page = 1
|
||||
engineType = bits, S32, 0, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB"
|
||||
|
@ -465,7 +465,10 @@ page = 1
|
|||
fsioInputModes15 = scalar, F32, 5196, "ms", 1, 0, 0, 200, 1
|
||||
fsioInputModes16 = scalar, F32, 5200, "ms", 1, 0, 0, 200, 1
|
||||
externalKnockSenseAdc = bits, U32, 5204, [0:3] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5"
|
||||
;skipping unused3 offset 5208
|
||||
;skipping alternatorControlPFactor offset 5208
|
||||
;skipping alternatorControlIFactor offset 5212
|
||||
;skipping alternatorControlDFactor offset 5216
|
||||
;skipping unused3 offset 5220
|
||||
accelLength = scalar, S32, 5780, "len", 1, 0, 0, 200, 3
|
||||
deaccelEnrichmentThreshold = scalar, F32, 5784, "roc", 1, 0, 0, 200, 3
|
||||
deaccelEnrichmentMultiplier = scalar, F32, 5788, "coeff", 1, 0, 0, 200, 3
|
||||
|
|
|
@ -109,11 +109,7 @@ public class TestingUtils {
|
|||
}
|
||||
|
||||
static String getNextWaveChart() {
|
||||
// we need to skip TWO because spark could have been scheduled a while ago and happen now
|
||||
// todo: improve this logic, compare times
|
||||
IoUtil.sendCommand("reset_wave_chart");
|
||||
// getWaveChart();
|
||||
// we want to wait for the 2nd chart to see same same RPM across the whole chart
|
||||
String result = getWaveChart();
|
||||
FileLog.MAIN.logLine("current chart: " + result);
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue