mirror of https://github.com/rusefi/rusefi.git
SD card log fields list should be auto-generated #3985
safer 'digits' default
This commit is contained in:
parent
81d155f47a
commit
8a86e6f1a9
Binary file not shown.
|
@ -15,6 +15,8 @@ import java.util.regex.Pattern;
|
|||
import static com.devexperts.logging.Logging.getLogging;
|
||||
import static com.rusefi.output.JavaSensorsConsumer.quote;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* This is an immutable model of an individual field
|
||||
* Andrey Belomutskiy, (c) 2013-2020
|
||||
|
@ -66,7 +68,7 @@ public class ConfigField {
|
|||
String arraySizeAsText,
|
||||
String type,
|
||||
int[] arraySizes,
|
||||
String tsInfo,
|
||||
@Nullable String tsInfo,
|
||||
boolean isIterate,
|
||||
boolean fsioVisible,
|
||||
boolean hasAutoscale,
|
||||
|
@ -378,7 +380,7 @@ public class ConfigField {
|
|||
public int getDigits() {
|
||||
String[] tokens = getTokens();
|
||||
if (tokens.length < 6)
|
||||
return -1;
|
||||
return 0;
|
||||
return Integer.parseInt(tokens[5].trim());
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public class SdCardFieldsGeneratorTest {
|
|||
SdCardFieldsConsumer consumer = new SdCardFieldsConsumer(LazyFile.TEST);
|
||||
state.readBufferedReader(test, consumer);
|
||||
assertEquals(
|
||||
"\t{engine->outputChannels.internalMcuTemperature, \"internalMcuTemperature\", \"\", -1},\n" +
|
||||
"\t{engine->outputChannels.internalMcuTemperature, \"internalMcuTemperature\", \"\", 0},\n" +
|
||||
"\t{engine->outputChannels.RPMValue, \"hello\", \"RPM\", 2},\n" +
|
||||
"\t{engine->outputChannels.rpmAcceleration, \"dRPM\", \"RPM/s\", 2},\n" +
|
||||
"\t{engine->outputChannels.speedToRpmRatio, \"ra\", \"value\", 0},\n" +
|
||||
|
|
Loading…
Reference in New Issue