This commit is contained in:
rusefillc 2022-06-03 13:58:24 -04:00
commit 35eee3c26f
50 changed files with 330 additions and 149 deletions

View File

@ -1,8 +1,92 @@
pins: pins:
- pin: 1a
function: Power Ground
color: black
- pin: 2a
function: Power Ground
color: black
- pin: 4a
function: +12v power
color: red
- pin: 6a - pin: 6a
function: Aux Analog #0 function: Aux Analog 0
color: orange color: orange
- pin: 44a
function: Injector Control 1
color: blue
- pin: 45a
function: Injector Control 2
color: blue
- pin: 46a
function: Injector Control 3
color: blue
- pin: 47a
function: Injector Control 4
color: blue
- pin: 52a
function: CAN High
color: yellow
- pin: 53a
function: CAN Low
color: yellow
- pin: 90a
function: Injector Output 3 Negative
color: blue
- pin: 91a
function: Injector Output 3 Negative
color: blue
- pin: 92a
function: Injector Output 4 Negative
color: blue
- pin: 93a
function: Injector Output 4 Negative
color: blue
- pin: 94a
function: Injector Output 3 Positive
color: blue
- pin: 95a
function: Injector Output 3 Positive
color: blue
- pin: 96a
function: Injector Output 4 Positive
color: blue
- pin: 97a
function: Injector Output 4 Positive
color: blue
- pin: 114a
function: Injector Output 1 Negative
color: blue
- pin: 118a
function: Injector Output 1 Positive
color: blue
- pin: 119a
function: Injector Output 2 Negative
color: blue
- pin: 121a
function: Injector Output 2 Positive
color: blue
info: info:
title: GDI4 title: GDI4

View File

