refactoring & docs update

This commit is contained in:
rusefi 2019-12-21 19:59:33 -05:00
parent fc0c68fac0
commit 83507320f6
5 changed files with 10 additions and 6 deletions

View File

@ -270,7 +270,7 @@ void initWaveChart(WaveChart *chart) {
addConsoleActionI("chartsize", setChartSize);
addConsoleActionI("chart", setChartActive);
#if ! EFI_UNIT_TEST
addConsoleAction("reset_engine_chart", resetNow);
addConsoleAction(CMD_RESET_ENGINE_SNIFFER, resetNow);
#endif
}

View File

@ -1301,6 +1301,8 @@ end_struct
#define CMD_CALIBRATE_PEDAL_DOWN "calibrate_pedal_down"
#define CMD_ETB_DUTY "set_etb_duty"
#define CMD_RESET_ENGINE_SNIFFER "reset_engine_chart"
#define CMD_ENGINE_TYPE "engine_type"
#define CMD_TRIGGERINFO "triggerinfo"
#define CMD_WRITECONFIG "writeconfig"

View File

@ -20,8 +20,6 @@ import static com.rusefi.waves.EngineReport.isCloseEnough;
*/
public class IoUtil {
public static final String RESET_ENGINE_CHART = "reset_engine_chart";
/**
* Send a command and wait for the confirmation
*
@ -87,7 +85,7 @@ public class IoUtil {
if (!isCloseEnough(rpm, actualRpm))
throw new IllegalStateException("rpm change did not happen: " + rpm + ", actual " + actualRpm);
sendCommand(RESET_ENGINE_CHART);
sendCommand(Fields.CMD_RESET_ENGINE_SNIFFER);
}
static void waitForFirstResponse() throws InterruptedException {

View File

@ -1,5 +1,6 @@
package com.rusefi;
import com.rusefi.config.generated.Fields;
import com.rusefi.core.EngineState;
import com.rusefi.io.LinkManager;
import com.rusefi.waves.EngineChart;
@ -111,6 +112,8 @@ public class TestingUtils {
* setting change?
*
* also open question why do we skip TWO full charts. maybe we account for fast or slow callback period?
*
* WOW, actually we DO have CMD_RESET_ENGINE_SNIFFER already and yet things are STILL pretty slow and unreliable?!
*/
getNextWaveChart();
getNextWaveChart();
@ -118,7 +121,7 @@ public class TestingUtils {
}
static String getNextWaveChart() {
IoUtil.sendCommand(IoUtil.RESET_ENGINE_CHART);
IoUtil.sendCommand(Fields.CMD_RESET_ENGINE_SNIFFER);
String result = getEngineChart();
FileLog.MAIN.logLine("current chart: " + result);
return result;

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Dec 14 16:03:19 EST 2019
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Dec 21 19:54:06 EST 2019
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
@ -245,6 +245,7 @@ public class Fields {
public static final String CMD_PINS = "pins";
public static final String CMD_REBOOT = "reboot";
public static final String CMD_REBOOT_DFU = "reboot_dfu";
public static final String CMD_RESET_ENGINE_SNIFFER = "reset_engine_chart";
public static final String CMD_TRIGGER_HW_INPUT = "trigger_hw_input";
public static final String CMD_TRIGGERINFO = "triggerinfo";
public static final String CMD_WRITECONFIG = "writeconfig";