Skip to content

Commit

Permalink
Native SENT TPS input #5079
Browse files Browse the repository at this point in the history
magic constant bad
  • Loading branch information
rusefillc committed Feb 21, 2023
1 parent d6a47af commit 3894310
Showing 1 changed file with 9 additions and 8 deletions.
Expand Up @@ -4,6 +4,7 @@
import com.rusefi.RusefiTestBase;
import com.rusefi.core.Sensor;
import com.rusefi.core.SensorCentral;
import com.rusefi.enums.SensorType;
import com.rusefi.enums.engine_type_e;
import com.rusefi.functional_tests.EcuTestHelper;
import com.rusefi.waves.EngineChart;
Expand Down Expand Up @@ -113,7 +114,7 @@ public void testRevLimiter() {
// Alpha-N mode so that we actually inject some fuel (without mocking tons of sensors)
ecu.sendCommand("set algorithm 2");
// Set tps to 25% - make alpha-n happy
ecu.sendCommand("set_sensor_mock 10 25");
ecu.sendCommand("set_sensor_mock " + SensorType.Tps1.ordinal() + " 25");
ecu.sendCommand("set rpm_hard_limit 2500");

{
Expand Down Expand Up @@ -204,8 +205,8 @@ public void test2003DodgeNeon() {
ecu.setEngineType(engine_type_e.DODGE_NEON_2003_CRANK);
ecu.sendCommand("set wwaeTau 0");
ecu.sendCommand("set wwaeBeta 0");
ecu.sendCommand("set_sensor_mock 4 69.12"); // MAP
ecu.sendCommand("set_sensor_mock 27 12");
ecu.sendCommand("set_sensor_mock " + SensorType.Map.ordinal() + " 69.12");
ecu.sendCommand("set_sensor_mock " + SensorType.BatteryVoltage.ordinal() + " 12");
ecu.sendCommand("disable cylinder_cleanup");
EngineChart chart;
String msg = "2003 Neon cranking ";
Expand Down Expand Up @@ -270,12 +271,12 @@ public void test2003DodgeNeon() {
public void testMazdaProtege() {
ecu.setEngineType(engine_type_e.FORD_ESCORT_GT);
EngineChart chart;
ecu.sendCommand("set_sensor_mock 27 12");
ecu.sendCommand("set_sensor_mock " + SensorType.BatteryVoltage.ordinal() + " 12");

// Alpha-N mode so that we actually inject some fuel (without mocking tons of sensors)
ecu.sendCommand("set algorithm 2");
// Set tps to 25% - make alpha-n happy
ecu.sendCommand("set_sensor_mock 10 25");
ecu.sendCommand("set_sensor_mock " + SensorType.Tps1.ordinal() + " 25");

ecu.changeRpm(200);
ecu.changeRpm(260);
Expand Down Expand Up @@ -320,7 +321,7 @@ public void test1995DodgeNeon() {
assertWaveNotNull(msg, chart, EngineChart.SPARK_3);

// switching to Speed Density
ecu.sendCommand("set_sensor_mock 4 69.12"); // MAP
ecu.sendCommand("set_sensor_mock " + SensorType.Map.ordinal() + " 69.12");
sendComplexCommand("set algorithm 0");
ecu.changeRpm(2600);
ecu.changeRpm(2000);
Expand Down Expand Up @@ -349,8 +350,8 @@ public void testFord6() {
public void testFordAspire() {
ecu.setEngineType(engine_type_e.FORD_ASPIRE_1996);
ecu.sendCommand("disable cylinder_cleanup");
ecu.sendCommand("set_sensor_mock 4 69.12"); // MAP
ecu.sendCommand("set_sensor_mock 27 12"); // vbatt
ecu.sendCommand("set_sensor_mock " + SensorType.Map.ordinal() + " 69.12");
ecu.sendCommand("set_sensor_mock " + SensorType.BatteryVoltage.ordinal() + " 12");
String msg;
EngineChart chart;
// todo: interesting changeRpm(100);
Expand Down

0 comments on commit 3894310

Please sign in to comment.