@ -106,6 +106,23 @@ void setBoardConfigOverrides() {
engineConfiguration->canTxPin = Gpio::D1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = Gpio::D0; engineConfiguration->canRxPin = Gpio::D0;
// TLE9201 driver
// This chip has three control pins:
// DIR - sets direction of the motor
// PWM - pwm control (enable high, coast low)
// DIS - disables motor (enable low)
//ETB1
// PWM pin
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM8;
// DIR pin
engineConfiguration->etbIo[0].directionPin1 = H144_OUT_IO13;
// Disable pin
engineConfiguration->etbIo[0].disablePin = H144_OUT_IO4;
// Unused
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
} }
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {

View File

@ -105,7 +105,7 @@
// PA1 // PA1
#define PROTEUS_IN_ANALOG_VOLT_6 EFI_ADC_1 #define PROTEUS_IN_ANALOG_VOLT_6 EFI_ADC_1
#define PROTEUS_IN_PPS PROTEUS_IN_ANALOG_VOLT_6 // we are not in sync with yaml?! #define PROTEUS_IN_PPS PROTEUS_IN_ANALOG_VOLT_6
// PA2 // PA2
#define PROTEUS_IN_ANALOG_VOLT_7 EFI_ADC_2 #define PROTEUS_IN_ANALOG_VOLT_7 EFI_ADC_2

View File

@ -22,6 +22,10 @@ static void commonPassatB6() {
engineConfiguration->specs.cylindersCount = 4; engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->specs.firingOrder = FO_1_3_4_2; engineConfiguration->specs.firingOrder = FO_1_3_4_2;
engineConfiguration->isPhaseSyncRequiredForIgnition = true;
engineConfiguration->disableEtbWhenEngineStopped = true;
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = Gpio::Unassigned; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
@ -129,6 +133,8 @@ static void commonPassatB6() {
void setProteusVwPassatB6() { void setProteusVwPassatB6() {
#if HW_PROTEUS #if HW_PROTEUS
commonPassatB6(); commonPassatB6();
engineConfiguration->triggerInputPins[0] = PROTEUS_VR_1;
engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_2;
engineConfiguration->lowPressureFuel.hwChannel = PROTEUS_IN_ANALOG_VOLT_5; engineConfiguration->lowPressureFuel.hwChannel = PROTEUS_IN_ANALOG_VOLT_5;
engineConfiguration->highPressureFuel.hwChannel = PROTEUS_IN_ANALOG_VOLT_4; engineConfiguration->highPressureFuel.hwChannel = PROTEUS_IN_ANALOG_VOLT_4;
@ -140,6 +146,15 @@ void setProteusVwPassatB6() {
gppwm_channel *lowPressureFuelPumpControl = &engineConfiguration->gppwm[1]; gppwm_channel *lowPressureFuelPumpControl = &engineConfiguration->gppwm[1];
lowPressureFuelPumpControl->pin = PROTEUS_LS_7; lowPressureFuelPumpControl->pin = PROTEUS_LS_7;
//engineConfiguration->boostControlPin = PROTEUS_LS_8;
engineConfiguration->vvtPins[0] = PROTEUS_LS_9;
engineConfiguration->hpfpValvePin = PROTEUS_LS_15;
engineConfiguration->tps1_2AdcChannel = PROTEUS_IN_TPS1_2;
engineConfiguration->throttlePedalPositionAdcChannel = PROTEUS_IN_ANALOG_VOLT_9;
engineConfiguration->throttlePedalPositionSecondAdcChannel = PROTEUS_IN_PPS2;
#endif #endif
} }

View File

@ -1082,9 +1082,9 @@ void setProteusHitachiEtbDefaults() {
// EFI_ADC_13: "Analog Volt 4" // EFI_ADC_13: "Analog Volt 4"
engineConfiguration->tps2_1AdcChannel = PROTEUS_IN_TPS2_1; engineConfiguration->tps2_1AdcChannel = PROTEUS_IN_TPS2_1;
// EFI_ADC_0: "Analog Volt 5" // EFI_ADC_0: "Analog Volt 5"
engineConfiguration->tps2_2AdcChannel = EFI_ADC_0; engineConfiguration->tps2_2AdcChannel = PROTEUS_IN_ANALOG_VOLT_5;
// EFI_ADC_1: "Analog Volt 6" // EFI_ADC_1: "Analog Volt 6"
engineConfiguration->throttlePedalPositionAdcChannel = PROTEUS_IN_PPS; engineConfiguration->throttlePedalPositionAdcChannel = PROTEUS_IN_ANALOG_VOLT_6;
// EFI_ADC_2: "Analog Volt 7" // EFI_ADC_2: "Analog Volt 7"
engineConfiguration->throttlePedalPositionSecondAdcChannel = PROTEUS_IN_PPS2; engineConfiguration->throttlePedalPositionSecondAdcChannel = PROTEUS_IN_PPS2;

View File

@ -1,2 +1,2 @@
#pragma once #pragma once
#define VCS_DATE 20220601 #define VCS_DATE 20220603

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 1520371551 #define SIGNATURE_HASH 705317436
#define TS_SIGNATURE "rusEFI 2022.06.02.48way.1520371551" #define TS_SIGNATURE "rusEFI 2022.06.03.48way.705317436"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 1303908112 #define SIGNATURE_HASH 1026376307
#define TS_SIGNATURE "rusEFI 2022.06.02.all.1303908112" #define TS_SIGNATURE "rusEFI 2022.06.03.all.1026376307"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 2141885052 #define SIGNATURE_HASH 255844127
#define TS_SIGNATURE "rusEFI 2022.06.02.alphax-2chan.2141885052" #define TS_SIGNATURE "rusEFI 2022.06.03.alphax-2chan.255844127"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 1848959059 #define SIGNATURE_HASH 513912112
#define TS_SIGNATURE "rusEFI 2022.06.02.alphax-4chan.1848959059" #define TS_SIGNATURE "rusEFI 2022.06.03.alphax-4chan.513912112"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 1366489655 #define SIGNATURE_HASH 568833876
#define TS_SIGNATURE "rusEFI 2022.06.02.atlas.1366489655" #define TS_SIGNATURE "rusEFI 2022.06.03.atlas.568833876"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 3142868713 #define SIGNATURE_HASH 3418428298
#define TS_SIGNATURE "rusEFI 2022.06.02.core8.3142868713" #define TS_SIGNATURE "rusEFI 2022.06.03.core8.3418428298"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 1303908112 #define SIGNATURE_HASH 1026376307
#define TS_SIGNATURE "rusEFI 2022.06.02.f407-discovery.1303908112" #define TS_SIGNATURE "rusEFI 2022.06.03.f407-discovery.1026376307"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 1303908112 #define SIGNATURE_HASH 1026376307
#define TS_SIGNATURE "rusEFI 2022.06.02.f429-discovery.1303908112" #define TS_SIGNATURE "rusEFI 2022.06.03.f429-discovery.1026376307"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 265614292 #define SIGNATURE_HASH 2135015095
#define TS_SIGNATURE "rusEFI 2022.06.02.frankenso_na6.265614292" #define TS_SIGNATURE "rusEFI 2022.06.03.frankenso_na6.2135015095"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 961826927 #define SIGNATURE_HASH 1237392652
#define TS_SIGNATURE "rusEFI 2022.06.02.harley81.961826927" #define TS_SIGNATURE "rusEFI 2022.06.03.harley81.1237392652"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 1206291866 #define SIGNATURE_HASH 2003219992
#define TS_SIGNATURE "rusEFI 2022.06.02.hellen-gm-e67.1206291866" #define TS_SIGNATURE "rusEFI 2022.06.03.hellen-gm-e67.2003219992"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 2486386396 #define SIGNATURE_HASH 3836113855
#define TS_SIGNATURE "rusEFI 2022.06.02.hellen-nb1.2486386396" #define TS_SIGNATURE "rusEFI 2022.06.03.hellen-nb1.3836113855"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 2469175397 #define SIGNATURE_HASH 3820612870
#define TS_SIGNATURE "rusEFI 2022.06.02.hellen121nissan.2469175397" #define TS_SIGNATURE "rusEFI 2022.06.03.hellen121nissan.3820612870"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 26187674 #define SIGNATURE_HASH 1897585401
#define TS_SIGNATURE "rusEFI 2022.06.02.hellen121vag.26187674" #define TS_SIGNATURE "rusEFI 2022.06.03.hellen121vag.1897585401"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 596890561 #define SIGNATURE_HASH 1392942754
#define TS_SIGNATURE "rusEFI 2022.06.02.hellen128.596890561" #define TS_SIGNATURE "rusEFI 2022.06.03.hellen128.1392942754"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 3589766548 #define SIGNATURE_HASH 2774675703
#define TS_SIGNATURE "rusEFI 2022.06.02.hellen154hyundai.3589766548" #define TS_SIGNATURE "rusEFI 2022.06.03.hellen154hyundai.2774675703"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 4194484970 #define SIGNATURE_HASH 2325188489
#define TS_SIGNATURE "rusEFI 2022.06.02.hellen72.4194484970" #define TS_SIGNATURE "rusEFI 2022.06.03.hellen72.2325188489"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 1863178010 #define SIGNATURE_HASH 530094713
#define TS_SIGNATURE "rusEFI 2022.06.02.hellen81.1863178010" #define TS_SIGNATURE "rusEFI 2022.06.03.hellen81.530094713"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 288344500 #define SIGNATURE_HASH 1639613655
#define TS_SIGNATURE "rusEFI 2022.06.02.hellen88bmw.288344500" #define TS_SIGNATURE "rusEFI 2022.06.03.hellen88bmw.1639613655"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 3476291184 #define SIGNATURE_HASH 3215373075
#define TS_SIGNATURE "rusEFI 2022.06.02.hellenNA6.3476291184" #define TS_SIGNATURE "rusEFI 2022.06.03.hellenNA6.3215373075"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 4167937726 #define SIGNATURE_HASH 2298012637
#define TS_SIGNATURE "rusEFI 2022.06.02.hellenNA8_96.4167937726" #define TS_SIGNATURE "rusEFI 2022.06.03.hellenNA8_96.2298012637"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat null // was generated automatically by rusEFI tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat null
// //
#define SIGNATURE_HASH 143933722 #define SIGNATURE_HASH 2013334649
#define TS_SIGNATURE "rusEFI 2022.06.02.hellen_cypress.143933722" #define TS_SIGNATURE "rusEFI 2022.06.03.hellen_cypress.2013334649"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on kinetis_gen_config.bat null // was generated automatically by rusEFI tool ConfigDefinition.jar based on kinetis_gen_config.bat null
// //
#define SIGNATURE_HASH 1456940695 #define SIGNATURE_HASH 641887220
#define TS_SIGNATURE "rusEFI 2022.06.02.kin.1456940695" #define TS_SIGNATURE "rusEFI 2022.06.03.kin.641887220"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 11185828 #define SIGNATURE_HASH 1883235271
#define TS_SIGNATURE "rusEFI 2022.06.02.mre_f4.11185828" #define TS_SIGNATURE "rusEFI 2022.06.03.mre_f4.1883235271"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 11185828 #define SIGNATURE_HASH 1883235271
#define TS_SIGNATURE "rusEFI 2022.06.02.mre_f7.11185828" #define TS_SIGNATURE "rusEFI 2022.06.03.mre_f7.1883235271"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 491968246 #define SIGNATURE_HASH 1841798037
#define TS_SIGNATURE "rusEFI 2022.06.02.prometheus_405.491968246" #define TS_SIGNATURE "rusEFI 2022.06.03.prometheus_405.1841798037"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 491968246 #define SIGNATURE_HASH 1841798037
#define TS_SIGNATURE "rusEFI 2022.06.02.prometheus_469.491968246" #define TS_SIGNATURE "rusEFI 2022.06.03.prometheus_469.1841798037"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 2427914812 #define SIGNATURE_HASH 3760342879
#define TS_SIGNATURE "rusEFI 2022.06.02.proteus_f4.2427914812" #define TS_SIGNATURE "rusEFI 2022.06.03.proteus_f4.3760342879"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 2427914812 #define SIGNATURE_HASH 3760342879
#define TS_SIGNATURE "rusEFI 2022.06.02.proteus_f7.2427914812" #define TS_SIGNATURE "rusEFI 2022.06.03.proteus_f7.3760342879"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 2427914812 #define SIGNATURE_HASH 3760342879
#define TS_SIGNATURE "rusEFI 2022.06.02.proteus_h7.2427914812" #define TS_SIGNATURE "rusEFI 2022.06.03.proteus_h7.3760342879"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on config/boards/subaru_eg33/config/gen_subaru_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on config/boards/subaru_eg33/config/gen_subaru_config.sh null
// //
#define SIGNATURE_HASH 1185543842 #define SIGNATURE_HASH 909949889
#define TS_SIGNATURE "rusEFI 2022.06.02.subaru_eg33_f7.1185543842" #define TS_SIGNATURE "rusEFI 2022.06.03.subaru_eg33_f7.909949889"

View File

@ -2,5 +2,5 @@
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null // was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
// //
#define SIGNATURE_HASH 3887120708 #define SIGNATURE_HASH 2535820327
#define TS_SIGNATURE "rusEFI 2022.06.02.tdg-pdm8.3887120708" #define TS_SIGNATURE "rusEFI 2022.06.03.tdg-pdm8.2535820327"

View File

@ -137,8 +137,8 @@ void Gm4l6xTransmissionController::setPcState(gear_e gear) {
pcts = &config->tcu_pcVals4; pcts = &config->tcu_pcVals4;
break; break;
} }
int pct = interpolate2d(engine->engineState.sd.airMassInOneCylinder, config->tcu_pcAirmassBins, *pcts); float duty = 0.01f * interpolate2d(engine->engineState.sd.airMassInOneCylinder, config->tcu_pcAirmassBins, *pcts);
pcPwm.setSimplePwmDutyCycle(pct*0.01); pcPwm.setSimplePwmDutyCycle(duty);
} }
void Gm4l6xTransmissionController::set32State(gear_e gear) { void Gm4l6xTransmissionController::set32State(gear_e gear) {

View File

@ -13,24 +13,85 @@
# todo: what is sequence of events in terms of 'live_data_e' code generation? # todo: what is sequence of events in terms of 'live_data_e' code generation?
# #
Usages: Usages:
output_channels: ["TsOutputs.java", "console/binary", "-prepend=integration/rusefi_config.txt" ] - name: output_channels
knock_controller: [ "KnockController.java", "controllers/engine_cycle" ] java: TsOutputs.java
high_pressure_fuel_pump: [ "HighPressureFuelPump.java", "controllers/engine_cycle" ] folder: console/binary
injector_model: [ "InjectorModel.java", "controllers/algo/fuel" ] prepend: integration/rusefi_config.txt
launch_control_state: [ "LaunchControl.java", "controllers/algo" ]
boost_control: [ "BoostControl.java", "controllers/actuators" ]
ac_control: [ "AcControl.java", "controllers/actuators", "-prepend=integration/rusefi_config.txt" ]
fan_control: [ "FanControl.java", "controllers/actuators" ]
fuel_pump_control: [ "FuelPump.java", "controllers/actuators" ]
main_relay: [ "MainRelay.java", "controllers/actuators" ]
#todo: handle ETB pid and Idle pid which point at same pid_state.txt
#pid_state: [ "PidState.java", "util/math" ]
engine_state: [ "EngineState.java", "controllers/algo" ]
tps_accel_state: [ "TpsAccelState.java", "controllers/algo" ]
trigger_central: [ "TriggerCentral.java", "controllers/trigger", "-with_c_defines=true" ]
trigger_state: [ "TriggerState.java", "controllers/trigger", "-prepend=integration/rusefi_config.txt" ]
wall_fuel_state: [ "WallFuelState.java", "controllers/algo" ]
idle_state: [ "IdleState.java", "controllers/actuators" ]
ignition_state: [ "IgnitionState.java", "controllers/algo" ]
electronic_throttle: [ "ElectronicThrottle.java", "controllers/actuators" ]
- name: knock_controller
java: KnockController.java
folder: controllers/engine_cycle
- name: high_pressure_fuel_pump
java: HighPressureFuelPump.java
folder: controllers/engine_cycle
- name: injector_model
java: InjectorModel.java
folder: controllers/algo/fuel
- name: launch_control_state
java: LaunchControl.java
folder: controllers/algo
- name: boost_control
java: BoostControl.java
folder: controllers/actuators
- name: ac_control
java: AcControl.java
folder: controllers/actuators
prepend: integration/rusefi_config.txt
- name: fan_control
java: FanControl.java
folder: controllers/actuators
- name: fuel_pump_control
java: FuelPump.java
folder: controllers/actuators
- name: main_relay
java: MainRelay.java
folder: controllers/actuators
#todo: handle ETB pid and Idle pid which point at same pid_state.txt
# - name: pid_state
# java: PidState.java
# folder: util/math
- name: engine_state
java: EngineState.java
folder: controllers/algo
- name: tps_accel_state
java: TpsAccelState.java
folder: controllers/algo
- name: trigger_central
java: TriggerCentral.java
folder: controllers/trigger
withCDefines: true
- name: trigger_state
java: TriggerState.java
folder: controllers/trigger
prepend: integration/rusefi_config.txt
output_name: [ "trg", "vvt1i", "vvt1e", "vvt2i", "vvt2e" ]
- name: wall_fuel_state
java: WallFuelState.java
folder: controllers/algo
- name: idle_state
java: IdleState.java
folder: controllers/actuators
output_name: idle
- name: ignition_state
java: IgnitionState.java
folder: controllers/algo
- name: electronic_throttle
java: ElectronicThrottle.java
folder: controllers/actuators

View File

@ -1397,9 +1397,9 @@ tChargeMode_e tChargeMode;
uint8_t[8] autoscale primeValues;;"mg", 5, 0, 0, 1250, 0 uint8_t[8] autoscale primeValues;;"mg", 5, 0, 0, 1250, 0
uint8_t triggerCompCenterVolt;+Trigger comparator center point voltage;"V", @@VOLTAGE_1_BYTE_PACKING_DIV@@, 0, 0, 5.1, 2 uint8_t autoscale triggerCompCenterVolt;+Trigger comparator center point voltage;"V", @@VOLTAGE_1_BYTE_PACKING_DIV@@, 0, 0, 5.1, 2
uint8_t triggerCompHystMin;+Trigger comparator hysteresis voltage (Min);"V", @@VOLTAGE_1_BYTE_PACKING_DIV@@, 0, 0, 5.1, 2 uint8_t autoscale triggerCompHystMin;+Trigger comparator hysteresis voltage (Min);"V", @@VOLTAGE_1_BYTE_PACKING_DIV@@, 0, 0, 5.1, 2
uint8_t triggerCompHystMax;+Trigger comparator hysteresis voltage (Max);"V", @@VOLTAGE_1_BYTE_PACKING_DIV@@, 0, 0, 5.1, 2 uint8_t autoscale triggerCompHystMax;+Trigger comparator hysteresis voltage (Max);"V", @@VOLTAGE_1_BYTE_PACKING_DIV@@, 0, 0, 5.1, 2
uint8_t autoscale triggerCompSensorSatRpm;+VR-sensor saturation RPM;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 12000, 0 uint8_t autoscale triggerCompSensorSatRpm;+VR-sensor saturation RPM;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 12000, 0
pid_s idleRpmPid2 pid_s idleRpmPid2
@ -1646,7 +1646,7 @@ uint16_t[FUEL_RPM_COUNT] veRpmBins;;"RPM", 1, 0, 0, 18000, 0
#if LAMBDA #if LAMBDA
uint8_t[FUEL_RPM_COUNT x FUEL_LOAD_COUNT] autoscale lambdaTable;;"lambda", {1/@@PACK_MULT_LAMBDA_CFG@@}, 0, 0.6, 1.5, 2 uint8_t[FUEL_RPM_COUNT x FUEL_LOAD_COUNT] autoscale lambdaTable;;"lambda", {1/@@PACK_MULT_LAMBDA_CFG@@}, 0, 0.6, 1.5, 2
#else #else
uint8_t[FUEL_RPM_COUNT x FUEL_LOAD_COUNT] lambdaTable;;"afr", {1/@@PACK_MULT_AFR_CFG@@}, 0, 0, 25, 1 uint8_t[FUEL_RPM_COUNT x FUEL_LOAD_COUNT] autoscale lambdaTable;;"afr", {1/@@PACK_MULT_AFR_CFG@@}, 0, 0, 25, 1
#endif #endif
! union ! union
@ -1695,19 +1695,21 @@ cyl_trim_s[12 iterate] fuelTrims
uint16_t[CRANKING_CURVE_SIZE] autoscale crankingFuelCoefE100;;"ratio", 0.01, 0, 0, 50, 2 uint16_t[CRANKING_CURVE_SIZE] autoscale crankingFuelCoefE100;;"ratio", 0.01, 0, 0, 50, 2
uint8_t[8] tcu_pcAirmassBins;;"Airmass", 0.02, 0, 0, 255, 2 #define TCU_MAGIC_SIZE 8
uint8_t[8] tcu_pcValsR;;"%", 1, 0, 0, 255, 0
uint8_t[8] tcu_pcValsN;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] autoscale tcu_pcAirmassBins;;"Airmass", 0.02, 0, 0, 255, 2
uint8_t[8] tcu_pcVals1;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcValsR;;"%", 1, 0, 0, 255, 0
uint8_t[8] tcu_pcVals2;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcValsN;;"%", 1, 0, 0, 255, 0
uint8_t[8] tcu_pcVals3;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcVals1;;"%", 1, 0, 0, 255, 0
uint8_t[8] tcu_pcVals4;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcVals2;;"%", 1, 0, 0, 255, 0
uint8_t[8] tcu_pcVals12;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcVals3;;"%", 1, 0, 0, 255, 0
uint8_t[8] tcu_pcVals23;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcVals4;;"%", 1, 0, 0, 255, 0
uint8_t[8] tcu_pcVals34;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcVals12;;"%", 1, 0, 0, 255, 0
uint8_t[8] tcu_pcVals21;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcVals23;;"%", 1, 0, 0, 255, 0
uint8_t[8] tcu_pcVals32;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcVals34;;"%", 1, 0, 0, 255, 0
uint8_t[8] tcu_pcVals43;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcVals21;;"%", 1, 0, 0, 255, 0
uint8_t[TCU_MAGIC_SIZE] tcu_pcVals32;;"%", 1, 0, 0, 255, 0
uint8_t[TCU_MAGIC_SIZE] tcu_pcVals43;;"%", 1, 0, 0, 255, 0
uint8_t[8] tcu_tccTpsBins;;"TPS", 1, 0, 0, 255, 0 uint8_t[8] tcu_tccTpsBins;;"TPS", 1, 0, 0, 255, 0
uint8_t[8] tcu_tccLockSpeed;;"MPH", 1, 0, 0, 255, 0 uint8_t[8] tcu_tccLockSpeed;;"MPH", 1, 0, 0, 255, 0

View File

@ -1,12 +1,12 @@
// This file was generated by Version2Header // This file was generated by Version2Header
// Wed Jun 01 00:23:06 UTC 2022 // Fri Jun 03 00:17:45 UTC 2022
#ifndef GIT_HASH #ifndef GIT_HASH
#define GIT_HASH "fc8a3efdee5f57a4eb6a38f880de68455ba7a233" #define GIT_HASH "e3dfc02faabd84bf9cca7793e110aebdfb6256ae"
#endif #endif
#ifndef VCS_VERSION #ifndef VCS_VERSION
#define VCS_VERSION "40609" #define VCS_VERSION "40664"
#endif #endif

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated; package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/ac_control.txt Thu Jun 02 01:28:33 UTC 2022 // this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/ac_control.txt Fri Jun 03 04:50:14 UTC 2022
// by class com.rusefi.output.FileJavaFieldsConsumer // by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*; import com.rusefi.config.*;
@ -330,6 +330,7 @@ public class AcControl {
public static final int STFT_BANK_COUNT = 2; public static final int STFT_BANK_COUNT = 2;
public static final int STFT_CELL_COUNT = 4; public static final int STFT_CELL_COUNT = 4;
public static final int TCU_GEAR_COUNT = 10; public static final int TCU_GEAR_COUNT = 10;
public static final int TCU_MAGIC_SIZE = 8;
public static final int TCU_SOLENOID_COUNT = 6; public static final int TCU_SOLENOID_COUNT = 6;
public static final int TOOTH_DATA_LENGTH = 2000; public static final int TOOTH_DATA_LENGTH = 2000;
public static final int TOOTH_PACKET_COUNT = 1000; public static final int TOOTH_PACKET_COUNT = 1000;

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated; package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger/trigger_state.txt Thu Jun 02 01:28:33 UTC 2022 // this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger/trigger_state.txt Fri Jun 03 04:50:14 UTC 2022
// by class com.rusefi.output.FileJavaFieldsConsumer // by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*; import com.rusefi.config.*;
@ -330,6 +330,7 @@ public class TriggerState {
public static final int STFT_BANK_COUNT = 2; public static final int STFT_BANK_COUNT = 2;
public static final int STFT_CELL_COUNT = 4; public static final int STFT_CELL_COUNT = 4;
public static final int TCU_GEAR_COUNT = 10; public static final int TCU_GEAR_COUNT = 10;
public static final int TCU_MAGIC_SIZE = 8;
public static final int TCU_SOLENOID_COUNT = 6; public static final int TCU_SOLENOID_COUNT = 6;
public static final int TOOTH_DATA_LENGTH = 2000; public static final int TOOTH_DATA_LENGTH = 2000;
public static final int TOOTH_PACKET_COUNT = 1000; public static final int TOOTH_PACKET_COUNT = 1000;

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated; package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Thu Jun 02 01:28:33 UTC 2022 // this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Jun 03 04:50:14 UTC 2022
// by class com.rusefi.output.FileJavaFieldsConsumer // by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*; import com.rusefi.config.*;
@ -330,6 +330,7 @@ public class TsOutputs {
public static final int STFT_BANK_COUNT = 2; public static final int STFT_BANK_COUNT = 2;
public static final int STFT_CELL_COUNT = 4; public static final int STFT_CELL_COUNT = 4;
public static final int TCU_GEAR_COUNT = 10; public static final int TCU_GEAR_COUNT = 10;
public static final int TCU_MAGIC_SIZE = 8;
public static final int TCU_SOLENOID_COUNT = 6; public static final int TCU_SOLENOID_COUNT = 6;
public static final int TOOTH_DATA_LENGTH = 2000; public static final int TOOTH_DATA_LENGTH = 2000;
public static final int TOOTH_PACKET_COUNT = 1000; public static final int TOOTH_PACKET_COUNT = 1000;

Binary file not shown.

View File

@ -1,8 +1,9 @@
<component name="ProjectRunConfigurationManager"> <component name="ProjectRunConfigurationManager">
<configuration default="false" name="LiveDocsMetaParser" type="Application" factoryName="Application" nameIsGenerated="true"> <configuration default="false" name="UsagesReader" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.rusefi.ldmp.LiveDocsMetaParser" /> <option name="MAIN_CLASS_NAME" value="com.rusefi.ldmp.UsagesReader" />
<module name="configuration_definition" /> <module name="configuration_definition" />
<option name="PROGRAM_PARAMETERS" value="&quot;../../firmware/controllers/math/speed_density.cpp&quot; &quot;../../&quot;" /> <option name="PROGRAM_PARAMETERS" value="integration/LiveData.yaml" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/../../firmware" />
<extension name="coverage"> <extension name="coverage">
<pattern> <pattern>
<option name="PATTERN" value="com.rusefi.ldmp.*" /> <option name="PATTERN" value="com.rusefi.ldmp.*" />

View File

@ -93,8 +93,7 @@ public class ConfigField {
if (tokens.length > 1) { if (tokens.length > 1) {
String scale = tokens[1].trim(); String scale = tokens[1].trim();
if (!hasAutoscale && !scale.trim().equals("1")) { if (!hasAutoscale && !scale.trim().equals("1")) {
System.out.println("GRRRRRRRRRRRRRRRR " + "Unexpected scale of " + scale + " without autoscale on " + this); throw new IllegalStateException("Unexpected scale of " + scale + " without autoscale on " + this);
// throw new IllegalStateException("Unexpected scale of " + scale + " without autoscale on " + this);
} }
} }
} }

View File

@ -346,7 +346,7 @@ public class ReaderState {
} }
public void addPrepend(String fileName) { public void addPrepend(String fileName) {
if (fileName.isEmpty()) { if (fileName == null || fileName.isEmpty()) {
// see UsagesReader use-case with dynamic prepend usage // see UsagesReader use-case with dynamic prepend usage
return; return;
} }

View File

@ -10,6 +10,7 @@ import java.io.File;
import java.io.FileReader; import java.io.FileReader;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -69,7 +70,7 @@ public class UsagesReader {
} }
interface EntryHandler { interface EntryHandler {
void onEntry(String name, List elements) throws IOException; void onEntry(String name, String javaName, String folder, String prepend, boolean withCDefines, String[] outputNames) throws IOException;
} }
private int handleYaml(Map<String, Object> data, EntryHandler _handler) throws IOException { private int handleYaml(Map<String, Object> data, EntryHandler _handler) throws IOException {
@ -81,32 +82,13 @@ public class UsagesReader {
ConfigurationConsumer dataLogConsumer = new DataLogConsumer(tsOutputsDestination + File.separator + "generated/data_logs.ini"); ConfigurationConsumer dataLogConsumer = new DataLogConsumer(tsOutputsDestination + File.separator + "generated/data_logs.ini");
EntryHandler handler = new EntryHandler() { EntryHandler handler = new EntryHandler() {
@Override @Override
public void onEntry(String name, List elements) throws IOException { public void onEntry(String name, String javaName, String folder, String prepend, boolean withCDefines, String[] outputNames) throws IOException {
String javaName = (String) elements.get(0); // TODO: use outputNames
String folder = (String) elements.get(1);
int startingPosition = javaSensorsConsumer.sensorTsPosition; int startingPosition = javaSensorsConsumer.sensorTsPosition;
log.info("Starting " + name + " at " + startingPosition); log.info("Starting " + name + " at " + startingPosition);
boolean withCDefines = false;
String prepend = "";
for (int i = 2; i < elements.size(); i++) {
String keyValue = (String) elements.get(i);
String[] pair = keyValue.trim().split("=");
String key = pair[0];
String value = pair[1];
if (key.equals(ConfigDefinition.KEY_WITH_C_DEFINES)) {
withCDefines = Boolean.parseBoolean(value);
} else if (key.equals(ConfigDefinition.KEY_PREPEND)) {
prepend = value;
}
}
// String macroName = elements.size() > 2 ? ((String)elements.get(2)).trim() : "";
ReaderState state = new ReaderState(); ReaderState state = new ReaderState();
state.setDefinitionInputFile(folder + File.separator + name + ".txt"); state.setDefinitionInputFile(folder + File.separator + name + ".txt");
state.withC_Defines = withCDefines; state.withC_Defines = withCDefines;
@ -131,17 +113,34 @@ public class UsagesReader {
} }
}; };
LinkedHashMap<?, ?> liveDocs = (LinkedHashMap) data.get("Usages"); ArrayList<LinkedHashMap> liveDocs = (ArrayList<LinkedHashMap>)data.get("Usages");
fragmentsContent.append("static const FragmentEntry fragments[] = {\n"); fragmentsContent.append("static const FragmentEntry fragments[] = {\n");
for (Map.Entry entry : liveDocs.entrySet()) { for (LinkedHashMap entry : liveDocs) {
String name = (String) entry.getKey(); String name = (String)entry.get("name");
System.out.println(" " + name); String java = (String)entry.get("java");
System.out.println(" " + entry.getValue()); String folder = (String)entry.get("folder");
List elements = (List) entry.getValue(); String prepend = (String)entry.get("prepend");
Boolean withCDefines = (Boolean)entry.get("withCDefines");
// Defaults to false if not specified
withCDefines = withCDefines != null && withCDefines;
handler.onEntry(name, elements); Object outputNames = entry.get("output_name");
String[] outputNamesArr;
if (outputNames == null) {
outputNamesArr = new String[0];
} else if (outputNames instanceof String) {
outputNamesArr = new String[1];
outputNamesArr[0] = (String)outputNames;
} else {
ArrayList<String> nameList = (ArrayList<String>)outputNames;
outputNamesArr = new String[nameList.size()];
nameList.toArray(outputNamesArr);
}
handler.onEntry(name, java, folder, prepend, withCDefines, outputNamesArr);
String enumName = "LDS_" + name; String enumName = "LDS_" + name;
String type = name + "_s"; // convention String type = name + "_s"; // convention