ETB using tle7209 #746
This commit is contained in:
parent
c9de564c03
commit
379c912b0c
|
@ -16,6 +16,7 @@
|
|||
#include "custom_engine.h"
|
||||
#include "allsensors.h"
|
||||
#include "engine_math.h"
|
||||
#include "fsio_impl.h"
|
||||
|
||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
#include "can_hw.h"
|
||||
|
@ -335,6 +336,31 @@ void setTle8888TestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
// PB3 is nicely both SWO and SPI1 SCK so logic analyzer could be used on SWO header
|
||||
boardConfiguration->is_enabled_spi_1 = true;
|
||||
engineConfiguration->debugMode = DBG_TLE8888;
|
||||
|
||||
// ETB #1 top one - closer to 121 connector
|
||||
// DIS PF12
|
||||
// EN PF13
|
||||
// IN1 PF15
|
||||
// IN2 PF14
|
||||
// SF PF11
|
||||
setFsio(12, GPIOF_12, "0" PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
setFsio(14, GPIOF_13, "1" PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
CONFIG(etb1_use_two_wires) = true;
|
||||
CONFIGB(etb1.directionPin1) = GPIOF_15;
|
||||
CONFIGB(etb1.directionPin2) = GPIOF_14;
|
||||
|
||||
// ETB #2
|
||||
// DIS PE5
|
||||
// EN PE6
|
||||
// IN1 PE2
|
||||
// IN2 PE4
|
||||
// SF PE3
|
||||
setFsio(13, GPIOE_5, "0" PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
setFsio(15, GPIOE_6, "1" PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
CONFIG(etb2_use_two_wires) = true;
|
||||
CONFIG(etb2.directionPin1) = GPIOE_2;
|
||||
CONFIG(etb2.directionPin2) = GPIOE_4;
|
||||
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ENGINES_CUSTOM_ENGINE_CPP_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Apr 11 21:45:26 EDT 2019
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Apr 11 23:16:46 EDT 2019
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -404,6 +404,7 @@ typedef struct {
|
|||
*/
|
||||
brain_pin_e controlPin1;
|
||||
/**
|
||||
* currently UNUSED
|
||||
* offset 3
|
||||
*/
|
||||
brain_pin_e controlPin2;
|
||||
|
@ -1005,10 +1006,10 @@ typedef struct {
|
|||
bool cj125isLsu49 : 1;
|
||||
/**
|
||||
offset 76 bit 12 */
|
||||
bool issue_294_12 : 1;
|
||||
bool etb1_use_two_wires : 1;
|
||||
/**
|
||||
offset 76 bit 13 */
|
||||
bool issue_294_13 : 1;
|
||||
bool etb2_use_two_wires : 1;
|
||||
/**
|
||||
offset 76 bit 14 */
|
||||
bool issue_294_14 : 1;
|
||||
|
@ -2647,4 +2648,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Apr 11 21:45:26 EDT 2019
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Apr 11 23:16:46 EDT 2019
|
||||
|
|
|
@ -481,6 +481,8 @@
|
|||
#define etb1_directionPin2_offset_hex 2a9
|
||||
#define etb1_offset 680
|
||||
#define etb1_offset_hex 2a8
|
||||
#define etb1_use_two_wires_offset 76
|
||||
#define etb1_use_two_wires_offset_hex 4c
|
||||
#define etb2_controlPin1_offset 3990
|
||||
#define etb2_controlPin1_offset_hex f96
|
||||
#define etb2_controlPin2_offset 3991
|
||||
|
@ -491,6 +493,8 @@
|
|||
#define etb2_directionPin2_offset_hex f95
|
||||
#define etb2_offset 3988
|
||||
#define etb2_offset_hex f94
|
||||
#define etb2_use_two_wires_offset 76
|
||||
#define etb2_use_two_wires_offset_hex 4c
|
||||
#define ETB_BIAS_CURVE_LENGTH 8
|
||||
#define etb_dFactor_offset 1764
|
||||
#define etb_dFactor_offset_hex 6e4
|
||||
|
@ -1218,10 +1222,6 @@
|
|||
#define isPrintTriggerSynchDetails_offset_hex 5c4
|
||||
#define isSdCardEnabled_offset 744
|
||||
#define isSdCardEnabled_offset_hex 2e8
|
||||
#define issue_294_12_offset 76
|
||||
#define issue_294_12_offset_hex 4c
|
||||
#define issue_294_13_offset 76
|
||||
#define issue_294_13_offset_hex 4c
|
||||
#define issue_294_14_offset 76
|
||||
#define issue_294_14_offset_hex 4c
|
||||
#define issue_294_15_offset 76
|
||||
|
|
|
@ -810,6 +810,6 @@ int getRusEfiVersion(void) {
|
|||
if (initBootloader() != 0)
|
||||
return 123;
|
||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||
return 20190409;
|
||||
return 20190410;
|
||||
}
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
|
|
@ -276,8 +276,8 @@ bit isVerboseAuxPid4;
|
|||
bit useBiQuadAnalogFiltering;
|
||||
bit cj125isUaDivided;
|
||||
bit cj125isLsu49;
|
||||
bit issue_294_12;
|
||||
bit issue_294_13;
|
||||
bit etb1_use_two_wires;
|
||||
bit etb2_use_two_wires;
|
||||
bit issue_294_14;
|
||||
bit issue_294_15;
|
||||
bit issue_294_16;
|
||||
|
@ -467,7 +467,7 @@ struct etb_io
|
|||
brain_pin_e directionPin1;
|
||||
brain_pin_e directionPin2;
|
||||
brain_pin_e controlPin1;
|
||||
brain_pin_e controlPin2;
|
||||
brain_pin_e controlPin2;currently UNUSED
|
||||
end_struct
|
||||
|
||||
struct_no_prefix board_configuration_s
|
||||
|
|
|
@ -68,7 +68,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Apr 11 22:14:18 EDT 2019
|
||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Apr 11 23:16:46 EDT 2019
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
@ -89,8 +89,8 @@ page = 1
|
|||
useBiQuadAnalogFiltering= bits, U32, 76, [9:9], "false", "true"
|
||||
cj125isUaDivided = bits, U32, 76, [10:10], "false", "true"
|
||||
cj125isLsu49 = bits, U32, 76, [11:11], "false", "true"
|
||||
issue_294_12 = bits, U32, 76, [12:12], "false", "true"
|
||||
issue_294_13 = bits, U32, 76, [13:13], "false", "true"
|
||||
etb1_use_two_wires = bits, U32, 76, [12:12], "false", "true"
|
||||
etb2_use_two_wires = bits, U32, 76, [13:13], "false", "true"
|
||||
issue_294_14 = bits, U32, 76, [14:14], "false", "true"
|
||||
issue_294_15 = bits, U32, 76, [15:15], "false", "true"
|
||||
issue_294_16 = bits, U32, 76, [16:16], "false", "true"
|
||||
|
@ -2454,11 +2454,9 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
|
|||
field = "ETB#1 Dir #1", etb1_directionPin1
|
||||
field = "ETB#1 Dir #2", etb1_directionPin2
|
||||
field = "ETB#1 Control #1", etb1_controlPin1
|
||||
field = "ETB#1 Control #2", etb1_controlPin2
|
||||
field = "ETB#2 Dir #1", etb2_directionPin1
|
||||
field = "ETB#2 Dir #2", etb2_directionPin2
|
||||
field = "ETB#2 Control #1", etb2_controlPin1
|
||||
field = "ETB#2 Control #2", etb2_controlPin2
|
||||
field = "ETB#2 Control #1", etb2_controlPin1
|
||||
field = "SD CS Pin", sdCardCsPin
|
||||
field = "Check Engine Pin", malfunctionIndicatorPin
|
||||
field = "Check Engine Pin Mode", malfunctionIndicatorPinMode
|
||||
|
@ -3221,14 +3219,14 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
|
|||
field = "Throttle Pedal Up", throttlePedalUpVoltage
|
||||
field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage
|
||||
field = "PWM Frequency", etbFreq, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#1 Direction #1", etb1_directionPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#1 Direction #2", etb1_directionPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#1 Control #1", etb1_controlPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#1 Control #2", etb1_controlPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#2 Direction #1", etb2_directionPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#2 Direction #2", etb2_directionPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#2 Control #1", etb2_controlPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#2 Control #2", etb2_controlPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "No1 Direction #1", etb1_directionPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "No1 Direction #2", etb1_directionPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "Two-wire mode", etb1_use_two_wires, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "No1 Control #1", etb1_controlPin1, {throttlePedalPositionAdcChannel != 16 && etb1_use_two_wires == 0}
|
||||
field = "No2 Direction #1", etb2_directionPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "No2 Direction #2", etb2_directionPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "Two-wire mode", etb2_use_two_wires, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "No2 Control #1", etb2_controlPin1, {throttlePedalPositionAdcChannel != 16 && etb2_use_two_wires == 0}
|
||||
field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16}
|
||||
|
|
|
@ -1546,11 +1546,9 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
|
|||
field = "ETB#1 Dir #1", etb1_directionPin1
|
||||
field = "ETB#1 Dir #2", etb1_directionPin2
|
||||
field = "ETB#1 Control #1", etb1_controlPin1
|
||||
field = "ETB#1 Control #2", etb1_controlPin2
|
||||
field = "ETB#2 Dir #1", etb2_directionPin1
|
||||
field = "ETB#2 Dir #2", etb2_directionPin2
|
||||
field = "ETB#2 Control #1", etb2_controlPin1
|
||||
field = "ETB#2 Control #2", etb2_controlPin2
|
||||
field = "ETB#2 Control #1", etb2_controlPin1
|
||||
field = "SD CS Pin", sdCardCsPin
|
||||
field = "Check Engine Pin", malfunctionIndicatorPin
|
||||
field = "Check Engine Pin Mode", malfunctionIndicatorPinMode
|
||||
|
@ -2313,14 +2311,14 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
|
|||
field = "Throttle Pedal Up", throttlePedalUpVoltage
|
||||
field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage
|
||||
field = "PWM Frequency", etbFreq, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#1 Direction #1", etb1_directionPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#1 Direction #2", etb1_directionPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#1 Control #1", etb1_controlPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#1 Control #2", etb1_controlPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#2 Direction #1", etb2_directionPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#2 Direction #2", etb2_directionPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#2 Control #1", etb2_controlPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "#2 Control #2", etb2_controlPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "No1 Direction #1", etb1_directionPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "No1 Direction #2", etb1_directionPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "Two-wire mode", etb1_use_two_wires, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "No1 Control #1", etb1_controlPin1, {throttlePedalPositionAdcChannel != 16 && etb1_use_two_wires == 0}
|
||||
field = "No2 Direction #1", etb2_directionPin1, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "No2 Direction #2", etb2_directionPin2, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "Two-wire mode", etb2_use_two_wires, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "No2 Control #1", etb2_controlPin1, {throttlePedalPositionAdcChannel != 16 && etb2_use_two_wires == 0}
|
||||
field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16}
|
||||
field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Apr 11 21:45:26 EDT 2019
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Apr 11 23:16:46 EDT 2019
|
||||
public class Fields {
|
||||
public static final int accelerometerSpiDevice_offset = 2736;
|
||||
public static final int acCutoffHighRpm_offset = 1498;
|
||||
|
@ -303,11 +303,13 @@ public class Fields {
|
|||
public static final int etb1_directionPin1_offset = 680;
|
||||
public static final int etb1_directionPin2_offset = 681;
|
||||
public static final int etb1_offset = 680;
|
||||
public static final int etb1_use_two_wires_offset = 76;
|
||||
public static final int etb2_controlPin1_offset = 3990;
|
||||
public static final int etb2_controlPin2_offset = 3991;
|
||||
public static final int etb2_directionPin1_offset = 3988;
|
||||
public static final int etb2_directionPin2_offset = 3989;
|
||||
public static final int etb2_offset = 3988;
|
||||
public static final int etb2_use_two_wires_offset = 76;
|
||||
public static final int ETB_BIAS_CURVE_LENGTH = 8;
|
||||
public static final int etb_dFactor_offset = 1764;
|
||||
public static final int etb_iFactor_offset = 1760;
|
||||
|
@ -804,8 +806,6 @@ public class Fields {
|
|||
public static final int isMapAveragingEnabled_offset = 1476;
|
||||
public static final int isPrintTriggerSynchDetails_offset = 1476;
|
||||
public static final int isSdCardEnabled_offset = 744;
|
||||
public static final int issue_294_12_offset = 76;
|
||||
public static final int issue_294_13_offset = 76;
|
||||
public static final int issue_294_14_offset = 76;
|
||||
public static final int issue_294_15_offset = 76;
|
||||
public static final int issue_294_16_offset = 76;
|
||||
|
@ -1220,8 +1220,8 @@ public class Fields {
|
|||
public static final Field USEBIQUADANALOGFILTERING = Field.create("USEBIQUADANALOGFILTERING", 76, FieldType.BIT, 9);
|
||||
public static final Field CJ125ISUADIVIDED = Field.create("CJ125ISUADIVIDED", 76, FieldType.BIT, 10);
|
||||
public static final Field CJ125ISLSU49 = Field.create("CJ125ISLSU49", 76, FieldType.BIT, 11);
|
||||
public static final Field ISSUE_294_12 = Field.create("ISSUE_294_12", 76, FieldType.BIT, 12);
|
||||
public static final Field ISSUE_294_13 = Field.create("ISSUE_294_13", 76, FieldType.BIT, 13);
|
||||
public static final Field ETB1_USE_TWO_WIRES = Field.create("ETB1_USE_TWO_WIRES", 76, FieldType.BIT, 12);
|
||||
public static final Field ETB2_USE_TWO_WIRES = Field.create("ETB2_USE_TWO_WIRES", 76, FieldType.BIT, 13);
|
||||
public static final Field ISSUE_294_14 = Field.create("ISSUE_294_14", 76, FieldType.BIT, 14);
|
||||
public static final Field ISSUE_294_15 = Field.create("ISSUE_294_15", 76, FieldType.BIT, 15);
|
||||
public static final Field ISSUE_294_16 = Field.create("ISSUE_294_16", 76, FieldType.BIT, 16);
|
||||
|
|
Loading…
Reference in New Issue