fixing build

This commit is contained in:
rusefi 2017-12-11 11:23:53 -05:00
parent c5e762d814
commit 2cd13f578f
6 changed files with 25 additions and 17 deletions

View File

@ -1,4 +1,4 @@
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Dec 11 10:13:39 EST 2017 // this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Dec 11 11:22:10 EST 2017
// begin // begin
#ifndef ENGINE_CONFIGURATION_GENERATED_H_ #ifndef ENGINE_CONFIGURATION_GENERATED_H_
#define ENGINE_CONFIGURATION_GENERATED_H_ #define ENGINE_CONFIGURATION_GENERATED_H_
@ -2233,4 +2233,4 @@ typedef struct {
#endif #endif
// end // end
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Dec 11 10:13:39 EST 2017 // this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Dec 11 11:22:10 EST 2017

View File

@ -63,7 +63,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 Mon Dec 11 10:13:39 EST 2017 ; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Dec 11 11:22:10 EST 2017
pageSize = 20000 pageSize = 20000
page = 1 page = 1

View File

@ -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 Mon Dec 11 10:13:39 EST 2017 // this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Dec 11 11:22:10 EST 2017
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 BLOCKING_FACTOR = 400; public static final int BLOCKING_FACTOR = 400;

Binary file not shown.

View File

@ -17,7 +17,7 @@ import static com.rusefi.ConfigDefinition.EOL;
* 1/15/15 * 1/15/15
*/ */
public class ConfigField { public class ConfigField {
public static final ConfigField VOID = new ConfigField(null, null, false, null, null, 1, null, false); public static final ConfigField VOID = new ConfigField("", null, false, null, null, 1, null, false);
private static final String typePattern = "([\\w\\d_]+)(\\[([\\w\\d]+)(\\s([\\w\\d]+))?\\])?"; private static final String typePattern = "([\\w\\d_]+)(\\[([\\w\\d]+)(\\s([\\w\\d]+))?\\])?";
private static final String namePattern = "[[\\w\\d\\s_]]+"; private static final String namePattern = "[[\\w\\d\\s_]]+";
@ -51,6 +51,9 @@ public class ConfigField {
public ConfigField(String name, String comment, boolean isBit, String arraySizeAsText, String type, public ConfigField(String name, String comment, boolean isBit, String arraySizeAsText, String type,
int arraySize, String tsInfo, boolean isIterate) { int arraySize, String tsInfo, boolean isIterate) {
if (name == null)
throw new NullPointerException(comment + " " + isBit + " " + type);
assertNoWhitespaces(name);
this.name = name; this.name = name;
this.comment = comment; this.comment = comment;
this.isBit = isBit; this.isBit = isBit;
@ -66,6 +69,11 @@ public class ConfigField {
this.isIterate = isIterate; this.isIterate = isIterate;
} }
public static void assertNoWhitespaces(String name) {
if (name.contains(" ") || name.contains("\t"))
throw new IllegalArgumentException("Invalid name: " + name);
}
/** /**
* @see ConfigDefinitionTest#testParseLine() * @see ConfigDefinitionTest#testParseLine()
*/ */
@ -74,7 +82,7 @@ public class ConfigField {
if (!matcher.matches()) if (!matcher.matches())
return null; return null;
String name = matcher.group(6); String name = matcher.group(6).trim();
String comment = matcher.group(8); String comment = matcher.group(8);
String type = matcher.group(1); String type = matcher.group(1);
int arraySize; int arraySize;