Delayed A/C compressor switch #922
This commit is contained in:
parent
d90f0481b0
commit
47d8cdf0ac
|
@ -59,6 +59,8 @@ typedef enum {
|
||||||
LE_METHOD_FSIO_DIGITAL_INPUT = 123,
|
LE_METHOD_FSIO_DIGITAL_INPUT = 123,
|
||||||
LE_METHOD_FSIO_SETTING = 124,
|
LE_METHOD_FSIO_SETTING = 124,
|
||||||
|
|
||||||
|
#include "fsio_enums_generated.def"
|
||||||
|
|
||||||
Force_4b_le_action = ENUM_32_BITS,
|
Force_4b_le_action = ENUM_32_BITS,
|
||||||
|
|
||||||
} le_action_e;
|
} le_action_e;
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Sep 10 22:45:42 EDT 2019
|
||||||
|
|
||||||
|
// by class com.rusefi.output.FileFsioSettingsConsumer
|
||||||
|
FSIO_SETTING_FANONTEMPERATURE = 1000,
|
||||||
|
FSIO_SETTING_FANOFFTEMPERATURE = 1001,
|
||||||
|
FSIO_SETTING_ALTERNATORCONTROL_OFFSET = 1002,
|
||||||
|
FSIO_SETTING_ALTERNATORCONTROL_MINVALUE = 1003,
|
||||||
|
FSIO_SETTING_ETB_OFFSET = 1004,
|
||||||
|
FSIO_SETTING_ETB_MINVALUE = 1005,
|
||||||
|
FSIO_SETTING_IDLERPMPID_OFFSET = 1006,
|
||||||
|
FSIO_SETTING_IDLERPMPID_MINVALUE = 1007,
|
||||||
|
FSIO_SETTING_STARTUPFUELPUMPDURATION = 1008,
|
||||||
|
FSIO_SETTING_FUELCLOSEDLOOPPID_OFFSET = 1009,
|
||||||
|
FSIO_SETTING_FUELCLOSEDLOOPPID_MINVALUE = 1010,
|
||||||
|
FSIO_SETTING_AUXPID1_OFFSET = 1011,
|
||||||
|
FSIO_SETTING_AUXPID1_MINVALUE = 1012,
|
||||||
|
FSIO_SETTING_AUXPID2_OFFSET = 1013,
|
||||||
|
FSIO_SETTING_AUXPID2_MINVALUE = 1014,
|
||||||
|
FSIO_SETTING_AUXPID3_OFFSET = 1015,
|
||||||
|
FSIO_SETTING_AUXPID3_MINVALUE = 1016,
|
||||||
|
FSIO_SETTING_AUXPID4_OFFSET = 1017,
|
||||||
|
FSIO_SETTING_AUXPID4_MINVALUE = 1018,
|
||||||
|
FSIO_SETTING_IDLETIMINGPID_OFFSET = 1019,
|
||||||
|
FSIO_SETTING_IDLETIMINGPID_MINVALUE = 1020,
|
|
@ -18,8 +18,9 @@ java -DSystemOut.name=gen_config ^
|
||||||
-ts_destination tunerstudio ^
|
-ts_destination tunerstudio ^
|
||||||
-with_c_defines false ^
|
-with_c_defines false ^
|
||||||
-initialize_to_zero false ^
|
-initialize_to_zero false ^
|
||||||
-c_defines controllers\generated\rusefi_generated.h ^
|
-c_defines controllers\generated\rusefi_generated.h ^
|
||||||
-c_destination controllers\generated\engine_configuration_generated_structures.h ^
|
-c_destination controllers\generated\engine_configuration_generated_structures.h ^
|
||||||
|
-c_fsio_constants controllers\generated\fsio_enums_generated.def ^
|
||||||
-java_destination ../java_console/models/src/com/rusefi/config/generated/Fields.java ^
|
-java_destination ../java_console/models/src/com/rusefi/config/generated/Fields.java ^
|
||||||
-romraider_destination ../java_console/rusefi.xml ^
|
-romraider_destination ../java_console/rusefi.xml ^
|
||||||
-skip build/config.gen
|
-skip build/config.gen
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package com.rusefi.config.generated;
|
package com.rusefi.config.generated;
|
||||||
|
|
||||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Sep 09 21:25:07 EDT 2019
|
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Sep 10 22:45:42 EDT 2019
|
||||||
|
|
||||||
// by class com.rusefi.output.JavaFieldsConsumer
|
// by class com.rusefi.output.FileJavaFieldsConsumer
|
||||||
import com.rusefi.config.*;
|
import com.rusefi.config.*;
|
||||||
|
|
||||||
public class Fields {
|
public class Fields {
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
package com.rusefi;
|
package com.rusefi;
|
||||||
|
|
||||||
import com.rusefi.output.CHeaderConsumer;
|
import com.rusefi.output.*;
|
||||||
import com.rusefi.output.ConfigurationConsumer;
|
|
||||||
import com.rusefi.output.FileJavaFieldsConsumer;
|
|
||||||
import com.rusefi.output.TSProjectConsumer;
|
|
||||||
import com.rusefi.util.IoUtils;
|
import com.rusefi.util.IoUtils;
|
||||||
import com.rusefi.util.LazyFile;
|
import com.rusefi.util.LazyFile;
|
||||||
import com.rusefi.util.SystemOut;
|
import com.rusefi.util.SystemOut;
|
||||||
|
@ -31,6 +28,7 @@ public class ConfigDefinition {
|
||||||
private static final String KEY_ROM_INPUT = "-romraider";
|
private static final String KEY_ROM_INPUT = "-romraider";
|
||||||
public static final String KEY_TS_DESTINATION = "-ts_destination";
|
public static final String KEY_TS_DESTINATION = "-ts_destination";
|
||||||
private static final String KEY_C_DESTINATION = "-c_destination";
|
private static final String KEY_C_DESTINATION = "-c_destination";
|
||||||
|
private static final String KEY_C_FSIO_CONSTANTS = "-c_fsio_constants";
|
||||||
private static final String KEY_C_DEFINES = "-c_defines";
|
private static final String KEY_C_DEFINES = "-c_defines";
|
||||||
private static final String KEY_WITH_C_DEFINES = "-with_c_defines";
|
private static final String KEY_WITH_C_DEFINES = "-with_c_defines";
|
||||||
private static final String KEY_JAVA_DESTINATION = "-java_destination";
|
private static final String KEY_JAVA_DESTINATION = "-java_destination";
|
||||||
|
@ -65,9 +63,10 @@ public class ConfigDefinition {
|
||||||
}
|
}
|
||||||
|
|
||||||
String tsPath = null;
|
String tsPath = null;
|
||||||
String destCHeader = null;
|
String destCHeaderFileName = null;
|
||||||
String destCDefines = null;
|
String destCDefinesFileName = null;
|
||||||
String javaDestination = null;
|
String destCFsioConstantsFileName = null;
|
||||||
|
String javaDestinationFileName = null;
|
||||||
String romRaiderDestination = null;
|
String romRaiderDestination = null;
|
||||||
List<String> prependFiles = new ArrayList<>();
|
List<String> prependFiles = new ArrayList<>();
|
||||||
String skipRebuildFile = null;
|
String skipRebuildFile = null;
|
||||||
|
@ -81,15 +80,17 @@ public class ConfigDefinition {
|
||||||
} else if (key.equals(KEY_TS_DESTINATION)) {
|
} else if (key.equals(KEY_TS_DESTINATION)) {
|
||||||
tsPath = args[i + 1];
|
tsPath = args[i + 1];
|
||||||
} else if (key.equals(KEY_C_DESTINATION)) {
|
} else if (key.equals(KEY_C_DESTINATION)) {
|
||||||
destCHeader = args[i + 1];
|
destCHeaderFileName = args[i + 1];
|
||||||
|
} else if (key.equals(KEY_C_FSIO_CONSTANTS)) {
|
||||||
|
destCFsioConstantsFileName = args[i + 1];
|
||||||
} else if (key.equals(KEY_ZERO_INIT)) {
|
} else if (key.equals(KEY_ZERO_INIT)) {
|
||||||
needZeroInit = Boolean.parseBoolean(args[i + 1]);
|
needZeroInit = Boolean.parseBoolean(args[i + 1]);
|
||||||
} else if (key.equals(KEY_WITH_C_DEFINES)) {
|
} else if (key.equals(KEY_WITH_C_DEFINES)) {
|
||||||
CHeaderConsumer.withC_Defines = Boolean.parseBoolean(args[i + 1]);
|
CHeaderConsumer.withC_Defines = Boolean.parseBoolean(args[i + 1]);
|
||||||
} else if (key.equals(KEY_C_DEFINES)) {
|
} else if (key.equals(KEY_C_DEFINES)) {
|
||||||
destCDefines = args[i + 1];
|
destCDefinesFileName = args[i + 1];
|
||||||
} else if (key.equals(KEY_JAVA_DESTINATION)) {
|
} else if (key.equals(KEY_JAVA_DESTINATION)) {
|
||||||
javaDestination = args[i + 1];
|
javaDestinationFileName = args[i + 1];
|
||||||
} else if (key.equals(KEY_ROMRAIDER_DESTINATION)) {
|
} else if (key.equals(KEY_ROMRAIDER_DESTINATION)) {
|
||||||
romRaiderDestination = args[i + 1];
|
romRaiderDestination = args[i + 1];
|
||||||
} else if (key.equals(KEY_PREPEND)) {
|
} else if (key.equals(KEY_PREPEND)) {
|
||||||
|
@ -124,15 +125,19 @@ public class ConfigDefinition {
|
||||||
ReaderState state = new ReaderState();
|
ReaderState state = new ReaderState();
|
||||||
|
|
||||||
List<ConfigurationConsumer> destinations = new ArrayList<>();
|
List<ConfigurationConsumer> destinations = new ArrayList<>();
|
||||||
if (destCHeader != null) {
|
if (destCHeaderFileName != null) {
|
||||||
destinations.add(new CHeaderConsumer(destCHeader));
|
destinations.add(new CHeaderConsumer(destCHeaderFileName));
|
||||||
}
|
}
|
||||||
if (tsPath != null) {
|
if (tsPath != null) {
|
||||||
CharArrayWriter tsWriter = new CharArrayWriter();
|
CharArrayWriter tsWriter = new CharArrayWriter();
|
||||||
destinations.add(new TSProjectConsumer(tsWriter, tsPath, state));
|
destinations.add(new TSProjectConsumer(tsWriter, tsPath, state));
|
||||||
}
|
}
|
||||||
if (javaDestination != null) {
|
if (javaDestinationFileName != null) {
|
||||||
destinations.add(new FileJavaFieldsConsumer(state, javaDestination));
|
destinations.add(new FileJavaFieldsConsumer(state, javaDestinationFileName));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (destCFsioConstantsFileName != null) {
|
||||||
|
destinations.add(new FileFsioSettingsConsumer(state, destCFsioConstantsFileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (destinations.isEmpty())
|
if (destinations.isEmpty())
|
||||||
|
@ -141,8 +146,8 @@ public class ConfigDefinition {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (destCDefines != null)
|
if (destCDefinesFileName != null)
|
||||||
VariableRegistry.INSTANCE.writeDefinesToFile(destCDefines);
|
VariableRegistry.INSTANCE.writeDefinesToFile(destCDefinesFileName);
|
||||||
|
|
||||||
if (romRaiderDestination != null && romRaiderInputFile != null) {
|
if (romRaiderDestination != null && romRaiderInputFile != null) {
|
||||||
String inputFileName = romRaiderInputFile + File.separator + ROM_RAIDER_XML_TEMPLATE;
|
String inputFileName = romRaiderInputFile + File.separator + ROM_RAIDER_XML_TEMPLATE;
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.rusefi.output;
|
||||||
|
|
||||||
|
import com.rusefi.ConfigDefinition;
|
||||||
|
import com.rusefi.ReaderState;
|
||||||
|
import com.rusefi.util.LazyFile;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import static com.rusefi.ConfigDefinition.EOL;
|
||||||
|
|
||||||
|
public class FileFsioSettingsConsumer extends FsioSettingsConsumer {
|
||||||
|
private final LazyFile enumFile;
|
||||||
|
|
||||||
|
public FileFsioSettingsConsumer(ReaderState state, String destCFsioConstantsFileName) {
|
||||||
|
super(state);
|
||||||
|
enumFile = new LazyFile(destCFsioConstantsFileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void startFile() {
|
||||||
|
enumFile.write("// this file " + ConfigDefinition.MESSAGE + ConfigDefinition.EOL + EOL);
|
||||||
|
enumFile.write("// by " + getClass() + EOL);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endFile() throws IOException {
|
||||||
|
enumFile.write(enumDefinition.toString());
|
||||||
|
enumFile.close();
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,9 +7,14 @@ import com.rusefi.ReaderState;
|
||||||
import java.io.CharArrayWriter;
|
import java.io.CharArrayWriter;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Some configuration settings are exposed to FSIO
|
||||||
|
* Here we generate relevant FSIO constants and lookup code
|
||||||
|
*/
|
||||||
|
|
||||||
public abstract class FsioSettingsConsumer implements ConfigurationConsumer {
|
public abstract class FsioSettingsConsumer implements ConfigurationConsumer {
|
||||||
private final CharArrayWriter content = new CharArrayWriter();
|
private final CharArrayWriter content = new CharArrayWriter();
|
||||||
private final CharArrayWriter enumDefinition = new CharArrayWriter();
|
protected final CharArrayWriter enumDefinition = new CharArrayWriter();
|
||||||
private final ReaderState state;
|
private final ReaderState state;
|
||||||
|
|
||||||
private int currentIndex = 1000;
|
private int currentIndex = 1000;
|
||||||
|
@ -38,7 +43,6 @@ public abstract class FsioSettingsConsumer implements ConfigurationConsumer {
|
||||||
for (int i = 0; i < tsFields.size(); i++) {
|
for (int i = 0; i < tsFields.size(); i++) {
|
||||||
ConfigField cf = tsFields.get(i);
|
ConfigField cf = tsFields.get(i);
|
||||||
writeOneField(cf, prefix);
|
writeOneField(cf, prefix);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,17 +54,14 @@ public abstract class FsioSettingsConsumer implements ConfigurationConsumer {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (configField.isFsioVisible()) {
|
if (configField.isFsioVisible()) {
|
||||||
|
|
||||||
String nameWithPrefix = prefix + configField.getName();
|
String nameWithPrefix = prefix + configField.getName();
|
||||||
|
|
||||||
enumDefinition.append("FSIO_SETTING_" + nameWithPrefix.toUpperCase() + " = " + currentIndex++ + ",\n");
|
enumDefinition.append("\tFSIO_SETTING_" + nameWithPrefix.toUpperCase() + " = " + currentIndex++ + ",\n");
|
||||||
|
|
||||||
|
|
||||||
content.append(nameWithPrefix + "\n");
|
content.append(nameWithPrefix + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,12 +101,12 @@ public class ConfigFieldParserTest {
|
||||||
"etb_minValue\n");
|
"etb_minValue\n");
|
||||||
|
|
||||||
assertEquals(fsioSettingsConsumer.getEnumDefinition(),
|
assertEquals(fsioSettingsConsumer.getEnumDefinition(),
|
||||||
"FSIO_SETTING_OFFSET = 1000,\n" +
|
"\tFSIO_SETTING_OFFSET = 1000,\n" +
|
||||||
"FSIO_SETTING_MINVALUE = 1001,\n" +
|
"\tFSIO_SETTING_MINVALUE = 1001,\n" +
|
||||||
"FSIO_SETTING_ALTERNATORCONTROL_OFFSET = 1002,\n" +
|
"\tFSIO_SETTING_ALTERNATORCONTROL_OFFSET = 1002,\n" +
|
||||||
"FSIO_SETTING_ALTERNATORCONTROL_MINVALUE = 1003,\n" +
|
"\tFSIO_SETTING_ALTERNATORCONTROL_MINVALUE = 1003,\n" +
|
||||||
"FSIO_SETTING_ETB_OFFSET = 1004,\n" +
|
"\tFSIO_SETTING_ETB_OFFSET = 1004,\n" +
|
||||||
"FSIO_SETTING_ETB_MINVALUE = 1005,\n");
|
"\tFSIO_SETTING_ETB_MINVALUE = 1005,\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue