auto-sync

This commit is contained in:
rusEfi 2015-11-11 22:01:46 -05:00
parent 47b6cb76e5
commit 55e424caf9
6 changed files with 73 additions and 27 deletions

View File

@ -1,6 +1,22 @@
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Nov 08 18:16:16 EST 2015
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Nov 11 21:40:26 EST 2015
// begin
#include "rusefi_types.h"
typedef struct {
/**
* offset 0
*/
float pFactor;
/**
* offset 4
*/
float iFactor;
/**
* offset 8
*/
float dFactor;
/** total size 12*/
} pid_s;
typedef struct {
/**
* offset 0
@ -420,11 +436,7 @@ typedef struct {
/**
* offset 252
*/
float etbPFactor;
/**
* offset 256
*/
float etbIFactor;
float unused2[2];
/**
* offset 260
*/
@ -1351,7 +1363,27 @@ typedef struct {
/**
* offset 1952
*/
int unused3[51];
float knockNoiseBins[8];
/**
* offset 1984
*/
float knockNoise[8];
/**
* offset 2016
*/
float etbPFactor;
/**
* offset 2020
*/
float etbIFactor;
/**
* offset 2024
*/
float etbDFactor;
/**
* offset 2028
*/
int unused3[32];
/**
* offset 2156
*/
@ -1563,4 +1595,4 @@ typedef struct {
} persistent_config_s;
// end
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Nov 08 18:16:16 EST 2015
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Nov 11 21:40:26 EST 2015

View File

@ -305,9 +305,7 @@
#define etbControlPin2_offset_hex 364
#define electronicThrottlePin1Mode_offset 872
#define electronicThrottlePin1Mode_offset_hex 368
#define etbPFactor_offset 876
#define etbIFactor_offset 880
#define etbIFactor_offset_hex 370
#define unused2_offset 876
#define wboHeaterPin_offset 884
#define wboHeaterPin_offset_hex 374
#define wboPumpPin_offset 888
@ -689,7 +687,12 @@
#define consoleSerialTxPin_offset 1944
#define consoleSerialTxPin_offset_hex 798
#define consoleSerialRxPin_offset 1948
#define unused3_offset 1952
#define knockNoiseBins_offset 1952
#define knockNoise_offset 1984
#define etbPFactor_offset 2016
#define etbIFactor_offset 2020
#define etbDFactor_offset 2024
#define unused3_offset 2028
#define targetVBatt_offset 2156
#define alternatorOffAboveTps_offset 2160
#define alternatorOffAboveTps_offset_hex 870

View File

@ -114,32 +114,32 @@ static void showEthInfo(void) {
scheduleMsg(&logger, "etbControlPin1=%s duty=%f", hwPortname(boardConfiguration->etbControlPin1),
currentEtbDuty);
scheduleMsg(&logger, "close dir=%s", hwPortname(boardConfiguration->etbDirectionPin2));
scheduleMsg(&logger, "etb P=%f I=%f D=%f dT=%d", boardConfiguration->etbPFactor,
boardConfiguration->etbIFactor,
scheduleMsg(&logger, "etb P=%f I=%f D=%f dT=%d", engineConfiguration->etbPFactor,
engineConfiguration->etbIFactor,
0.0,
boardConfiguration->etbDT);
}
static void apply(void) {
pid.updateFactors(boardConfiguration->etbPFactor, boardConfiguration->etbIFactor, 0);
pid.updateFactors(engineConfiguration->etbPFactor, engineConfiguration->etbIFactor, 0);
}
static void setEtbPFactor(float value) {
boardConfiguration->etbPFactor = value;
engineConfiguration->etbPFactor = value;
apply();
showEthInfo();
}
static void setEtbIFactor(float value) {
boardConfiguration->etbIFactor = value;
engineConfiguration->etbIFactor = value;
apply();
showEthInfo();
}
void setDefaultEtbParameters(void) {
engineConfiguration->pedalPositionMax = 6;
boardConfiguration->etbPFactor = 1;
boardConfiguration->etbIFactor = 0.5;
engineConfiguration->etbPFactor = 1;
engineConfiguration->etbIFactor = 0.5;
boardConfiguration->etbDT = 100;
}

View File

@ -68,6 +68,11 @@ custom baro_corr_table_t 64 array, F32, @OFFSET@, [@@BARO_CORR_SIZE@@x@@BARO
! please note that 1024 here is 4 * IGN_LOAD_COUNT * IGN_RPM_COUNT
custom ignition_table_t 1024 array, F32, @OFFSET@, [16x16],"deg", 1, 0, -720, 720, 2
struct pid_s
float pFactor;;"value", 1, 0, 0, 1000, 2
float iFactor;;"value", 1, 0, 0, 1000, 2
float dFactor;;"value", 1, 0, 0, 1000, 2
end_struct
struct cranking_parameters_s
float baseFuel;;"ms", 1, 0, 0, 200, 1
@ -362,8 +367,7 @@ custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fas
brain_pin_e etbControlPin2;
pin_output_mode_e electronicThrottlePin1Mode;
float etbPFactor;
float etbIFactor;
float[2] unused2;
brain_pin_e wboHeaterPin;
brain_pin_e wboPumpPin;
@ -594,8 +598,14 @@ baro_corr_table_t baroCorrTable;
brain_pin_e binarySerialTxPin;
brain_pin_e binarySerialRxPin;
brain_pin_e consoleSerialTxPin;
brain_pin_e consoleSerialRxPin;
int[51] unused3;
brain_pin_e consoleSerialRxPin;
float[8] knockNoiseBins;
float[8] knockNoise;
float etbPFactor;
float etbIFactor;
float etbDFactor;
int[32] unused3;
float targetVBatt;;"Volts", 1, 0, 0,30, 1
float alternatorOffAboveTps;Turn off alternator output above specified TPS;"%", 1, 0, 0, 200, 2

View File

@ -1,5 +1,5 @@
// This file was generated by Version2Header
// Wed Nov 11 17:48:21 EST 2015
// Wed Nov 11 21:05:03 EST 2015
#ifndef VCS_VERSION
#define VCS_VERSION "8978"
#endif

View File

@ -1,6 +1,6 @@
package com.rusefi.config;
// this file was generated automatically by ConfigDefinition.jar Thu Oct 22 12:50:06 EDT 2015
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Nov 11 21:40:26 EST 2015
public class Fields {
public static final Field ENGINETYPE = new Field("ENGINETYPE", 0, FieldType.INT);
public static final Field HEADERMAGICVALUE = new Field("HEADERMAGICVALUE", 4, FieldType.INT);
@ -167,8 +167,6 @@ public class Fields {
public static final Field ETBCONTROLPIN1 = new Field("ETBCONTROLPIN1", 864, FieldType.INT, brain_pin_e);
public static final Field ETBCONTROLPIN2 = new Field("ETBCONTROLPIN2", 868, FieldType.INT, brain_pin_e);
public static final Field ELECTRONICTHROTTLEPIN1MODE = new Field("ELECTRONICTHROTTLEPIN1MODE", 872, FieldType.INT, pin_output_mode_e);
public static final Field ETBPFACTOR = new Field("ETBPFACTOR", 876, FieldType.FLOAT);
public static final Field ETBIFACTOR = new Field("ETBIFACTOR", 880, FieldType.FLOAT);
public static final Field WBOHEATERPIN = new Field("WBOHEATERPIN", 884, FieldType.INT, brain_pin_e);
public static final Field WBOPUMPPIN = new Field("WBOPUMPPIN", 888, FieldType.INT, brain_pin_e);
public static final Field FUELLEVELEMPTYTANKVOLTAGE = new Field("FUELLEVELEMPTYTANKVOLTAGE", 892, FieldType.FLOAT);
@ -438,6 +436,9 @@ public class Fields {
public static final Field BINARYSERIALRXPIN = new Field("BINARYSERIALRXPIN", 1940, FieldType.INT, brain_pin_e);
public static final Field CONSOLESERIALTXPIN = new Field("CONSOLESERIALTXPIN", 1944, FieldType.INT, brain_pin_e);
public static final Field CONSOLESERIALRXPIN = new Field("CONSOLESERIALRXPIN", 1948, FieldType.INT, brain_pin_e);
public static final Field ETBPFACTOR = new Field("ETBPFACTOR", 2016, FieldType.FLOAT);
public static final Field ETBIFACTOR = new Field("ETBIFACTOR", 2020, FieldType.FLOAT);
public static final Field ETBDFACTOR = new Field("ETBDFACTOR", 2024, FieldType.FLOAT);
public static final Field TARGETVBATT = new Field("TARGETVBATT", 2156, FieldType.FLOAT);
public static final Field ALTERNATOROFFABOVETPS = new Field("ALTERNATOROFFABOVETPS", 2160, FieldType.FLOAT);
public static final Field ALTERNATORDT = new Field("ALTERNATORDT", 2164, FieldType.INT);