auto-sync

This commit is contained in:
rusEfi 2016-02-13 15:03:37 -05:00
parent ebb80aac5c
commit 8d9d032a98
4 changed files with 14 additions and 2 deletions

View File

@ -575,7 +575,7 @@ typedef enum {
ALTERNATOR = 0, ALTERNATOR = 0,
TPS_ACCEL = 1, TPS_ACCEL = 1,
WARMUP_ENRICH = 2, WARMUP_ENRICH = 2,
mode3 = 3, IDLE = 3,
Force_4b_debug_mode_e = ENUM_32_BITS, Force_4b_debug_mode_e = ENUM_32_BITS,
} debug_mode_e; } debug_mode_e;

View File

@ -39,6 +39,7 @@
static THD_WORKING_AREA(ivThreadStack, UTILITY_THREAD_STACK_SIZE); static THD_WORKING_AREA(ivThreadStack, UTILITY_THREAD_STACK_SIZE);
static Logging *logger; static Logging *logger;
extern TunerStudioOutputChannels tsOutputChannels;
EXTERN_ENGINE EXTERN_ENGINE
; ;
@ -112,6 +113,10 @@ static void manualIdleController(int positionPercent) {
} }
actualIdlePosition = cltCorrectedPosition; actualIdlePosition = cltCorrectedPosition;
if (engineConfiguration->debugMode == IDLE) {
tsOutputChannels.debugFloatField1 = actualIdlePosition;
}
if (boardConfiguration->useStepperIdle) { if (boardConfiguration->useStepperIdle) {
iacMotor.setTargetPosition(cltCorrectedPosition / 100 * engineConfiguration->idleStepperTotalSteps); iacMotor.setTargetPosition(cltCorrectedPosition / 100 * engineConfiguration->idleStepperTotalSteps);
} else { } else {

View File

@ -6,6 +6,7 @@ import etch.util.CircularByteBuffer;
import net.jcip.annotations.ThreadSafe; import net.jcip.annotations.ThreadSafe;
import java.io.EOFException; import java.io.EOFException;
import java.util.Arrays;
/** /**
* (c) Andrey Belomutskiy * (c) Andrey Belomutskiy
@ -59,7 +60,9 @@ public class IncomingDataBuffer {
int pending = cbb.length(); int pending = cbb.length();
if (pending > 0) { if (pending > 0) {
logger.error("Unexpected pending data: " + pending + " byte(s)"); logger.error("Unexpected pending data: " + pending + " byte(s)");
cbb.get(new byte[pending]); byte[] bytes = new byte[pending];
cbb.get(bytes);
logger.error("data: " + Arrays.toString(bytes));
} }
} }
} }

View File

@ -40,4 +40,8 @@ public class SerialPortReader implements SerialPortEventListener {
} }
} }
public void readInitial() throws SerialPortException {
int input = serialPort.getInputBufferBytesCount();
FileLog.MAIN.logLine(input + " bytes in input buffer");
}
} }