AlphaX
This commit is contained in:
parent
eb889eb6ff
commit
2065299abc
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
export PROJECT_BOARD=hellen/alphax-2chan
|
export PROJECT_BOARD=hellen/alphax-2chan
|
||||||
export PROJECT_CPU=ARCH_STM32F4
|
export PROJECT_CPU=ARCH_STM32F4
|
||||||
export EXTRA_PARAMS="-DSHORT_BOARD_NAME=AlphaX-2chan"
|
export EXTRA_PARAMS="-DSHORT_BOARD_NAME=alphax-2chan"
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
bash ../common_make.sh
|
bash ../common_make.sh
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.rusefi;
|
package com.rusefi;
|
||||||
|
|
||||||
|
import com.devexperts.logging.Logging;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -7,11 +9,14 @@ import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static com.devexperts.logging.Logging.getLogging;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Andrey Belomutskiy, (c) 2012-2016
|
* Andrey Belomutskiy, (c) 2012-2016
|
||||||
* 7/20/2016
|
* 7/20/2016
|
||||||
*/
|
*/
|
||||||
public class FiringOrderTSLogic {
|
public class FiringOrderTSLogic {
|
||||||
|
private static final Logging log = getLogging(FiringOrderTSLogic.class);
|
||||||
|
|
||||||
private static final String FIRING_ORDER_PREFIX = "FO_";
|
private static final String FIRING_ORDER_PREFIX = "FO_";
|
||||||
|
|
||||||
|
@ -39,7 +44,8 @@ public class FiringOrderTSLogic {
|
||||||
while ((line = br.readLine()) != null) {
|
while ((line = br.readLine()) != null) {
|
||||||
int index = line.indexOf(FIRING_ORDER_PREFIX);
|
int index = line.indexOf(FIRING_ORDER_PREFIX);
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
System.out.println("Skipping [" + line);
|
if (log.debugEnabled())
|
||||||
|
log.debug("Skipping [" + line);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
line = line.substring(index + FIRING_ORDER_PREFIX.length());
|
line = line.substring(index + FIRING_ORDER_PREFIX.length());
|
||||||
|
@ -50,13 +56,15 @@ public class FiringOrderTSLogic {
|
||||||
public static void parseLine(String line, State state) {
|
public static void parseLine(String line, State state) {
|
||||||
line = line.replaceAll("[\\s]*\\,.*", "");
|
line = line.replaceAll("[\\s]*\\,.*", "");
|
||||||
line = line.replaceAll("[\\s\\,]", "");
|
line = line.replaceAll("[\\s\\,]", "");
|
||||||
System.out.println("Processing " + line);
|
if (log.debugEnabled())
|
||||||
|
log.debug("Processing " + line);
|
||||||
|
|
||||||
String s[] = line.split("\\=");
|
String s[] = line.split("\\=");
|
||||||
String order[] = s[0].split("_");
|
String order[] = s[0].split("_");
|
||||||
int ordinal = Integer.parseInt(s[1]);
|
int ordinal = Integer.parseInt(s[1]);
|
||||||
|
|
||||||
System.out.println("order " + Arrays.toString(order) + ": " + ordinal);
|
if (log.debugEnabled())
|
||||||
|
log.debug("order " + Arrays.toString(order) + ": " + ordinal);
|
||||||
|
|
||||||
state.maxOrdinal = Math.max(ordinal, state.maxOrdinal);
|
state.maxOrdinal = Math.max(ordinal, state.maxOrdinal);
|
||||||
state.ordinal2order.put(ordinal, order);
|
state.ordinal2order.put(ordinal, order);
|
||||||
|
|
Loading…
Reference in New Issue