auto-sync
This commit is contained in:
parent
74c260b29e
commit
cfda07d7ba
|
@ -31,8 +31,6 @@ public class AutoTest {
|
||||||
|
|
||||||
private static void testCitroenBerlingo() {
|
private static void testCitroenBerlingo() {
|
||||||
setEngineType(15);
|
setEngineType(15);
|
||||||
// time to change engine type
|
|
||||||
nextChart();
|
|
||||||
String msg = "Citroen";
|
String msg = "Citroen";
|
||||||
// todo: add more content
|
// todo: add more content
|
||||||
}
|
}
|
||||||
|
@ -45,11 +43,9 @@ public class AutoTest {
|
||||||
|
|
||||||
private static void testMazda626() {
|
private static void testMazda626() {
|
||||||
setEngineType(28);
|
setEngineType(28);
|
||||||
WaveChart chart;
|
|
||||||
// time to change engine type
|
|
||||||
nextChart();
|
|
||||||
String msg = "mazda 626 default cranking";
|
String msg = "mazda 626 default cranking";
|
||||||
IoUtil.changeRpm(200);
|
IoUtil.changeRpm(200);
|
||||||
|
WaveChart chart;
|
||||||
chart = nextChart();
|
chart = nextChart();
|
||||||
|
|
||||||
double x = 275;
|
double x = 275;
|
||||||
|
@ -59,11 +55,8 @@ public class AutoTest {
|
||||||
private static void test2003DodgeNeon() {
|
private static void test2003DodgeNeon() {
|
||||||
setEngineType(23);
|
setEngineType(23);
|
||||||
WaveChart chart;
|
WaveChart chart;
|
||||||
// time to change engine type
|
|
||||||
nextChart();
|
|
||||||
String msg = "2003 Neon cranking ";
|
String msg = "2003 Neon cranking ";
|
||||||
IoUtil.changeRpm(200);
|
IoUtil.changeRpm(200);
|
||||||
nextChart();
|
|
||||||
|
|
||||||
chart = nextChart();
|
chart = nextChart();
|
||||||
double x = 100;
|
double x = 100;
|
||||||
|
@ -99,7 +92,6 @@ public class AutoTest {
|
||||||
private static void testMazdaProtege() {
|
private static void testMazdaProtege() {
|
||||||
setEngineType(14);
|
setEngineType(14);
|
||||||
WaveChart chart;
|
WaveChart chart;
|
||||||
nextChart(); // a bit of extra time to change engine type
|
|
||||||
IoUtil.changeRpm(200);
|
IoUtil.changeRpm(200);
|
||||||
String msg = "ProtegeLX cranking";
|
String msg = "ProtegeLX cranking";
|
||||||
chart = nextChart();
|
chart = nextChart();
|
||||||
|
|
|
@ -64,7 +64,6 @@ public class IoUtil {
|
||||||
// we need to skip TWO because spark could have been scheduled a while ago and happen now
|
// we need to skip TWO because spark could have been scheduled a while ago and happen now
|
||||||
// todo: improve this logic, compare times
|
// todo: improve this logic, compare times
|
||||||
getWaveChart();
|
getWaveChart();
|
||||||
getWaveChart();
|
|
||||||
// we want to wait for the 2nd chart to see same same RPM across the whole chart
|
// we want to wait for the 2nd chart to see same same RPM across the whole chart
|
||||||
String result = getWaveChart();
|
String result = getWaveChart();
|
||||||
FileLog.MAIN.logLine("current chart: " + result);
|
FileLog.MAIN.logLine("current chart: " + result);
|
||||||
|
@ -129,6 +128,7 @@ public class IoUtil {
|
||||||
|
|
||||||
if (!isCloseEnough(rpm, actualRpm))
|
if (!isCloseEnough(rpm, actualRpm))
|
||||||
throw new IllegalStateException("rpm change did not happen: " + rpm + ", actual " + actualRpm);
|
throw new IllegalStateException("rpm change did not happen: " + rpm + ", actual " + actualRpm);
|
||||||
|
sendCommand("reset_wave_chart");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void waitForFirstResponse() throws InterruptedException {
|
static void waitForFirstResponse() throws InterruptedException {
|
||||||
|
|
Loading…
Reference in New Issue