Merge branch 'master' into trigger_emulator_cam
This commit is contained in:
commit
191cbd29d6
|
@ -102,9 +102,7 @@ jobs:
|
|||
prometheus_405,
|
||||
prometheus_469,
|
||||
proteus_f4,
|
||||
proteus_f4_hardware_QC_special_build,
|
||||
proteus_f7,
|
||||
proteus_f7_hardware_QC_special_build,
|
||||
proteus_h7,
|
||||
stm32f429_nucleo,
|
||||
stm32f767_nucleo,
|
||||
|
@ -117,6 +115,7 @@ jobs:
|
|||
48way,
|
||||
atlas,
|
||||
tdg-pdm8,
|
||||
at_start_f435,
|
||||
]
|
||||
|
||||
include:
|
||||
|
@ -313,10 +312,6 @@ jobs:
|
|||
ini-file: rusefi_proteus_f4.ini
|
||||
skip-rate: 80
|
||||
|
||||
- build-target: proteus_f4_hardware_QC_special_build
|
||||
folder: config/boards/proteus
|
||||
ini-file: rusefi_proteus_f4.ini
|
||||
|
||||
- build-target: proteus_f7
|
||||
folder: config/boards/proteus
|
||||
ini-file: rusefi_proteus_f7.ini
|
||||
|
@ -326,11 +321,6 @@ jobs:
|
|||
# ini-file: rusefi_proteus_f7.ini
|
||||
# skip-rate: 80
|
||||
|
||||
- build-target: proteus_f7_hardware_QC_special_build
|
||||
folder: config/boards/proteus
|
||||
ini-file: rusefi_proteus_f7.ini
|
||||
skip-rate: 0
|
||||
|
||||
- build-target: proteus_h7
|
||||
folder: config/boards/proteus
|
||||
ini-file: rusefi_proteus_h7.ini
|
||||
|
@ -395,6 +385,11 @@ jobs:
|
|||
ini-file: rusefi_tdg-pdm8.ini
|
||||
skip-rate: 95
|
||||
|
||||
- build-target: at_start_f435
|
||||
folder: config/boards/at_start_f435
|
||||
ini-file: rusefi_at_start_f435.ini
|
||||
skip-rate: 80
|
||||
|
||||
steps:
|
||||
- name: Check branch name
|
||||
if: ${{ contains(github.ref_name, '.') }}
|
||||
|
|
|
@ -20,11 +20,6 @@ jobs:
|
|||
git submodule update --init --depth=1 firmware/controllers/can/wideband_firmware
|
||||
git submodule update --init --depth=1 java_console/luaformatter
|
||||
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '11'
|
||||
|
||||
- name: Print GCC version
|
||||
working-directory: .
|
||||
run: gcc -v
|
||||
|
@ -34,6 +29,11 @@ jobs:
|
|||
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install gcc-multilib g++-multilib mtools dosfstools zip
|
||||
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '11'
|
||||
|
||||
- name: Code generation tools
|
||||
working-directory: ./java_tools
|
||||
run: ./gradlew :config_definition:shadowJar
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Reference: firmware/setup_linux_environment.sh
|
||||
|
||||
# Update package lists
|
||||
sudo apt-get update -y
|
||||
|
||||
# install dependencies
|
||||
sudo apt-get install -y build-essential gcc gdb gcc-multilib g++-multilib make openjdk-8-jdk-headless ant mtools zip xxd libncurses5 libncursesw5
|
||||
|
||||
# delete any old tools, create a new folder, and go there
|
||||
rm -rf ~/.rusefi-tools
|
||||
mkdir ~/.rusefi-tools
|
||||
dir=$(realpath firmware)
|
||||
cd ~/.rusefi-tools
|
||||
|
||||
# provide GCC arm-none-eabi toolchain
|
||||
${dir}/provide_gcc.sh
|
||||
|
||||
# Add the compiler to your path
|
||||
export PATH=$HOME/.rusefi-tools/gcc-arm-none-eabi/bin:$PATH
|
||||
|
||||
cd ${dir}
|
||||
make -j$(nproc)
|
|
@ -0,0 +1,144 @@
|
|||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "master" ]
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
pull_request:
|
||||
branches: '*'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners
|
||||
# Consider using larger runners for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-20.04' }}
|
||||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
|
||||
# Use only 'java' to analyze code written in Java, Kotlin or both
|
||||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install mtools
|
||||
run: |
|
||||
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install mtools dosfstools zip
|
||||
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '11'
|
||||
|
||||
- name: Code generation tools
|
||||
working-directory: ./java_tools
|
||||
run: ./gradlew :config_definition:shadowJar
|
||||
|
||||
- name: Generate Configs, Enums & Live Documentation
|
||||
working-directory: ./firmware/
|
||||
run: ./gen_default_everything.sh
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
queries: security-and-quality
|
||||
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
#- name: Autobuild
|
||||
# uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||
|
||||
- run: |
|
||||
./.github/workflows/codeql-buildscript.sh
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
upload: false
|
||||
id: step1
|
||||
|
||||
# Filter out rules with low severity or high false positve rate
|
||||
# Also filter out warnings in third-party code
|
||||
- name: Filter out unwanted errors and warnings
|
||||
uses: advanced-security/filter-sarif@v1
|
||||
with:
|
||||
patterns: |
|
||||
-**:cpp/path-injection
|
||||
-**:cpp/world-writable-file-creation
|
||||
-**:cpp/poorly-documented-function
|
||||
-**:cpp/potentially-dangerous-function
|
||||
-**:cpp/use-of-goto
|
||||
-**:cpp/integer-multiplication-cast-to-long
|
||||
-**:cpp/comparison-with-wider-type
|
||||
-**:cpp/leap-year/*
|
||||
-**:cpp/ambiguously-signed-bit-field
|
||||
-**:cpp/suspicious-pointer-scaling
|
||||
-**:cpp/suspicious-pointer-scaling-void
|
||||
-**:cpp/unsigned-comparison-zero
|
||||
-**/cmake*/Modules/**
|
||||
input: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
|
||||
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
|
||||
|
||||
- name: Upload CodeQL results to code scanning
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
with:
|
||||
sarif_file: ${{ steps.step1.outputs.sarif-output }}
|
||||
category: "/language:${{matrix.language}}"
|
||||
|
||||
- name: Upload CodeQL results as an artifact
|
||||
if: success() || failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: codeql-results
|
||||
path: ${{ steps.step1.outputs.sarif-output }}
|
||||
retention-days: 5
|
||||
|
||||
- name: Fail if an error is found
|
||||
run: |
|
||||
./.github/workflows/fail_on_error.py \
|
||||
${{ steps.step1.outputs.sarif-output }}/cpp.sarif
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
import sys
|
||||
|
||||
# Return whether SARIF file contains error-level results
|
||||
def codeql_sarif_contain_error(filename):
|
||||
with open(filename, 'r') as f:
|
||||
s = json.load(f)
|
||||
|
||||
for run in s.get('runs', []):
|
||||
rules_metadata = run['tool']['driver']['rules']
|
||||
if not rules_metadata:
|
||||
rules_metadata = run['tool']['extensions'][0]['rules']
|
||||
|
||||
for res in run.get('results', []):
|
||||
if 'ruleIndex' in res:
|
||||
rule_index = res['ruleIndex']
|
||||
elif 'rule' in res and 'index' in res['rule']:
|
||||
rule_index = res['rule']['index']
|
||||
else:
|
||||
continue
|
||||
try:
|
||||
rule_level = rules_metadata[rule_index]['defaultConfiguration']['level']
|
||||
except IndexError as e:
|
||||
print(e, rule_index, len(rules_metadata))
|
||||
else:
|
||||
if rule_level == 'error':
|
||||
return True
|
||||
return False
|
||||
|
||||
if __name__ == "__main__":
|
||||
if codeql_sarif_contain_error(sys.argv[1]):
|
||||
sys.exit(1)
|
|
@ -76,6 +76,12 @@ jobs:
|
|||
- name: OpenOCD wipe & flash STM32
|
||||
run: .github/workflows/hw-ci/openocd_wipe_and_flash.sh ${{matrix.openocd-script}}
|
||||
|
||||
- name: Upload build bin artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: rusefi_hw-ci-${{matrix.build-target}}.bin
|
||||
path: ./firmware/deliver/rusefi*.bin
|
||||
|
||||
- name: Set EXTRA env
|
||||
run: |
|
||||
echo "HARDWARE_CI_SERIAL_DEVICE=${{matrix.serial-device}}" >> $GITHUB_ENV
|
||||
|
|
|
@ -30,17 +30,19 @@ Release template (copy/paste this for new release):
|
|||
|
||||
### Breaking Changes
|
||||
- "acIdleRpmBump" renamed to "acIdleRpmTarget", and changed the way of RPM rise needed for proper A/C operation from added to absolute target #5628
|
||||
- After Cranking Enrichment changed from fixed value to table, it can help with some engines that want lots of fuel on cold, but don't run too well with big enrichment on hot
|
||||
- After Cranking Enrichment changed from fixed value to table, it can help with some engines that want lots of fuel on cold, but don't run too well with big enrichment on hot #5632
|
||||
|
||||
### Added
|
||||
- DAC with Lua #5601
|
||||
- TunerStudio cacerts fix script #5536
|
||||
- Idle Timing Control - Soft Entry mechanism, in case of aggresive PID tuning this can help when engine enters close loop idle
|
||||
- Idle Timing Control - I factor configurable now
|
||||
- Idle Timing Control - Soft Entry mechanism, in case of aggressive PID tuning this can help when engine enters close loop idle
|
||||
- Idle Timing Control - I factor configurable now #5635
|
||||
- Make TPS/PPS split threshold configurable #5620
|
||||
|
||||
### Fixed
|
||||
- Changing idle stepper settings causes kernel panic
|
||||
- Data log channel "Fuel: Injection timing SOI" indicates correct values
|
||||
- Flex sensor input
|
||||
|
||||
## October 2023 "Day 591"
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9ac21ccdd9bd6a315e4de96d6b488a65dd84d362
|
||||
Subproject commit 12889f85302c4bc655cbc5e362cefbcdc623b4f7
|
|
@ -47,15 +47,6 @@ ifeq ($(DEBUG_LEVEL_OPT),)
|
|||
# DEBUG_LEVEL_OPT += -DEFI_LUA=FALSE
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(CCACHE_DIR),)
|
||||
$(info No CCACHE_DIR)
|
||||
else
|
||||
$(info CCACHE_DIR is ${CCACHE_DIR})
|
||||
CCPREFIX=ccache
|
||||
endif
|
||||
|
||||
|
||||
# Compiler options here.
|
||||
# yes we have two kinds of EXTRA_*PARAMS so that we can define those in two different places independently
|
||||
#
|
||||
|
@ -83,6 +74,8 @@ endif
|
|||
# Hellen is one of the boards which cares
|
||||
USE_CPPOPT += -Wno-error=tautological-compare
|
||||
|
||||
USE_CPPOPT += $(RUSEFI_CPPOPT)
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
ifeq ($(USE_LINK_GC),)
|
||||
USE_LINK_GC = yes
|
||||
|
@ -319,8 +312,8 @@ ifeq ($(CROSS_COMPILE),)
|
|||
else
|
||||
TRGT = $(CROSS_COMPILE)
|
||||
endif
|
||||
CC = $(CCPREFIX) $(TRGT)gcc
|
||||
CPPC = $(CCPREFIX) $(TRGT)g++
|
||||
CC = $(TRGT)gcc
|
||||
CPPC = $(TRGT)g++
|
||||
# Enable loading with g++ only if you need C++ runtime support.
|
||||
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
||||
# runtime support makes code size explode.
|
||||
|
|
|
@ -281,8 +281,8 @@ ifeq ($(CROSS_COMPILE),)
|
|||
else
|
||||
TRGT = $(CROSS_COMPILE)
|
||||
endif
|
||||
CC = $(CCPREFIX) $(TRGT)gcc
|
||||
CPPC = $(CCPREFIX) $(TRGT)g++
|
||||
CC = $(TRGT)gcc
|
||||
CPPC = $(TRGT)g++
|
||||
# Enable loading with g++ only if you need C++ runtime support.
|
||||
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
||||
# runtime support makes code size explode.
|
||||
|
|
|
@ -1,17 +1,25 @@
|
|||
# List of all the board related files.
|
||||
BOARDCPPSRC = $(BOARD_DIR)/board_configuration.cpp
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::D13
|
||||
DDEFS += -DLED_PIN_MODE=OM_INVERTED
|
||||
|
||||
# USB OTG1 connector:
|
||||
DDEFS += -DEFI_USB_SERIAL_DM=Gpio::A11
|
||||
DDEFS += -DEFI_USB_SERIAL_DP=Gpio::A12
|
||||
DDEFS += -DEFI_USB_AF=10
|
||||
|
||||
IS_AT32F435 = yes
|
||||
|
||||
# Stock board.c from ChibiOS
|
||||
BOARD_C = $(CHIBIOS)/os/hal/boards/AT_START_F435/board.c
|
||||
# Stock board.h from ChibiOS
|
||||
BOARDINC = $(CHIBIOS)/os/hal/boards/AT_START_F435/
|
||||
|
||||
# Configuration directorys
|
||||
CONFDIR = $(PROJECT_DIR)/hw_layer/ports/at32/at32f4/cfg
|
||||
|
||||
DDEFS += -DFIRMWARE_ID=\"at_start_f435\"
|
||||
DDEFS += -DDEFAULT_ENGINE_TYPE=MINIMAL_PINS
|
||||
DDEFS += -DDEFAULT_ENGINE_TYPE=engine_type_e::MINIMAL_PINS
|
||||
DDEFS += -DSHORT_BOARD_NAME=at_start_f435 -DSTATIC_BOARD_ID=STATIC_BOARD_ID_AT_START_F435
|
||||
|
||||
DDEFS += -DEFI_BACKUP_SRAM=FALSE
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#include "pch.h"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
// PD13 is error LED, configured in board.mk
|
||||
engineConfiguration->communicationLedPin = Gpio::D14;
|
||||
engineConfiguration->runningLedPin = Gpio::D15;
|
||||
|
||||
// Board only has 3 LEDs
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
Gpio getCommsLedPin() {
|
||||
return Gpio::D15; /* LED4 - green */
|
||||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::D14; /* LED3 - yellow */
|
||||
}
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
|
||||
See https://rusefi.com/forum/viewtopic.php?f=5&t=2636 for flashing instructions
|
|
@ -13,6 +13,7 @@ DDEFS += -DHW_ATLAS=1
|
|||
|
||||
# Atlas needs networking library
|
||||
LWIP = yes
|
||||
ALLOW_SHADOW = yes
|
||||
DDEFS += -DEFI_ETHERNET=TRUE
|
||||
|
||||
DDEFS += -DSHORT_BOARD_NAME=atlas -DSTATIC_BOARD_ID=STATIC_BOARD_ID_ATLAS
|
||||
|
|
|
@ -17,6 +17,10 @@ board_id_t getBoardId() {
|
|||
// a way to test harness patch cord
|
||||
return STATIC_BOARD_ID_PROTEUS_CANAM;
|
||||
}
|
||||
if (engineConfiguration->engineType == engine_type_e::PROTEUS_HARLEY) {
|
||||
// a way to test harness patch cord
|
||||
return STATIC_BOARD_ID_PROTEUS_HARLEY;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HW_HELLEN
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Thu Oct 26 02:46:38 UTC 2023
|
||||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Tue Oct 31 02:27:55 UTC 2023
|
||||
// by class com.rusefi.output.CHeaderConsumer
|
||||
// begin
|
||||
#pragma once
|
||||
|
@ -1137,11 +1137,11 @@ struct engine_configuration_s {
|
|||
*/
|
||||
adc_channel_e throttlePedalPositionAdcChannel;
|
||||
/**
|
||||
* need 4 byte alignment
|
||||
units
|
||||
* TPS/PPS error threshold
|
||||
%
|
||||
* offset 521
|
||||
*/
|
||||
uint8_t alignmentFill_at_521[1];
|
||||
scaled_channel<uint8_t, 10, 1> etbSplit;
|
||||
/**
|
||||
* offset 522
|
||||
*/
|
||||
|
@ -5372,4 +5372,4 @@ struct persistent_config_s {
|
|||
static_assert(sizeof(persistent_config_s) == 23880);
|
||||
|
||||
// end
|
||||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Thu Oct 26 02:46:38 UTC 2023
|
||||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Tue Oct 31 02:27:55 UTC 2023
|
||||
|
|
|
@ -67,6 +67,8 @@
|
|||
#define bench_mode_e_BENCH_VVT1_VALVE 17
|
||||
#define bench_mode_e_BENCH_VVT2_VALVE 18
|
||||
#define bench_mode_e_BENCH_VVT3_VALVE 19
|
||||
#define bench_mode_e_HD_ACR 28
|
||||
#define bench_mode_e_HD_ACR2 29
|
||||
#define BENCH_STARTER_DURATION 4000
|
||||
#define BENCH_VVT_DURATION 300
|
||||
#define blend_table_s_size 188
|
||||
|
@ -481,6 +483,7 @@
|
|||
#define GAUGE_NAME_FUEL_PRESSURE_LOW "Fuel pressure (low)"
|
||||
#define GAUGE_NAME_FUEL_PRESSURE_LOW_UNITS "kPa"
|
||||
#define GAUGE_NAME_FUEL_RUNNING "Fuel: running"
|
||||
#define GAUGE_NAME_FUEL_TEMPERATURE "Fuel Temperature"
|
||||
#define GAUGE_NAME_FUEL_TPS_EXTRA "Fuel: TPS AE add fuel ms"
|
||||
#define GAUGE_NAME_FUEL_TPS_ROC "fuel: TPS change"
|
||||
#define GAUGE_NAME_FUEL_TRIM "Fuel: fuel trim"
|
||||
|
@ -715,6 +718,7 @@
|
|||
#define PACK_MULT_AFR 1000
|
||||
#define PACK_MULT_AFR_CFG 10
|
||||
#define PACK_MULT_ANGLE 50
|
||||
#define PACK_MULT_FLEX 2
|
||||
#define PACK_MULT_FUEL_FLOW 200
|
||||
#define PACK_MULT_FUEL_MASS 100
|
||||
#define PACK_MULT_HIGH_PRESSURE 10
|
||||
|
@ -732,16 +736,6 @@
|
|||
#define PERCENT_TRIM_BYTE_PACKING_DIV 0.02
|
||||
#define persistent_config_s_size 23880
|
||||
#define pid_s_size 20
|
||||
#define PidAutoTune_AutoTunerState_AUTOTUNER_OFF 0
|
||||
#define PidAutoTune_AutoTunerState_CONVERGED 16
|
||||
#define PidAutoTune_AutoTunerState_FAILED 128
|
||||
#define PidAutoTune_AutoTunerState_RELAY_STEP_DOWN 8
|
||||
#define PidAutoTune_AutoTunerState_RELAY_STEP_UP 4
|
||||
#define PidAutoTune_AutoTunerState_STEADY_STATE_AFTER_STEP_UP 2
|
||||
#define PidAutoTune_AutoTunerState_STEADY_STATE_AT_BASELINE 1
|
||||
#define PidAutoTune_Peak_MAXIMUM 1
|
||||
#define PidAutoTune_Peak_MINIMUM -1
|
||||
#define PidAutoTune_Peak_NOT_A_PEAK 0
|
||||
#define pin_input_mode_e_auto_enum 0="PI_DEFAULT",2="PI_PULLDOWN",1="PI_PULLUP"
|
||||
#define pin_input_mode_e_enum "DEFAULT", "PULLUP", "PULLDOWN"
|
||||
#define pin_input_mode_e_PI_DEFAULT 0
|
||||
|
@ -755,6 +749,7 @@
|
|||
#define pin_output_mode_e_OM_OPENDRAIN 2
|
||||
#define pin_output_mode_e_OM_OPENDRAIN_INVERTED 3
|
||||
#define PRIME_CURVE_COUNT 8
|
||||
#define PROTOCOL_ACR_NAME "acr"
|
||||
#define PROTOCOL_ANALOG_CHART "analog_chart"
|
||||
#define PROTOCOL_COIL1_SHORT_NAME "c1"
|
||||
#define PROTOCOL_CRANK1 "t1"
|
||||
|
@ -816,7 +811,7 @@
|
|||
#define SentEtbType_NONE 0
|
||||
#define show_Frankenso_presets true
|
||||
#define show_test_presets true
|
||||
#define SIGNATURE_HASH 998272346
|
||||
#define SIGNATURE_HASH 1442998902
|
||||
#define SIMULATOR_TUNE_BIN_FILE_NAME "generated/simulator_tune_image.bin"
|
||||
#define spi_device_e_auto_enum 0="SPI_NONE",1="SPI_DEVICE_1",2="SPI_DEVICE_2",3="SPI_DEVICE_3",4="SPI_DEVICE_4"
|
||||
#define spi_device_e_SPI_DEVICE_1 1
|
||||
|
@ -1112,7 +1107,7 @@
|
|||
#define ts_show_vr_threshold_2 true
|
||||
#define ts_show_vr_threshold_all true
|
||||
#define ts_show_vr_threshold_pins true
|
||||
#define TS_SIGNATURE "rusEFI master.2023.10.26.cypress.998272346"
|
||||
#define TS_SIGNATURE "rusEFI master.2023.11.02.cypress.1442998902"
|
||||
#define TS_SIMULATE_CAN '>'
|
||||
#define TS_SIMULATE_CAN_char >
|
||||
#define TS_SINGLE_WRITE_COMMAND 'W'
|
||||
|
|
|
@ -151,10 +151,8 @@ void setBoardDefaultConfiguration() {
|
|||
|
||||
engineConfiguration->boardUseTempPullUp = true;
|
||||
|
||||
engineConfiguration->acSwitch = Gpio::Unassigned;
|
||||
engineConfiguration->fuelPumpPin = Gpio::H144_OUT_PWM2;
|
||||
engineConfiguration->fanPin = Gpio::H144_OUT_PWM4;
|
||||
engineConfiguration->mainRelayPin = Gpio::Unassigned;
|
||||
engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM3;
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
|
|
|
@ -26,7 +26,6 @@ ifeq ($(PROJECT_CPU),ARCH_STM32F7)
|
|||
# TODO: why do I struggle to fit into flash? compare with Proteus
|
||||
#Linker options, flash size
|
||||
USE_OPT += -Wl,--defsym=FLASH_SIZE=768k
|
||||
# -Os is bad see #5354 DEBUG_LEVEL_OPT = -Os -ggdb -g
|
||||
# TODO do we only support serial on F7 but not UART?
|
||||
DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::D6 -DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::D5
|
||||
DDEFS += -DTS_PRIMARY_UxART_PORT=SD2 -DEFI_TS_PRIMARY_IS_SERIAL=TRUE -DSTM32_SERIAL_USE_USART2=TRUE -DSTM32_UART_USE_USART2=FALSE
|
||||
|
|
|
@ -11,7 +11,8 @@ DDEFS += -DBOARD_TLE8888_COUNT=0
|
|||
DDEFS += -DFIRMWARE_ID=\"AlphaX-8chan\"
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
|
||||
DDEFS += -DADC_MUX_PIN=Gpio::B3
|
||||
# MM176_GP9
|
||||
DDEFS += -DADC_MUX_PIN=Gpio::F2
|
||||
|
||||
include $(BOARDS_DIR)/hellen/hellen-common144.mk
|
||||
|
||||
|
|
|
@ -24,10 +24,10 @@ static OutputPin alphaD4PullDown;
|
|||
//static OutputPin alphaD5PullDown;
|
||||
|
||||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||
engineConfiguration->injectionPins[2] = Gpio::H144_LS_3;
|
||||
engineConfiguration->injectionPins[3] = Gpio::H144_LS_4;
|
||||
engineConfiguration->injectionPins[0] = Gpio::MM176_INJ1;
|
||||
engineConfiguration->injectionPins[1] = Gpio::MM176_INJ2;
|
||||
engineConfiguration->injectionPins[2] = Gpio::MM176_INJ3;
|
||||
engineConfiguration->injectionPins[3] = Gpio::MM176_INJ4;
|
||||
|
||||
engineConfiguration->clutchDownPin = Gpio::Unassigned;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
|
@ -42,32 +42,32 @@ static void setupEtb() {
|
|||
// PWM - pwm control (enable high, coast low)
|
||||
// DIS - disables motor (enable low)
|
||||
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM2;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[0].directionPin1 = H144_GP1;
|
||||
// Disable pin
|
||||
engineConfiguration->etbIo[0].disablePin = H144_GP5;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[1].controlPin = H144_GP4;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[1].directionPin1 = Gpio::H144_GP3;
|
||||
// Disable pin
|
||||
engineConfiguration->etbIo[1].disablePin = Gpio::Unassigned;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
|
||||
// // PWM pin
|
||||
// engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM2;
|
||||
// // DIR pin
|
||||
// engineConfiguration->etbIo[0].directionPin1 = H144_GP1;
|
||||
// // Disable pin
|
||||
// engineConfiguration->etbIo[0].disablePin = H144_GP5;
|
||||
// // Unused
|
||||
// engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||
//
|
||||
// // PWM pin
|
||||
// engineConfiguration->etbIo[1].controlPin = H144_GP4;
|
||||
// // DIR pin
|
||||
// engineConfiguration->etbIo[1].directionPin1 = Gpio::H144_GP3;
|
||||
// // Disable pin
|
||||
// engineConfiguration->etbIo[1].disablePin = Gpio::Unassigned;
|
||||
// // Unused
|
||||
// engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
|
||||
// we only have pwm/dir, no dira/dirb
|
||||
engineConfiguration->etb_use_two_wires = false;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::H144_IGN_2;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_3;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::H144_IGN_4;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::MM176_IGN1;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::MM176_IGN2;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::MM176_IGN3;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::MM176_IGN4;
|
||||
}
|
||||
|
||||
static void setupVbatt() {
|
||||
|
@ -78,64 +78,64 @@ static void setupVbatt() {
|
|||
// 33k / 6.8k
|
||||
engineConfiguration->vbattDividerCoeff = (33 + 6.8) / 6.8; // 5.835
|
||||
|
||||
engineConfiguration->vbattAdcChannel = H144_IN_VBATT;
|
||||
engineConfiguration->vbattAdcChannel = MM176_IN_VBATT;
|
||||
|
||||
engineConfiguration->adcVcc = 3.29f;
|
||||
}
|
||||
|
||||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs, hall
|
||||
engineConfiguration->triggerInputPins[0] = H144_USB1ID;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::H144_IN_CAM;
|
||||
// engineConfiguration->triggerInputPins[0] = H144_USB1ID;
|
||||
// engineConfiguration->triggerInputPins[1] = Gpio::H144_IN_CAM;
|
||||
engineConfiguration->camInputs[0] = Gpio::Unassigned;
|
||||
|
||||
setTPS1Inputs(H144_IN_TPS, H144_IN_AUX1);
|
||||
|
||||
setPPSInputs(H144_IN_PPS, H144_IN_AUX2);
|
||||
// setTPS1Inputs(H144_IN_TPS, H144_IN_AUX1);
|
||||
//
|
||||
// setPPSInputs(H144_IN_PPS, H144_IN_AUX2);
|
||||
|
||||
// random values to have valid config
|
||||
engineConfiguration->tps1SecondaryMin = 1000;
|
||||
engineConfiguration->tps1SecondaryMax = 0;
|
||||
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_NONE;
|
||||
engineConfiguration->map.sensor.hwChannel = H144_IN_MAP2;
|
||||
// engineConfiguration->map.sensor.hwChannel = H144_IN_MAP2;
|
||||
engineConfiguration->baroSensor.type = MT_MPXH6400;
|
||||
// engineConfiguration->baroSensor.hwChannel = H144_IN_MAP3;
|
||||
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_NONE;
|
||||
|
||||
engineConfiguration->clt.adcChannel = H144_IN_CLT;
|
||||
|
||||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
// engineConfiguration->clt.adcChannel = H144_IN_CLT;
|
||||
//
|
||||
// engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
void boardInitHardware() {
|
||||
setHellenEnPin(Gpio::H144_OUT_IO3);
|
||||
setHellenEnPin(Gpio::MM176_EN_PIN);
|
||||
|
||||
alphaTempPullUp.initPin("a-temp", Gpio::H144_OUT_IO4);
|
||||
alphaCrankPPullUp.initPin("a-crank-p", Gpio::H144_OUT_IO5);
|
||||
alphaTachPullUp.initPin("a-tach", Gpio::H144_OUT_IO6);
|
||||
alpha2stepPullDown.initPin("a-2step", Gpio::H144_OUT_IO7);
|
||||
alphaCamPullDown.initPin("a-cam", Gpio::H144_OUT_IO8);
|
||||
//alphaCamVrPullUp.initPin("a-cam-vr", Gpio::H144_OUT_IO9);
|
||||
alphaD2PullDown.initPin("a-d2", H_SPI3_SCK);
|
||||
alphaD3PullDown.initPin("a-d3", H_SPI3_MISO);
|
||||
alphaD4PullDown.initPin("a-d4", H_SPI3_MOSI);
|
||||
//alphaD5PullDown.initPin("a-d5", Gpio::H144_LS_8);
|
||||
// alphaTempPullUp.initPin("a-temp", Gpio::H144_OUT_IO4);
|
||||
// alphaCrankPPullUp.initPin("a-crank-p", Gpio::H144_OUT_IO5);
|
||||
// alphaTachPullUp.initPin("a-tach", Gpio::H144_OUT_IO6);
|
||||
// alpha2stepPullDown.initPin("a-2step", Gpio::H144_OUT_IO7);
|
||||
// alphaCamPullDown.initPin("a-cam", Gpio::H144_OUT_IO8);
|
||||
// //alphaCamVrPullUp.initPin("a-cam-vr", Gpio::H144_OUT_IO9);
|
||||
// alphaD2PullDown.initPin("a-d2", H_SPI3_SCK);
|
||||
// alphaD3PullDown.initPin("a-d3", H_SPI3_MISO);
|
||||
// alphaD4PullDown.initPin("a-d4", H_SPI3_MOSI);
|
||||
// //alphaD5PullDown.initPin("a-d5", Gpio::H144_LS_8);
|
||||
boardOnConfigurationChange(nullptr);
|
||||
}
|
||||
|
||||
void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration*/) {
|
||||
alphaTachPullUp.setValue(engineConfiguration->boardUseTachPullUp);
|
||||
alphaTempPullUp.setValue(engineConfiguration->boardUseTempPullUp);
|
||||
alphaCrankPPullUp.setValue(engineConfiguration->boardUseCrankPullUp);
|
||||
alpha2stepPullDown.setValue(engineConfiguration->boardUse2stepPullDown);
|
||||
alphaCamPullDown.setValue(engineConfiguration->boardUseCamPullDown);
|
||||
//alphaCamVrPullUp.setValue(engineConfiguration->boardUseCamVrPullUp);
|
||||
|
||||
alphaD2PullDown.setValue(engineConfiguration->boardUseD2PullDown);
|
||||
alphaD3PullDown.setValue(engineConfiguration->boardUseD3PullDown);
|
||||
alphaD4PullDown.setValue(engineConfiguration->boardUseD4PullDown);
|
||||
// alphaTachPullUp.setValue(engineConfiguration->boardUseTachPullUp);
|
||||
// alphaTempPullUp.setValue(engineConfiguration->boardUseTempPullUp);
|
||||
// alphaCrankPPullUp.setValue(engineConfiguration->boardUseCrankPullUp);
|
||||
// alpha2stepPullDown.setValue(engineConfiguration->boardUse2stepPullDown);
|
||||
// alphaCamPullDown.setValue(engineConfiguration->boardUseCamPullDown);
|
||||
// //alphaCamVrPullUp.setValue(engineConfiguration->boardUseCamVrPullUp);
|
||||
//
|
||||
// alphaD2PullDown.setValue(engineConfiguration->boardUseD2PullDown);
|
||||
// alphaD3PullDown.setValue(engineConfiguration->boardUseD3PullDown);
|
||||
// alphaD4PullDown.setValue(engineConfiguration->boardUseD4PullDown);
|
||||
//alphaD5PullDown.setValue(engineConfiguration->boardUseD5PullDown);
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration
|
|||
void setBoardConfigOverrides() {
|
||||
setupVbatt();
|
||||
|
||||
setHellenSdCardSpi2();
|
||||
setHellenSdCardSpi1();
|
||||
|
||||
setDefaultHellenAtPullUps();
|
||||
|
||||
|
@ -162,15 +162,15 @@ void setBoardDefaultConfiguration() {
|
|||
setInjectorPins();
|
||||
setIgnitionPins();
|
||||
setupEtb();
|
||||
engineConfiguration->vvtPins[0] = Gpio::H144_OUT_PWM7;
|
||||
engineConfiguration->vvtPins[1] = Gpio::H144_OUT_PWM8;
|
||||
// engineConfiguration->vvtPins[0] = Gpio::H144_OUT_PWM7;
|
||||
// engineConfiguration->vvtPins[1] = Gpio::H144_OUT_PWM8;
|
||||
|
||||
engineConfiguration->boardUseTempPullUp = true;
|
||||
|
||||
engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO10;
|
||||
engineConfiguration->fanPin = Gpio::H144_OUT_IO11;
|
||||
engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO12;
|
||||
engineConfiguration->tachOutputPin = Gpio::H144_OUT_IO13;
|
||||
// engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO10;
|
||||
// engineConfiguration->fanPin = Gpio::H144_OUT_IO11;
|
||||
// engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO12;
|
||||
// engineConfiguration->tachOutputPin = Gpio::H144_OUT_IO13;
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
setupDefaultSensorInputs();
|
||||
|
@ -208,3 +208,7 @@ int getBoardMetaOutputsCount() {
|
|||
Gpio* getBoardMetaOutputs() {
|
||||
return OUTPUTS;
|
||||
}
|
||||
|
||||
int getBoardMetaDcOutputsCount() {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -8,12 +8,12 @@ Gpio GENERATED_OUTPUTS = {
|
|||
Gpio::C7, // auxWastegate
|
||||
Gpio::D15, // 1 Right Oil Cooling
|
||||
Gpio::D14, // 4 Left Oil Fan
|
||||
Gpio::G7, // 6 Front Injector
|
||||
Gpio::G8, // 7 Rear Injector
|
||||
Gpio::G7, // 6 Front Injector 1
|
||||
Gpio::G8, // 7 Rear Injector 2
|
||||
Gpio::G11, // 8 Rear ACR
|
||||
Gpio::C13, // 24 Front Coil
|
||||
Gpio::C13, // 24 Front Coil 1
|
||||
Gpio::D2, // 25 Front ACR
|
||||
Gpio::E5, // 43 Rear Coil
|
||||
Gpio::E5, // 43 Rear Coil 2
|
||||
Gpio::G14, // 61 Reverse Gear
|
||||
Gpio::G5, // 63 Cooling Pump
|
||||
}
|
||||
|
|
|
@ -6,20 +6,20 @@
|
|||
// see comments at declaration in pin_repository.h
|
||||
const char * getBoardSpecificPinName(brain_pin_e brainPin) {
|
||||
switch(brainPin) {
|
||||
case Gpio::C13: return "24 Front Coil";
|
||||
case Gpio::C13: return "24 Front Coil 1";
|
||||
case Gpio::C7: return "auxWastegate";
|
||||
case Gpio::D14: return "4 Left Oil Fan";
|
||||
case Gpio::D15: return "1 Right Oil Cooling";
|
||||
case Gpio::D2: return "25 Front ACR";
|
||||
case Gpio::E5: return "43 Rear Coil";
|
||||
case Gpio::E5: return "43 Rear Coil 2";
|
||||
case Gpio::F11: return "51 - VSS";
|
||||
case Gpio::F6: return "11 Crank VR-";
|
||||
case Gpio::G11: return "8 Rear ACR";
|
||||
case Gpio::G14: return "61 Reverse Gear";
|
||||
case Gpio::G3: return "auxMain";
|
||||
case Gpio::G5: return "63 Cooling Pump";
|
||||
case Gpio::G7: return "6 Front Injector";
|
||||
case Gpio::G8: return "7 Rear Injector";
|
||||
case Gpio::G7: return "6 Front Injector 1";
|
||||
case Gpio::G8: return "7 Rear Injector 2";
|
||||
default: return nullptr;
|
||||
}
|
||||
return nullptr;
|
||||
|
|
|
@ -44,15 +44,15 @@ pins:
|
|||
# H144_LS_1
|
||||
id: G7
|
||||
class: outputs
|
||||
function: Front Injector
|
||||
ts_name: 6 Front Injector
|
||||
function: Front Injector 1
|
||||
ts_name: 6 Front Injector 1
|
||||
|
||||
- pin: 7
|
||||
# H144_LS_2
|
||||
id: G8
|
||||
class: outputs
|
||||
function: Rear Injector
|
||||
ts_name: 7 Rear Injector
|
||||
function: Rear Injector 2
|
||||
ts_name: 7 Rear Injector 2
|
||||
|
||||
- pin: 8
|
||||
# H144_OUT_IO6
|
||||
|
@ -90,8 +90,8 @@ pins:
|
|||
# H144_IGN_1
|
||||
id: C13
|
||||
class: outputs
|
||||
ts_name: 24 Front Coil
|
||||
function: Front Coil
|
||||
ts_name: 24 Front Coil 1
|
||||
function: Front Coil 1
|
||||
type: ign
|
||||
|
||||
- pin: 25
|
||||
|
@ -148,10 +148,12 @@ pins:
|
|||
- pin: 38
|
||||
function: CAN bus low
|
||||
type: can
|
||||
color: blue
|
||||
|
||||
- pin: 39
|
||||
function: CAN bus high
|
||||
type: can
|
||||
color: green
|
||||
|
||||
- pin: 41
|
||||
# H144_IN_PPS
|
||||
|
@ -171,8 +173,8 @@ pins:
|
|||
# H144_IGN_2
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: 43 Rear Coil
|
||||
function: Rear Coil
|
||||
ts_name: 43 Rear Coil 2
|
||||
function: Rear Coil 2
|
||||
type: ign
|
||||
|
||||
- pin: 44
|
||||
|
|
|
@ -155,9 +155,9 @@ static Gpio OUTPUTS[] = {
|
|||
Gpio::MM100_IGN2, // 253 Coil 2
|
||||
Gpio::MM100_IGN3, // 254 Coil 3
|
||||
Gpio::MM100_IGN4, // 255 Coil 4
|
||||
Gpio::MM100_INJ7, // 9 235 Low Side Output
|
||||
Gpio::MM100_INJ6, // 9 235 Low Side Output
|
||||
Gpio::MM100_INJ5, // 101 low side 1.5A output
|
||||
Gpio::MM100_INJ6, // 102 low side 1.5A output
|
||||
Gpio::MM100_INJ7, // 102 low side 1.5A output
|
||||
Gpio::MM100_IGN8, // 12 115 Main Relay
|
||||
Gpio::MM100_OUT_PWM3, // 131 Relay Output
|
||||
Gpio::MM100_IGN7, // 140 Relay Output
|
||||
|
@ -175,3 +175,7 @@ int getBoardMetaOutputsCount() {
|
|||
Gpio* getBoardMetaOutputs() {
|
||||
return OUTPUTS;
|
||||
}
|
||||
|
||||
int getBoardMetaDcOutputsCount() {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
export EXTRA_PARAMS="-DRAMDISK_INVALID -DEFI_LUA=FALSE"
|
||||
export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
|
||||
|
||||
export INCLUDE_ELF=yes
|
||||
cd ..
|
||||
bash ../common_make.sh hellen/hellen-112-17 ARCH_STM32F4
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
Gpio GENERATED_OUTPUTS = {
|
||||
Gpio::MM100_INJ5, // 101 low side 1.5A output
|
||||
Gpio::MM100_INJ6, // 102 low side 1.5A output
|
||||
Gpio::MM100_INJ7, // 102 low side 1.5A output
|
||||
Gpio::MM100_IGN8, // 115 Main Relay
|
||||
Gpio::MM100_OUT_PWM2, // 129 Fuel Consumption Output
|
||||
Gpio::MM100_OUT_PWM3, // 131 Relay Output
|
||||
|
@ -14,7 +14,7 @@ Gpio GENERATED_OUTPUTS = {
|
|||
Gpio::MM100_OUT_PWM5, // 142 Fuel Pump Relay
|
||||
Gpio::MM100_IGN5, // 151 relay output
|
||||
Gpio::MM100_IGN6, // 152 relay output
|
||||
Gpio::MM100_INJ7, // 235 Low Side Output
|
||||
Gpio::MM100_INJ6, // 235 Low Side Output
|
||||
Gpio::MM100_INJ2, // 242 injector output 2
|
||||
Gpio::MM100_INJ3, // 243 injector output 3
|
||||
Gpio::MM100_INJ1, // 244 injector output 1
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
// see comments at declaration in pin_repository.h
|
||||
const char * getBoardSpecificPinName(brain_pin_e brainPin) {
|
||||
switch(brainPin) {
|
||||
case Gpio::A8: return "102 low side 1.5A output";
|
||||
case Gpio::A8: return "235 Low Side Output";
|
||||
case Gpio::A9: return "242 injector output 2";
|
||||
case Gpio::B1: return "213 Crank VR+";
|
||||
case Gpio::B12: return "135 Switch Input";
|
||||
case Gpio::B13: return "134 Switch Input";
|
||||
case Gpio::B8: return "152 relay output";
|
||||
|
@ -24,7 +25,7 @@ const char * getBoardSpecificPinName(brain_pin_e brainPin) {
|
|||
case Gpio::D11: return "243 injector output 3";
|
||||
case Gpio::D12: return "246 low side 1.5A output";
|
||||
case Gpio::D13: return "128 Tach Output";
|
||||
case Gpio::D15: return "235 Low Side Output";
|
||||
case Gpio::D15: return "102 low side 1.5A output";
|
||||
case Gpio::D2: return "101 low side 1.5A output";
|
||||
case Gpio::D3: return "244 injector output 1";
|
||||
case Gpio::E11: return "233 MAF frequency";
|
||||
|
|
|
@ -13,7 +13,7 @@ pins:
|
|||
class: outputs
|
||||
type: ls
|
||||
- pin: 102
|
||||
meta: MM100_INJ6
|
||||
meta: MM100_INJ7
|
||||
# RZR fuel pump driver PWM
|
||||
ts_name: ___ low side 1.5A output
|
||||
class: outputs
|
||||
|
@ -253,6 +253,8 @@ pins:
|
|||
function: Pedal +5V Supply
|
||||
- pin: 213
|
||||
# jumper
|
||||
meta: MM100_IN_CRANK
|
||||
class: event_inputs
|
||||
function: Crank Sensor VR+ Positive Input
|
||||
ts_name: ___ Crank VR+
|
||||
- pin: 215
|
||||
|
@ -301,7 +303,7 @@ pins:
|
|||
ts_name: ___ MAF frequency
|
||||
|
||||
- pin: 235
|
||||
meta: MM100_INJ7
|
||||
meta: MM100_INJ6
|
||||
ts_name: ___ Low Side Output
|
||||
class: outputs
|
||||
type: ls
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#define MAIN_HELP_URL "https://rusefi.com/"
|
||||
|
||||
|
||||
|
||||
|
||||
#define ts_show_vbatt false
|
||||
#define ts_show_clt_iat_pullup false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi false
|
||||
#define ts_show_can_pins false
|
||||
#define ts_show_tunerstudio_port true
|
||||
#define ts_show_can2 false
|
||||
#define ts_show_software_knock true
|
||||
#define ts_show_hardware_simulator false
|
||||
#define ts_show_vr_threshold_all false
|
||||
|
||||
#define show_test_presets false
|
||||
#define show_Frankenso_presets false
|
||||
#define show_microRusEFI_presets false
|
||||
#define show_Proteus_presets false
|
||||
#define show_Hellen_presets true
|
||||
#define show_8chan_presets false
|
|
@ -8,6 +8,6 @@ DDEFS += $(LED_CRITICAL_ERROR_BRAIN_PIN)
|
|||
|
||||
|
||||
|
||||
DDEFS += -DHELLEN_BOARD_ID_PIN_1=Gpio::MM100_BOARD_ID2 -DHELLEN_BOARD_ID_PIN_2=Gpio::MM100_BOARD_ID1
|
||||
DDEFS += -DHELLEN_BOARD_ID_PIN_1=Gpio::MM100_BOARD_ID1 -DHELLEN_BOARD_ID_PIN_2=Gpio::MM100_BOARD_ID2
|
||||
|
||||
include $(BOARDS_DIR)/hellen/hellen-common.mk
|
|
@ -192,6 +192,10 @@ int getBoardMetaLowSideOutputsCount() {
|
|||
return getBoardMetaOutputsCount() - 1;
|
||||
}
|
||||
|
||||
int getBoardMetaDcOutputsCount() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
Gpio* getBoardMetaOutputs() {
|
||||
return OUTPUTS;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ DDEFS += -DSHORT_BOARD_NAME=small-can-board -DSTATIC_BOARD_ID=STATIC_BOARD_ID_SM
|
|||
DDEFS += -DPERSISTENT_LOCATION_VALUE=\"__attribute__\(\(section\(\\\".ram1\\\"\)\)\)\"
|
||||
DDEFS += -DPERSISTENT_LOCATION_TODO
|
||||
DDEFS += -DEFI_SENSOR_CHART=FALSE
|
||||
# DDEFS += -DLUA_USER_HEAP=50000
|
||||
DDEFS += -DLUA_USER_HEAP=50000
|
||||
DDEFS += -DEFI_MC33816=FALSE
|
||||
DDEFS += -DDL_OUTPUT_BUFFER=1000
|
||||
DDEFS += -DEFI_LOGIC_ANALYZER=FALSE
|
||||
|
|
|
@ -14,19 +14,17 @@ void setBoardConfigOverrides() {
|
|||
// 33k / 6.8k = 5.835
|
||||
engineConfiguration->vbattDividerCoeff = (33 + 6.8) / 6.8;
|
||||
engineConfiguration->vbattAdcChannel = EFI_ADC_11;
|
||||
}
|
||||
|
||||
// Force I/O for Lua - so no TS is required
|
||||
void setBoardDefaultConfiguration() {
|
||||
engineConfiguration->luaOutputPins[0] = Gpio::MM64_OUT_PWM1;
|
||||
engineConfiguration->luaOutputPins[1] = Gpio::MM64_OUT_PWM2;
|
||||
engineConfiguration->luaOutputPins[2] = Gpio::MM64_OUT_PWM3;
|
||||
engineConfiguration->luaOutputPins[3] = Gpio::MM64_OUT_PWM4;
|
||||
|
||||
engineConfiguration->auxAnalogInputs[0] = EFI_ADC_2;
|
||||
engineConfiguration->auxAnalogInputs[1] = EFI_ADC_3;
|
||||
engineConfiguration->auxAnalogInputs[2] = EFI_ADC_4;
|
||||
engineConfiguration->auxAnalogInputs[3] = EFI_ADC_5;
|
||||
engineConfiguration->auxAnalogInputs[4] = EFI_ADC_6;
|
||||
engineConfiguration->auxAnalogInputs[5] = EFI_ADC_7;
|
||||
engineConfiguration->auxAnalogInputs[6] = EFI_ADC_14;
|
||||
engineConfiguration->auxAnalogInputs[7] = EFI_ADC_15;
|
||||
engineConfiguration->auxAnalogInputs[0] = MM64_IN_ADC2_ANALOG;
|
||||
engineConfiguration->auxAnalogInputs[1] = MM64_IN_ADC3_ANALOG;
|
||||
engineConfiguration->auxAnalogInputs[2] = MM64_IN_ADC4_ANALOG;
|
||||
engineConfiguration->auxAnalogInputs[3] = MM64_IN_ADC5_ANALOG;
|
||||
engineConfiguration->auxAnalogInputs[4] = MM64_IN_ADC6_ANALOG;
|
||||
}
|
||||
|
|
|
@ -104,15 +104,15 @@ pins:
|
|||
color: blue
|
||||
|
||||
- pin: C1
|
||||
id: [MM64_IN_ADC7, MM64_IN_ADC7_ANALOG]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
id: [MM64_IN_ADC7, MM64_IN_ADC7, MM64_IN_ADC7_ANALOG]
|
||||
class: [event_inputs, switch_inputs, analog_inputs]
|
||||
function: Analog/Digital Input 6
|
||||
ts_name: ___ - Analog/Digital Input
|
||||
color: purple
|
||||
|
||||
- pin: C2
|
||||
id: [MM64_IN_ADC14, MM64_IN_ADC14_ANALOG]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
id: [MM64_IN_ADC14, MM64_IN_ADC14, MM64_IN_ADC14_ANALOG]
|
||||
class: [event_inputs, switch_inputs, analog_inputs]
|
||||
function: Analog/Digital Input 7
|
||||
ts_name: ___ - Analog/Digital Input
|
||||
color: purple
|
||||
|
@ -125,8 +125,8 @@ pins:
|
|||
ts_name: ___ - Digital Input 2
|
||||
|
||||
- pin: C4
|
||||
id: [MM64_IN_ADC15, MM64_IN_ADC15_ANALOG]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
id: [MM64_IN_ADC15, MM64_IN_ADC15, MM64_IN_ADC15_ANALOG]
|
||||
class: [event_inputs, switch_inputs, analog_inputs]
|
||||
function: Analog/Digital Input 8
|
||||
ts_name: ___ - Analog/Digital Input
|
||||
color: gray
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
#define MM176_SPI1_MOSI B5
|
||||
#define MM176_SPI1_MISO B4
|
||||
#define MM176_SPI1_SCK B3
|
||||
#define MM176_SPI1_CS1 B6
|
||||
//MM176_SPI1_CS1 matches H_SPI1_CS1
|
||||
#define MM176_SPI1_CS2 B7
|
||||
|
||||
#define MM176_SPI2_MOSI B15
|
||||
|
@ -140,6 +140,7 @@
|
|||
#define MM176_GP7 F15
|
||||
//GP8 = PWR_EN
|
||||
#define MM176_GP8 E10
|
||||
#define MM176_EN_PIN MM176_GP8
|
||||
//GP9 = MUX
|
||||
#define MM176_GP9 F2
|
||||
#define MM176_GP10 I3
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Thu Oct 26 02:46:37 UTC 2023
|
||||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Tue Oct 31 02:27:54 UTC 2023
|
||||
// by class com.rusefi.output.CHeaderConsumer
|
||||
// begin
|
||||
#pragma once
|
||||
|
@ -1137,11 +1137,11 @@ struct engine_configuration_s {
|
|||
*/
|
||||
adc_channel_e throttlePedalPositionAdcChannel;
|
||||
/**
|
||||
* need 4 byte alignment
|
||||
units
|
||||
* TPS/PPS error threshold
|
||||
%
|
||||
* offset 521
|
||||
*/
|
||||
uint8_t alignmentFill_at_521[1];
|
||||
scaled_channel<uint8_t, 10, 1> etbSplit;
|
||||
/**
|
||||
* offset 522
|
||||
*/
|
||||
|
@ -5372,4 +5372,4 @@ struct persistent_config_s {
|
|||
static_assert(sizeof(persistent_config_s) == 22504);
|
||||
|
||||
// end
|
||||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Thu Oct 26 02:46:37 UTC 2023
|
||||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Tue Oct 31 02:27:54 UTC 2023
|
||||
|
|
|
@ -67,6 +67,8 @@
|
|||
#define bench_mode_e_BENCH_VVT1_VALVE 17
|
||||
#define bench_mode_e_BENCH_VVT2_VALVE 18
|
||||
#define bench_mode_e_BENCH_VVT3_VALVE 19
|
||||
#define bench_mode_e_HD_ACR 28
|
||||
#define bench_mode_e_HD_ACR2 29
|
||||
#define BENCH_STARTER_DURATION 4000
|
||||
#define BENCH_VVT_DURATION 300
|
||||
#define blend_table_s_size 188
|
||||
|
@ -481,6 +483,7 @@
|
|||
#define GAUGE_NAME_FUEL_PRESSURE_LOW "Fuel pressure (low)"
|
||||
#define GAUGE_NAME_FUEL_PRESSURE_LOW_UNITS "kPa"
|
||||
#define GAUGE_NAME_FUEL_RUNNING "Fuel: running"
|
||||
#define GAUGE_NAME_FUEL_TEMPERATURE "Fuel Temperature"
|
||||
#define GAUGE_NAME_FUEL_TPS_EXTRA "Fuel: TPS AE add fuel ms"
|
||||
#define GAUGE_NAME_FUEL_TPS_ROC "fuel: TPS change"
|
||||
#define GAUGE_NAME_FUEL_TRIM "Fuel: fuel trim"
|
||||
|
@ -715,6 +718,7 @@
|
|||
#define PACK_MULT_AFR 1000
|
||||
#define PACK_MULT_AFR_CFG 10
|
||||
#define PACK_MULT_ANGLE 50
|
||||
#define PACK_MULT_FLEX 2
|
||||
#define PACK_MULT_FUEL_FLOW 200
|
||||
#define PACK_MULT_FUEL_MASS 100
|
||||
#define PACK_MULT_HIGH_PRESSURE 10
|
||||
|
@ -732,16 +736,6 @@
|
|||
#define PERCENT_TRIM_BYTE_PACKING_DIV 0.02
|
||||
#define persistent_config_s_size 22504
|
||||
#define pid_s_size 20
|
||||
#define PidAutoTune_AutoTunerState_AUTOTUNER_OFF 0
|
||||
#define PidAutoTune_AutoTunerState_CONVERGED 16
|
||||
#define PidAutoTune_AutoTunerState_FAILED 128
|
||||
#define PidAutoTune_AutoTunerState_RELAY_STEP_DOWN 8
|
||||
#define PidAutoTune_AutoTunerState_RELAY_STEP_UP 4
|
||||
#define PidAutoTune_AutoTunerState_STEADY_STATE_AFTER_STEP_UP 2
|
||||
#define PidAutoTune_AutoTunerState_STEADY_STATE_AT_BASELINE 1
|
||||
#define PidAutoTune_Peak_MAXIMUM 1
|
||||
#define PidAutoTune_Peak_MINIMUM -1
|
||||
#define PidAutoTune_Peak_NOT_A_PEAK 0
|
||||
#define pin_input_mode_e_auto_enum 0="PI_DEFAULT",2="PI_PULLDOWN",1="PI_PULLUP"
|
||||
#define pin_input_mode_e_enum "DEFAULT", "PULLUP", "PULLDOWN"
|
||||
#define pin_input_mode_e_PI_DEFAULT 0
|
||||
|
@ -755,6 +749,7 @@
|
|||
#define pin_output_mode_e_OM_OPENDRAIN 2
|
||||
#define pin_output_mode_e_OM_OPENDRAIN_INVERTED 3
|
||||
#define PRIME_CURVE_COUNT 8
|
||||
#define PROTOCOL_ACR_NAME "acr"
|
||||
#define PROTOCOL_ANALOG_CHART "analog_chart"
|
||||
#define PROTOCOL_COIL1_SHORT_NAME "c1"
|
||||
#define PROTOCOL_CRANK1 "t1"
|
||||
|
@ -816,7 +811,7 @@
|
|||
#define SentEtbType_NONE 0
|
||||
#define show_Frankenso_presets true
|
||||
#define show_test_presets true
|
||||
#define SIGNATURE_HASH 2035395316
|
||||
#define SIGNATURE_HASH 349416920
|
||||
#define SIMULATOR_TUNE_BIN_FILE_NAME "generated/simulator_tune_image.bin"
|
||||
#define spi_device_e_auto_enum 0="SPI_NONE",1="SPI_DEVICE_1",2="SPI_DEVICE_2",3="SPI_DEVICE_3",4="SPI_DEVICE_4"
|
||||
#define spi_device_e_SPI_DEVICE_1 1
|
||||
|
@ -1112,7 +1107,7 @@
|
|||
#define ts_show_vr_threshold_2 true
|
||||
#define ts_show_vr_threshold_all true
|
||||
#define ts_show_vr_threshold_pins true
|
||||
#define TS_SIGNATURE "rusEFI master.2023.10.26.kin.2035395316"
|
||||
#define TS_SIGNATURE "rusEFI master.2023.11.02.kin.349416920"
|
||||
#define TS_SIMULATE_CAN '>'
|
||||
#define TS_SIMULATE_CAN_char >
|
||||
#define TS_SINGLE_WRITE_COMMAND 'W'
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
//DO NOT EDIT MANUALLY, let automation work hard.
|
||||
|
||||
// auto-generated by PinoutLogic.java based on config/boards/m74_9/connectors/m74_9.yaml
|
||||
#pragma once
|
||||
|
||||
Gpio GENERATED_OUTPUTS = {
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
//DO NOT EDIT MANUALLY, let automation work hard.
|
||||
|
||||
// auto-generated by PinoutLogic.java based on config/boards/m74_9/connectors/m74_9.yaml
|
||||
#include "pch.h"
|
||||
|
||||
// see comments at declaration in pin_repository.h
|
||||
const char * getBoardSpecificPinName(brain_pin_e brainPin) {
|
||||
switch(brainPin) {
|
||||
default: return nullptr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 593 KiB |
|
@ -0,0 +1,629 @@
|
|||
pins:
|
||||
# Connector A
|
||||
- pin: AA1
|
||||
function: Crank position sensor (pin A)
|
||||
type: vr
|
||||
|
||||
- pin: AA2
|
||||
function: Intake manifold geometry control valve
|
||||
type: gp_low
|
||||
|
||||
- pin: AA3
|
||||
function: Knock sensor +
|
||||
type:
|
||||
|
||||
- pin: AA4
|
||||
function: Programming enable
|
||||
type: gp_low
|
||||
|
||||
- pin: AB1
|
||||
function: Crank position sensor (pin B)
|
||||
type: vr
|
||||
|
||||
- pin: AB3
|
||||
function: Knock sensor ground
|
||||
type:
|
||||
|
||||
- pin: AB4
|
||||
function: Main relay
|
||||
type: gp_low
|
||||
|
||||
- pin: AC2
|
||||
function: IAT sensor signal
|
||||
type:
|
||||
|
||||
- pin: AC3
|
||||
function: MAF/MAP sensor signal
|
||||
type:
|
||||
|
||||
- pin: AC4
|
||||
function: Oxygen sensor 1 heater
|
||||
type: gp_low
|
||||
|
||||
- pin: AD1
|
||||
function: Oxygen sensor 2 ground
|
||||
type: sgnd
|
||||
|
||||
- pin: AD2
|
||||
function: Air conditioner control input
|
||||
type:
|
||||
|
||||
- pin: AD3
|
||||
function: Coolant temperature sensor signal
|
||||
type:
|
||||
|
||||
- pin: AD4
|
||||
function: Oil pressure sensor signal
|
||||
type:
|
||||
|
||||
- pin: AE1
|
||||
function: ETB position sensors ground
|
||||
type: etb
|
||||
|
||||
- pin: AE2
|
||||
function: optional CAN L
|
||||
type: can
|
||||
|
||||
- pin: AE3
|
||||
function: optional CAN H
|
||||
type: can
|
||||
|
||||
- pin: AE4
|
||||
function: EVAP solenoid control
|
||||
type: gp_low
|
||||
|
||||
- pin: AF1
|
||||
function: MAF/MAP, IAT sensors ground
|
||||
type: sqnd
|
||||
|
||||
- pin: AF2
|
||||
function: Vehicle speed sensor input
|
||||
type:
|
||||
|
||||
- pin: AF3
|
||||
function: Alternator DFM signal
|
||||
type:
|
||||
|
||||
- pin: AF4
|
||||
function: Injector 1
|
||||
type: inj
|
||||
|
||||
- pin: AG1
|
||||
function: Coolant temperature sensor ground
|
||||
type: sgnd
|
||||
|
||||
- pin: AG2
|
||||
function: Camshaft position sensor signal
|
||||
type: hall
|
||||
|
||||
- pin: AG4
|
||||
function: Injector 2
|
||||
type: inj
|
||||
|
||||
- pin: AH1
|
||||
function: Discrete sensors ground
|
||||
type: sgnd
|
||||
|
||||
- pin: AH2
|
||||
function: Oxygen sensor 2 ground
|
||||
type: sgnd
|
||||
|
||||
- pin: AH3
|
||||
function: Alternator LT signal
|
||||
type:
|
||||
|
||||
- pin: AH4
|
||||
function: Injector 3
|
||||
type: inj
|
||||
|
||||
- pin: AJ1
|
||||
function: Ignition
|
||||
type: ign
|
||||
|
||||
- pin: AJ2
|
||||
function: ETB position sensor 2 signal
|
||||
type: etb
|
||||
|
||||
- pin: AJ3
|
||||
function: Oxygen sensor 2 signal
|
||||
type: sgnd
|
||||
|
||||
- pin: AJ4
|
||||
function: Injector 4
|
||||
type: inj
|
||||
|
||||
- pin: AK1
|
||||
function: MAF/MAP, ETB position sensors +5v
|
||||
type: etb
|
||||
|
||||
- pin: AK2
|
||||
function: ETB position sensor 1 signal
|
||||
type: etb
|
||||
|
||||
- pin: AK3
|
||||
function: Oxygen sensor 1 signal
|
||||
type:
|
||||
|
||||
- pin: AK4
|
||||
function: Oxygen sensor 2 heater
|
||||
type:
|
||||
|
||||
- pin: AL1
|
||||
function: Coil 1 (< +2.5v) / Coils 1,4
|
||||
type:
|
||||
|
||||
- pin: AL4
|
||||
function: ETB motor ground (pin 4)
|
||||
type: etb
|
||||
|
||||
- pin: AM1
|
||||
function: Coil 3 (< +2.5v) / Coils 2,4
|
||||
type:
|
||||
|
||||
- pin: AM2
|
||||
function: Coil 2 (< +2.5v)
|
||||
type:
|
||||
|
||||
- pin: AM3
|
||||
function: Coil 4 (< +2.5v)
|
||||
type:
|
||||
|
||||
- pin: AM4
|
||||
function: ETB motor +
|
||||
type: etb
|
||||
|
||||
# Connector B
|
||||
- pin: BA1
|
||||
function: Air compressor control
|
||||
type:
|
||||
|
||||
- pin: BA2
|
||||
function: Pedal position sensor 2 signal
|
||||
type:
|
||||
|
||||
- pin: BA3
|
||||
function: Pedal position sensor 1 signal
|
||||
type:
|
||||
|
||||
- pin: BA4
|
||||
function: Pedal position sensor 1 + (+5v)
|
||||
type:
|
||||
|
||||
- pin: BB1
|
||||
function: Secondary starter relay
|
||||
type:
|
||||
|
||||
- pin: BB2
|
||||
function: Air conditioner pressure sensor (1,3 levels)
|
||||
type:
|
||||
|
||||
- pin: BB3
|
||||
function: Clutch sensor signal
|
||||
type:
|
||||
|
||||
- pin: BB4
|
||||
function: Pedal position sensor 2 + (+5v)
|
||||
type:
|
||||
|
||||
- pin: BC1
|
||||
function: FAN 1 relay
|
||||
type:
|
||||
|
||||
- pin: BC2
|
||||
function: Brake pedal sensor 2
|
||||
type:
|
||||
|
||||
- pin: BC3
|
||||
function: Brake pedal sensor 1
|
||||
type:
|
||||
|
||||
- pin: BC4
|
||||
function: Pedal position sensor 1 ground
|
||||
type: sgnd
|
||||
|
||||
- pin: BD1
|
||||
function: FAN 2 relay
|
||||
type:
|
||||
|
||||
- pin: BD2
|
||||
function: K-line / CAN L
|
||||
type: can
|
||||
|
||||
- pin: BD3
|
||||
function: Air conditioner control input
|
||||
type:
|
||||
|
||||
- pin: BD4
|
||||
function: Pedal position sensor 2 ground
|
||||
type: sgnd
|
||||
|
||||
- pin: BE1
|
||||
function: Main relay
|
||||
type: gp_low
|
||||
|
||||
- pin: BE2
|
||||
function: Fuel consumption signal / Inhibitor position solenoid
|
||||
type:
|
||||
|
||||
- pin: BE3
|
||||
function: Vehicle speed sensor
|
||||
type:
|
||||
|
||||
- pin: BE4
|
||||
function: Power ground
|
||||
type: pgnd
|
||||
|
||||
- pin: BF1
|
||||
function: Check engine / CAN H
|
||||
type: can
|
||||
|
||||
- pin: BF2
|
||||
function: Ignition
|
||||
type: ign
|
||||
|
||||
- pin: BF3
|
||||
function: Air conditioner pressure sensor (2 level)
|
||||
type:
|
||||
|
||||
- pin: BF4
|
||||
function: RPM signal
|
||||
type:
|
||||
|
||||
- pin: BG1
|
||||
function: Fuel pump relay
|
||||
type:
|
||||
|
||||
- pin: BG2
|
||||
function: Power ground
|
||||
type: pgnd
|
||||
|
||||
- pin: BG3
|
||||
function: Power ground
|
||||
type: pgnd
|
||||
|
||||
- pin: BG4
|
||||
function: Ignition ground
|
||||
type: ign
|
||||
|
||||
- pin: BH1
|
||||
function: +12v after main relay
|
||||
type: 12v
|
||||
|
||||
- pin: BH2
|
||||
function: +12v after main relay
|
||||
type: 12v
|
||||
|
||||
- pin: BH4
|
||||
function: FAN diagnostic input
|
||||
type:
|
||||
|
||||
info:
|
||||
title: m74.9
|
||||
board_url: https://github.com/rusefi/m74.9/
|
||||
directory: m74.9
|
||||
name: m74.9
|
||||
image:
|
||||
file: m74_9.jpg
|
||||
pins:
|
||||
# Connector A
|
||||
- pin: AA1
|
||||
x: 1032
|
||||
y: 556
|
||||
|
||||
- pin: AA2
|
||||
x: 1034
|
||||
y: 458
|
||||
|
||||
- pin: AA3
|
||||
x: 1036
|
||||
y: 359
|
||||
|
||||
- pin: AA4
|
||||
x: 1040
|
||||
y: 265
|
||||
|
||||
- pin: AB1
|
||||
x: 972
|
||||
y: 555
|
||||
|
||||
- pin: AB2
|
||||
x: 975
|
||||
y: 456
|
||||
|
||||
- pin: AB3
|
||||
x: 978
|
||||
y: 360
|
||||
|
||||
- pin: AB4
|
||||
x: 982
|
||||
y: 265
|
||||
|
||||
- pin: AC1
|
||||
x: 912
|
||||
y: 555
|
||||
|
||||
- pin: AC2
|
||||
x: 915
|
||||
y: 458
|
||||
|
||||
- pin: AC3
|
||||
x: 919
|
||||
y: 360
|
||||
|
||||
- pin: AC4
|
||||
x: 923
|
||||
y: 265
|
||||
|
||||
- pin: AD1
|
||||
x: 852
|
||||
y: 556
|
||||
|
||||
- pin: AD2
|
||||
x: 856
|
||||
y: 457
|
||||
|
||||
- pin: AD3
|
||||
x: 860
|
||||
y: 359
|
||||
|
||||
- pin: AD4
|
||||
x: 864
|
||||
y: 265
|
||||
|
||||
- pin: AE1
|
||||
x: 792
|
||||
y: 557
|
||||
|
||||
- pin: AE2
|
||||
x: 796
|
||||
y: 457
|
||||
|
||||
- pin: AE3
|
||||
x: 800
|
||||
y: 359
|
||||
|
||||
- pin: AE4
|
||||
x: 804
|
||||
y: 265
|
||||
|
||||
- pin: AF1
|
||||
x: 732
|
||||
y: 557
|
||||
|
||||
- pin: AF2
|
||||
x: 735
|
||||
y: 458
|
||||
|
||||
- pin: AF3
|
||||
x: 740
|
||||
y: 358
|
||||
|
||||
- pin: AF4
|
||||
x: 746
|
||||
y: 262
|
||||
|
||||
- pin: AG1
|
||||
x: 671
|
||||
y: 557
|
||||
|
||||
- pin: AG2
|
||||
x: 675
|
||||
y: 456
|
||||
|
||||
- pin: AG3
|
||||
x: 680
|
||||
y: 359
|
||||
|
||||
- pin: AG4
|
||||
x: 686
|
||||
y: 262
|
||||
|
||||
- pin: AH1
|
||||
x: 611
|
||||
y: 556
|
||||
|
||||
- pin: AH2
|
||||
x: 615
|
||||
y: 457
|
||||
|
||||
- pin: AH3
|
||||
x: 620
|
||||
y: 357
|
||||
|
||||
- pin: AH4
|
||||
x: 627
|
||||
y: 261
|
||||
|
||||
- pin: AJ1
|
||||
x: 551
|
||||
y: 556
|
||||
|
||||
- pin: AJ2
|
||||
x: 556
|
||||
y: 457
|
||||
|
||||
- pin: AJ3
|
||||
x: 560
|
||||
y: 358
|
||||
|
||||
- pin: AJ4
|
||||
x: 568
|
||||
y: 260
|
||||
|
||||
- pin: AK1
|
||||
x: 491
|
||||
y: 557
|
||||
|
||||
- pin: AK2
|
||||
x: 495
|
||||
y: 455
|
||||
|
||||
- pin: AK3
|
||||
x: 502
|
||||
y: 356
|
||||
|
||||
- pin: AK4
|
||||
x: 507
|
||||
y: 260
|
||||
|
||||
- pin: AL1
|
||||
x: 396
|
||||
y: 554
|
||||
|
||||
- pin: AL2
|
||||
x: 412
|
||||
y: 455
|
||||
|
||||
- pin: AL3
|
||||
x: 419
|
||||
y: 355
|
||||
|
||||
- pin: AL4
|
||||
x: 424
|
||||
y: 258
|
||||
|
||||
- pin: AM1
|
||||
x: 309
|
||||
y: 555
|
||||
|
||||
- pin: AM2
|
||||
x: 321
|
||||
y: 455
|
||||
|
||||
- pin: AM3
|
||||
x: 329
|
||||
y: 355
|
||||
|
||||
- pin: AM4
|
||||
x: 335
|
||||
y: 256
|
||||
|
||||
# Connector B
|
||||
- pin: BA1
|
||||
x: 1422
|
||||
y: 268
|
||||
|
||||
- pin: BA2
|
||||
x: 1425
|
||||
y: 363
|
||||
|
||||
- pin: BA3
|
||||
x: 1424
|
||||
y: 459
|
||||
|
||||
- pin: BA4
|
||||
x: 1427
|
||||
y: 557
|
||||
|
||||
- pin: BB1
|
||||
x: 1479
|
||||
y: 268
|
||||
|
||||
- pin: BB2
|
||||
x: 1481
|
||||
y: 369
|
||||
|
||||
- pin: BB3
|
||||
x: 1483
|
||||
y: 459
|
||||
|
||||
- pin: BB4
|
||||
x: 1485
|
||||
y: 557
|
||||
|
||||
- pin: BC1
|
||||
x: 1538
|
||||
y: 268
|
||||
|
||||
- pin: BC2
|
||||
x: 1539
|
||||
y: 364
|
||||
|
||||
- pin: BC3
|
||||
x: 1542
|
||||
y: 460
|
||||
|
||||
- pin: BC4
|
||||
x: 1542
|
||||
y: 460
|
||||
|
||||
- pin: BD1
|
||||
x: 1595
|
||||
y: 268
|
||||
|
||||
- pin: BD2
|
||||
x: 1599
|
||||
y: 365
|
||||
|
||||
- pin: BD3
|
||||
x: 1601
|
||||
y: 460
|
||||
|
||||
- pin: BD4
|
||||
x: 1604
|
||||
y: 557
|
||||
|
||||
- pin: BE1
|
||||
x: 1654
|
||||
y: 269
|
||||
|
||||
- pin: BE2
|
||||
x: 1658
|
||||
y: 366
|
||||
|
||||
- pin: BE3
|
||||
x: 1661
|
||||
y: 460
|
||||
|
||||
- pin: BE4
|
||||
x: 1663
|
||||
y: 558
|
||||
|
||||
- pin: BF1
|
||||
x: 1712
|
||||
y: 270
|
||||
|
||||
- pin: BF2
|
||||
x: 1715
|
||||
y: 365
|
||||
|
||||
- pin: BF3
|
||||
x: 1719
|
||||
y: 461
|
||||
|
||||
- pin: BF4
|
||||
x: 1722
|
||||
y: 559
|
||||
|
||||
- pin: BG1
|
||||
x: 1794
|
||||
y: 271
|
||||
|
||||
- pin: BG2
|
||||
x: 1798
|
||||
y: 365
|
||||
|
||||
- pin: BG3
|
||||
x: 1803
|
||||
y: 461
|
||||
|
||||
- pin: BG4
|
||||
x: 1812
|
||||
y: 555
|
||||
|
||||
- pin: BH1
|
||||
x: 1879
|
||||
y: 272
|
||||
|
||||
- pin: BH2
|
||||
x: 1884
|
||||
y: 367
|
||||
|
||||
- pin: BH3
|
||||
x: 1889
|
||||
y: 462
|
||||
|
||||
- pin: BH4
|
||||
x: 1900
|
||||
y: 556
|
||||
|
|
@ -4,6 +4,7 @@ DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::B14
|
|||
|
||||
# Enable ethernet
|
||||
LWIP = yes
|
||||
ALLOW_SHADOW = yes
|
||||
DDEFS += -DEFI_ETHERNET=TRUE
|
||||
|
||||
# This is an F429!
|
||||
|
|
|
@ -10,9 +10,9 @@ DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::B14
|
|||
|
||||
# Enable ethernet
|
||||
LWIP = yes
|
||||
ALLOW_SHADOW = yes
|
||||
DDEFS += -DEFI_ETHERNET=TRUE
|
||||
|
||||
DEBUG_LEVEL_OPT = -Os -ggdb -g
|
||||
|
||||
DDEFS += -DFIRMWARE_ID=\"nucleo_f767\"
|
||||
DDEFS += -DDEFAULT_ENGINE_TYPE=engine_type_e::MINIMAL_PINS
|
||||
|
|
|
@ -14,6 +14,5 @@ export EXTRA_PARAMS="-DSTM32F767xx \
|
|||
-DSTM32_HSE_BYPASS=TRUE \
|
||||
-DEFI_ENABLE_ASSERTS=FALSE \
|
||||
-DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE"
|
||||
export DEBUG_LEVEL_OPT="-O2"
|
||||
|
||||
bash ../common_make.sh nucleo_f767 ARCH_STM32F7
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# STM32F767 version of the firmware for F767ZI chip NOT on Nucleo board, with a real oscilattor
|
||||
|
||||
export EXTRA_PARAMS="-DEFI_ENABLE_ASSERTS=FALSE \
|
||||
|
||||
|
||||
|
||||
|
||||
# STM32F767 version of the firmware for F767ZI chip NOT on Nucleo board, with a real oscillator
|
||||
|
||||
export USE_FATFS=no
|
||||
|
||||
export EXTRA_PARAMS="-DSTM32F767xx \
|
||||
\
|
||||
\
|
||||
-DEFI_ENABLE_ASSERTS=FALSE \
|
||||
-DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE"
|
||||
|
||||
# Do not forget to comment out following line if looking to debug!
|
||||
export DEBUG_LEVEL_OPT="-O2"
|
||||
|
||||
bash ../common_make.sh nucleo_f767 ARCH_STM32F7
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::B14
|
|||
|
||||
# Enable ethernet
|
||||
LWIP = yes
|
||||
ALLOW_SHADOW = yes
|
||||
DDEFS += -DEFI_ETHERNET=TRUE
|
||||
|
||||
DDEFS += -DFIRMWARE_ID=\"nucleo_h743\"
|
||||
|
|
|
@ -11,6 +11,7 @@ DDEFS += -DFIRMWARE_ID=\"proteus\"
|
|||
DDEFS += $(VAR_DEF_ENGINE_TYPE)
|
||||
|
||||
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
||||
DDEFS += -DEFI_HD_ACR=TRUE
|
||||
|
||||
# Turn off stuff proteus doesn't have/need
|
||||
DDEFS += -DEFI_MAX_31855=FALSE -DBOARD_L9779_COUNT=0 -DBOARD_TLE8888_COUNT=0
|
||||
|
|
|
@ -212,13 +212,60 @@ static Gpio PROTEUS_CANAM_OUTPUTS[] = {
|
|||
Gpio::PROTEUS_LS_14,
|
||||
};
|
||||
|
||||
static Gpio PROTEUS_HARLEY_OUTPUTS[] = {
|
||||
Gpio::PROTEUS_LS_1,
|
||||
Gpio::PROTEUS_LS_2,
|
||||
Gpio::PROTEUS_IGN_1,
|
||||
Gpio::PROTEUS_IGN_2,
|
||||
};
|
||||
|
||||
int getBoardMetaLowSideOutputsCount() {
|
||||
if (engineConfiguration->engineType == engine_type_e::MAVERICK_X3) {
|
||||
return getBoardMetaOutputsCount();
|
||||
}
|
||||
if (engineConfiguration->engineType == engine_type_e::PROTEUS_HARLEY) {
|
||||
return getBoardMetaOutputsCount();
|
||||
}
|
||||
return 16;
|
||||
}
|
||||
|
||||
#if HW_PROTEUS
|
||||
static Gpio PROTEUS_OUTPUTS[] = {
|
||||
Gpio::PROTEUS_LS_1,
|
||||
Gpio::PROTEUS_LS_2,
|
||||
Gpio::PROTEUS_LS_3,
|
||||
Gpio::PROTEUS_LS_4,
|
||||
Gpio::PROTEUS_LS_5,
|
||||
Gpio::PROTEUS_LS_6,
|
||||
Gpio::PROTEUS_LS_7,
|
||||
Gpio::PROTEUS_LS_8,
|
||||
Gpio::PROTEUS_LS_9,
|
||||
Gpio::PROTEUS_LS_10,
|
||||
Gpio::PROTEUS_LS_11,
|
||||
Gpio::PROTEUS_LS_12,
|
||||
Gpio::PROTEUS_LS_13,
|
||||
Gpio::PROTEUS_LS_14,
|
||||
Gpio::PROTEUS_LS_15,
|
||||
Gpio::PROTEUS_LS_16,
|
||||
Gpio::PROTEUS_IGN_1,
|
||||
Gpio::PROTEUS_IGN_2,
|
||||
Gpio::PROTEUS_IGN_3,
|
||||
Gpio::PROTEUS_IGN_4,
|
||||
Gpio::PROTEUS_IGN_5,
|
||||
Gpio::PROTEUS_IGN_6,
|
||||
Gpio::PROTEUS_IGN_7,
|
||||
Gpio::PROTEUS_IGN_8,
|
||||
Gpio::PROTEUS_IGN_9,
|
||||
Gpio::PROTEUS_IGN_10,
|
||||
Gpio::PROTEUS_IGN_11,
|
||||
Gpio::PROTEUS_IGN_12,
|
||||
Gpio::PROTEUS_HS_1,
|
||||
Gpio::PROTEUS_HS_2,
|
||||
Gpio::PROTEUS_HS_3,
|
||||
Gpio::PROTEUS_HS_4
|
||||
};
|
||||
#endif // HW_PROTEUS
|
||||
|
||||
int getBoardMetaOutputsCount() {
|
||||
if (engineConfiguration->engineType == engine_type_e::MAVERICK_X3) {
|
||||
return efi::size(PROTEUS_CANAM_OUTPUTS);
|
||||
|
@ -226,12 +273,25 @@ int getBoardMetaOutputsCount() {
|
|||
if (engineConfiguration->engineType == engine_type_e::ME17_9_MISC) {
|
||||
return efi::size(PROTEUS_ME17_ADAPTER_OUTPUTS);
|
||||
}
|
||||
if (engineConfiguration->engineType == engine_type_e::PROTEUS_HARLEY) {
|
||||
return efi::size(PROTEUS_HARLEY_OUTPUTS);
|
||||
}
|
||||
return efi::size(PROTEUS_OUTPUTS);
|
||||
}
|
||||
|
||||
int getBoardMetaDcOutputsCount() {
|
||||
if (engineConfiguration->engineType == engine_type_e::PROTEUS_HARLEY) {
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
Gpio* getBoardMetaOutputs() {
|
||||
if (engineConfiguration->engineType == engine_type_e::MAVERICK_X3) {
|
||||
return PROTEUS_CANAM_OUTPUTS;
|
||||
}
|
||||
if (engineConfiguration->engineType == engine_type_e::PROTEUS_HARLEY) {
|
||||
return PROTEUS_HARLEY_OUTPUTS;
|
||||
}
|
||||
return PROTEUS_OUTPUTS;
|
||||
}
|
||||
|
|
|
@ -141,41 +141,4 @@
|
|||
#define PROTEUS_DIGITAL_5 Gpio::E13
|
||||
#define PROTEUS_DIGITAL_6 Gpio::E15
|
||||
|
||||
#if HW_PROTEUS
|
||||
static Gpio PROTEUS_OUTPUTS[] = {
|
||||
Gpio::PROTEUS_LS_1,
|
||||
Gpio::PROTEUS_LS_2,
|
||||
Gpio::PROTEUS_LS_3,
|
||||
Gpio::PROTEUS_LS_4,
|
||||
Gpio::PROTEUS_LS_5,
|
||||
Gpio::PROTEUS_LS_6,
|
||||
Gpio::PROTEUS_LS_7,
|
||||
Gpio::PROTEUS_LS_8,
|
||||
Gpio::PROTEUS_LS_9,
|
||||
Gpio::PROTEUS_LS_10,
|
||||
Gpio::PROTEUS_LS_11,
|
||||
Gpio::PROTEUS_LS_12,
|
||||
Gpio::PROTEUS_LS_13,
|
||||
Gpio::PROTEUS_LS_14,
|
||||
Gpio::PROTEUS_LS_15,
|
||||
Gpio::PROTEUS_LS_16,
|
||||
Gpio::PROTEUS_IGN_1,
|
||||
Gpio::PROTEUS_IGN_2,
|
||||
Gpio::PROTEUS_IGN_3,
|
||||
Gpio::PROTEUS_IGN_4,
|
||||
Gpio::PROTEUS_IGN_5,
|
||||
Gpio::PROTEUS_IGN_6,
|
||||
Gpio::PROTEUS_IGN_7,
|
||||
Gpio::PROTEUS_IGN_8,
|
||||
Gpio::PROTEUS_IGN_9,
|
||||
Gpio::PROTEUS_IGN_10,
|
||||
Gpio::PROTEUS_IGN_11,
|
||||
Gpio::PROTEUS_IGN_12,
|
||||
Gpio::PROTEUS_HS_1,
|
||||
Gpio::PROTEUS_HS_2,
|
||||
Gpio::PROTEUS_HS_3,
|
||||
Gpio::PROTEUS_HS_4
|
||||
};
|
||||
#endif // HW_PROTEUS
|
||||
|
||||
void setProteusEtbIO();
|
||||
|
|
|
@ -275,7 +275,8 @@ pins:
|
|||
|
||||
# 63-81 segment
|
||||
- pin: 63a
|
||||
function: +12V in (MR)
|
||||
function: +12V from Main Relay
|
||||
type: 12v
|
||||
# See 44a
|
||||
# id: EFI_ADC_9
|
||||
# class: analog_inputs
|
||||
|
|
|
@ -12,6 +12,7 @@ endif
|
|||
|
||||
#LED
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::G7
|
||||
DDEFS += -DLED_PIN_MODE=OM_INVERTED
|
||||
|
||||
# We are running on Subaru EG33 hardware!
|
||||
DDEFS += -DHW_SUBARU_EG33=1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Thu Oct 26 02:46:40 UTC 2023
|
||||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Tue Oct 31 02:27:56 UTC 2023
|
||||
// by class com.rusefi.output.CHeaderConsumer
|
||||
// begin
|
||||
#pragma once
|
||||
|
@ -1137,11 +1137,11 @@ struct engine_configuration_s {
|
|||
*/
|
||||
adc_channel_e throttlePedalPositionAdcChannel;
|
||||
/**
|
||||
* need 4 byte alignment
|
||||
units
|
||||
* TPS/PPS error threshold
|
||||
%
|
||||
* offset 521
|
||||
*/
|
||||
uint8_t alignmentFill_at_521[1];
|
||||
scaled_channel<uint8_t, 10, 1> etbSplit;
|
||||
/**
|
||||
* offset 522
|
||||
*/
|
||||
|
@ -5372,4 +5372,4 @@ struct persistent_config_s {
|
|||
static_assert(sizeof(persistent_config_s) == 23880);
|
||||
|
||||
// end
|
||||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Thu Oct 26 02:46:40 UTC 2023
|
||||
// this section was generated automatically by rusEFI tool config_definition.jar based on (unknown script) integration/rusefi_config.txt Tue Oct 31 02:27:56 UTC 2023
|
||||
|
|
|
@ -95,6 +95,8 @@
|
|||
#define bench_mode_e_BENCH_VVT1_VALVE 17
|
||||
#define bench_mode_e_BENCH_VVT2_VALVE 18
|
||||
#define bench_mode_e_BENCH_VVT3_VALVE 19
|
||||
#define bench_mode_e_HD_ACR 28
|
||||
#define bench_mode_e_HD_ACR2 29
|
||||
#define BENCH_STARTER_DURATION 4000
|
||||
#define BENCH_VVT_DURATION 300
|
||||
#define blend_table_s_size 188
|
||||
|
@ -509,6 +511,7 @@
|
|||
#define GAUGE_NAME_FUEL_PRESSURE_LOW "Fuel pressure (low)"
|
||||
#define GAUGE_NAME_FUEL_PRESSURE_LOW_UNITS "kPa"
|
||||
#define GAUGE_NAME_FUEL_RUNNING "Fuel: running"
|
||||
#define GAUGE_NAME_FUEL_TEMPERATURE "Fuel Temperature"
|
||||
#define GAUGE_NAME_FUEL_TPS_EXTRA "Fuel: TPS AE add fuel ms"
|
||||
#define GAUGE_NAME_FUEL_TPS_ROC "fuel: TPS change"
|
||||
#define GAUGE_NAME_FUEL_TRIM "Fuel: fuel trim"
|
||||
|
@ -952,6 +955,7 @@
|
|||
#define PACK_MULT_AFR 1000
|
||||
#define PACK_MULT_AFR_CFG 10
|
||||
#define PACK_MULT_ANGLE 50
|
||||
#define PACK_MULT_FLEX 2
|
||||
#define PACK_MULT_FUEL_FLOW 200
|
||||
#define PACK_MULT_FUEL_MASS 100
|
||||
#define PACK_MULT_HIGH_PRESSURE 10
|
||||
|
@ -969,16 +973,6 @@
|
|||
#define PERCENT_TRIM_BYTE_PACKING_DIV 0.02
|
||||
#define persistent_config_s_size 23880
|
||||
#define pid_s_size 20
|
||||
#define PidAutoTune_AutoTunerState_AUTOTUNER_OFF 0
|
||||
#define PidAutoTune_AutoTunerState_CONVERGED 16
|
||||
#define PidAutoTune_AutoTunerState_FAILED 128
|
||||
#define PidAutoTune_AutoTunerState_RELAY_STEP_DOWN 8
|
||||
#define PidAutoTune_AutoTunerState_RELAY_STEP_UP 4
|
||||
#define PidAutoTune_AutoTunerState_STEADY_STATE_AFTER_STEP_UP 2
|
||||
#define PidAutoTune_AutoTunerState_STEADY_STATE_AT_BASELINE 1
|
||||
#define PidAutoTune_Peak_MAXIMUM 1
|
||||
#define PidAutoTune_Peak_MINIMUM -1
|
||||
#define PidAutoTune_Peak_NOT_A_PEAK 0
|
||||
#define pin_input_mode_e_auto_enum 0="PI_DEFAULT",2="PI_PULLDOWN",1="PI_PULLUP"
|
||||
#define pin_input_mode_e_enum "DEFAULT", "PULLUP", "PULLDOWN"
|
||||
#define pin_input_mode_e_PI_DEFAULT 0
|
||||
|
@ -992,6 +986,7 @@
|
|||
#define pin_output_mode_e_OM_OPENDRAIN 2
|
||||
#define pin_output_mode_e_OM_OPENDRAIN_INVERTED 3
|
||||
#define PRIME_CURVE_COUNT 8
|
||||
#define PROTOCOL_ACR_NAME "acr"
|
||||
#define PROTOCOL_ANALOG_CHART "analog_chart"
|
||||
#define PROTOCOL_COIL1_SHORT_NAME "c1"
|
||||
#define PROTOCOL_CRANK1 "t1"
|
||||
|
@ -1054,7 +1049,7 @@
|
|||
#define show_Frankenso_presets false
|
||||
#define show_Proteus_presets false
|
||||
#define show_test_presets false
|
||||
#define SIGNATURE_HASH 1007528525
|
||||
#define SIGNATURE_HASH 1368370529
|
||||
#define SIMULATOR_TUNE_BIN_FILE_NAME "generated/simulator_tune_image.bin"
|
||||
#define spi_device_e_auto_enum 0="SPI_NONE",1="SPI_DEVICE_1",2="SPI_DEVICE_2",3="SPI_DEVICE_3",4="SPI_DEVICE_4"
|
||||
#define spi_device_e_SPI_DEVICE_1 1
|
||||
|
@ -1350,7 +1345,7 @@
|
|||
#define ts_show_vr_threshold_2 true
|
||||
#define ts_show_vr_threshold_all true
|
||||
#define ts_show_vr_threshold_pins true
|
||||
#define TS_SIGNATURE "rusEFI master.2023.10.26.subaru_eg33_f7.1007528525"
|
||||
#define TS_SIGNATURE "rusEFI master.2023.11.02.subaru_eg33_f7.1368370529"
|
||||
#define TS_SIMULATE_CAN '>'
|
||||
#define TS_SIMULATE_CAN_char >
|
||||
#define TS_SINGLE_WRITE_COMMAND 'W'
|
||||
|
|
|
@ -68,8 +68,6 @@ void setFordEscortGt() {
|
|||
|
||||
engineConfiguration->trigger.type = trigger_type_e::TT_MAZDA_DOHC_1_4;
|
||||
|
||||
setDensoTODO(config);
|
||||
|
||||
engineConfiguration->globalFuelCorrection = 0.75;
|
||||
engineConfiguration->displacement = 1.839;
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
|
|
@ -14,13 +14,17 @@ void proteusHarley() {
|
|||
engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_6;
|
||||
engineConfiguration->vvtMode[0] = VVT_MAP_V_TWIN;
|
||||
|
||||
engineConfiguration->mainRelayPin = Gpio::Unassigned;
|
||||
engineConfiguration->mapCamDetectionAnglePosition = 50;
|
||||
#if HW_PROTEUS
|
||||
engineConfiguration->acrPin = Gpio::PROTEUS_IGN_8;
|
||||
engineConfiguration->acrPin2 = Gpio::PROTEUS_IGN_9;
|
||||
|
||||
engineConfiguration->luaOutputPins[0] = Gpio::PROTEUS_LS_12;
|
||||
#if HW_PROTEUS
|
||||
|
||||
strncpy(config->luaScript, R"(
|
||||
outputIndex = 0
|
||||
startPwm(outputIndex, 100, 0)
|
||||
--outputIndex = 0
|
||||
--startPwm(outputIndex, 100, 0)
|
||||
|
||||
rpmLimitSetting = findSetting("compReleaseRpm", 300)
|
||||
compReleaseDulationLimit = findSetting("compReleaseDur", 6000)
|
||||
|
@ -118,8 +122,8 @@ function onTick()
|
|||
--print('getTimeSinceTriggerEventMs ' .. getTimeSinceTriggerEventMs())
|
||||
enableCompressionReleaseSolenoid = getTimeSinceTriggerEventMs() < compReleaseDulationLimit and rpm < rpmLimitSetting
|
||||
duty = enableCompressionReleaseSolenoid and 1 or 0
|
||||
print("Compression release solenoid " .. duty)
|
||||
setPwmDuty(outputIndex, duty)
|
||||
-- print("Compression release solenoid " .. duty)
|
||||
-- setPwmDuty(outputIndex, duty)
|
||||
else
|
||||
if offCounter == 0 then --goodbye sweet love
|
||||
txCan(1, 0x502, 0, packet502) --goodbye
|
||||
|
|
|
@ -72,8 +72,6 @@ void setProteusHondaElement2003() {
|
|||
|
||||
strcpy(engineConfiguration->vehicleName, "test");
|
||||
|
||||
gppwm_channel *vtsControl = &engineConfiguration->gppwm[0];
|
||||
|
||||
#if HW_PROTEUS & EFI_PROD_CODE
|
||||
// engineConfiguration->triggerInputPins[0] = PROTEUS_DIGITAL_2; // crank
|
||||
// engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_4; // intake
|
||||
|
@ -90,6 +88,7 @@ void setProteusHondaElement2003() {
|
|||
engineConfiguration->injectionPins[2] = Gpio::PROTEUS_LS_6;
|
||||
engineConfiguration->injectionPins[3] = Gpio::PROTEUS_LS_5;
|
||||
|
||||
gppwm_channel *vtsControl = &engineConfiguration->gppwm[0];
|
||||
vtsControl->pin = Gpio::PROTEUS_HS_1;
|
||||
engineConfiguration->vvtPins[0] = Gpio::PROTEUS_HS_2;
|
||||
|
||||
|
|
|
@ -51,14 +51,14 @@ void setM111EngineConfiguration() {
|
|||
engineConfiguration->etb.dFactor = 0.088;
|
||||
engineConfiguration->etb.offset = 0;
|
||||
|
||||
gppwm_channel *scBypass = &engineConfiguration->gppwm[0];
|
||||
strcpy(engineConfiguration->gpPwmNote[0], "SC Bypass");
|
||||
#if HW_MICRO_RUSEFI && EFI_PROD_CODE
|
||||
gppwm_channel *scBypass = &engineConfiguration->gppwm[0];
|
||||
scBypass->pin = MRE_GPOUT_3;
|
||||
#endif // HW_MICRO_RUSEFI
|
||||
|
||||
gppwm_channel *scClutch = &engineConfiguration->gppwm[1];
|
||||
#if HW_MICRO_RUSEFI
|
||||
gppwm_channel *scClutch = &engineConfiguration->gppwm[1];
|
||||
scClutch->pin = MRE_LS_2;
|
||||
engineConfiguration->vvtPins[0] = MRE_LS_1;
|
||||
#endif // HW_MICRO_RUSEFI
|
||||
|
|
|
@ -32,7 +32,7 @@ void setHellen121nissanQR() {
|
|||
}
|
||||
|
||||
static void setNissanVqEngineConfig() {
|
||||
setNissanMAF0031(config);
|
||||
setNissanMAF0031();
|
||||
engineConfiguration->trigger.type = trigger_type_e::TT_NISSAN_VQ35;
|
||||
|
||||
engineConfiguration->cylindersCount = 6;
|
||||
|
|
|
@ -190,7 +190,7 @@ void setMreVwPassatB6() {
|
|||
#if HW_MICRO_RUSEFI
|
||||
commonPassatB6();
|
||||
|
||||
engineConfiguration->afr.hwChannel = MRE_IN_ANALOG_VOLT_10;
|
||||
// engineConfiguration->afr.hwChannel = MRE_IN_ANALOG_VOLT_10;
|
||||
|
||||
engineConfiguration->tps1_2AdcChannel = MRE_IN_ANALOG_VOLT_9;
|
||||
|
||||
|
|
|
@ -67,6 +67,10 @@
|
|||
#define EFI_HPFP TRUE
|
||||
#endif
|
||||
|
||||
#ifndef EFI_HD_ACR
|
||||
#define EFI_HD_ACR FALSE
|
||||
#endif
|
||||
|
||||
#ifndef SC_BUFFER_SIZE
|
||||
#define SC_BUFFER_SIZE 4000
|
||||
#endif
|
||||
|
|
|
@ -127,7 +127,7 @@ int16_t rpmAcceleration;dRPM;"RPM acceleration",1, 0, 0, 5, 2
|
|||
int16_t autoscale lowFuelPressure;@@GAUGE_NAME_FUEL_PRESSURE_LOW@@;"kpa",{1/@@PACK_MULT_PRESSURE@@}, 0, 0, 0, 0
|
||||
|
||||
int8_t tcuDesiredGear;@@GAUGE_NAME_DESIRED_GEAR@@;"gear",1, 0, -1, 10, 0
|
||||
uint8_t autoscale flexPercent;@@GAUGE_NAME_FLEX@@;"%",{1/2}, 0, 0, 0, 1
|
||||
uint8_t autoscale flexPercent;@@GAUGE_NAME_FLEX@@;"%",{1/@@PACK_MULT_FLEX@@}, 0, 0, 0, 1
|
||||
|
||||
int16_t autoscale wastegatePositionSensor;@@GAUGE_NAME_WG_POSITION@@;"%",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 2
|
||||
int16_t autoscale highFuelPressure;@@GAUGE_NAME_FUEL_PRESSURE_HIGH@@;"bar",{1/@@PACK_MULT_HIGH_PRESSURE@@}, 0, 0, 0, 0
|
||||
|
|
|
@ -246,11 +246,10 @@ int CanStreamerState::sendDataTimeout(const uint8_t *txbuf, int numBytes, can_sy
|
|||
while (numBytes > 0) {
|
||||
int len = minI(numBytes, 7);
|
||||
// send the consecutive frames
|
||||
IsoTpFrameHeader header;
|
||||
header.frameType = ISO_TP_FRAME_CONSECUTIVE;
|
||||
header.index = ((idx++) & 0x0f);
|
||||
header.numBytes = len;
|
||||
int numSent = sendFrame(header, txbuf + offset, len, timeout);
|
||||
numSent = sendFrame(header, txbuf + offset, len, timeout);
|
||||
if (numSent < 1)
|
||||
break;
|
||||
totalNumSent += numSent;
|
||||
|
|
|
@ -104,8 +104,6 @@ static void printErrorCounters() {
|
|||
/* 10mS when receiving byte by byte */
|
||||
#define TS_COMMUNICATION_TIMEOUT_SHORT TIME_MS2I(10)
|
||||
|
||||
static efitimems_t previousWriteReportMs = 0;
|
||||
|
||||
static void resetTs() {
|
||||
memset(&tsState, 0, sizeof(tsState));
|
||||
}
|
||||
|
@ -274,12 +272,6 @@ void TunerStudio::handleWriteValueCommand(TsChannelBase* tsChannel, ts_response_
|
|||
return;
|
||||
}
|
||||
|
||||
efitimems_t nowMs = getTimeNowMs();
|
||||
if (nowMs - previousWriteReportMs > 5) {
|
||||
previousWriteReportMs = nowMs;
|
||||
efiPrintf("offset %d: value=%d", offset, value);
|
||||
}
|
||||
|
||||
// Skip the write if a preset was just loaded - we don't want to overwrite it
|
||||
if (!rebootForPresetPending) {
|
||||
getWorkingPageAddr()[offset] = value;
|
||||
|
|
|
@ -86,8 +86,8 @@ void TsChannelBase::writeCrcPacketLarge(const uint8_t responseCode, const uint8_
|
|||
flush();
|
||||
}
|
||||
|
||||
TsChannelBase::TsChannelBase(const char *name) {
|
||||
this->name = name;
|
||||
TsChannelBase::TsChannelBase(const char *p_name) {
|
||||
this->name = p_name;
|
||||
}
|
||||
|
||||
void TsChannelBase::assertPacketSize(size_t size, bool allowLongPackets) {
|
||||
|
|
|
@ -80,7 +80,7 @@ private:
|
|||
// This class represents a channel for a physical async serial poart
|
||||
class SerialTsChannelBase : public TsChannelBase {
|
||||
public:
|
||||
SerialTsChannelBase(const char *name) : TsChannelBase(name) {};
|
||||
SerialTsChannelBase(const char *p_name) : TsChannelBase(p_name) {};
|
||||
// Open the serial port with the specified baud rate
|
||||
virtual void start(uint32_t baud) = 0;
|
||||
};
|
||||
|
|
|
@ -43,13 +43,13 @@ void LogField::writeHeader(Writer& outBuffer) const {
|
|||
buffer[54] = m_digits;
|
||||
|
||||
// Offset 55, (optional) category string
|
||||
memset(&buffer[55], 0, 34);
|
||||
if (m_category) {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
// strncpy's exclusion of null terminator is correct and appropriate behavior for this field
|
||||
strncpy(&buffer[55], m_category, 34);
|
||||
#pragma GCC diagnostic pop
|
||||
size_t categoryLength = strlen(m_category);
|
||||
size_t lengthAfterCategory = 34 - categoryLength;
|
||||
memcpy(&buffer[55], m_category, categoryLength);
|
||||
memset(&buffer[55] + categoryLength, 0, lengthAfterCategory);
|
||||
} else {
|
||||
memset(&buffer[55], 0, 34);
|
||||
}
|
||||
|
||||
// Total size = 89
|
||||
|
|
|
@ -73,9 +73,9 @@ void UartDmaTsChannel::start(uint32_t baud) {
|
|||
uartStartReceive(m_driver, sizeof(dmaBuffer), dmaBuffer);
|
||||
}
|
||||
|
||||
size_t UartDmaTsChannel::readTimeout(uint8_t* buffer, size_t size, int timeout) {
|
||||
size_t UartDmaTsChannel::readTimeout(uint8_t* p_buffer, size_t size, int timeout) {
|
||||
// Instead of reading from the device, read from our custom RX queue
|
||||
size_t transferred = iqReadTimeout(&fifoRxQueue, buffer, size, timeout);
|
||||
size_t transferred = iqReadTimeout(&fifoRxQueue, p_buffer, size, timeout);
|
||||
bytesIn += transferred;
|
||||
return transferred;
|
||||
}
|
||||
|
|
|
@ -6,19 +6,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
typedef void (*CommandHandler)(char *);
|
||||
|
||||
#include "efifeatures.h"
|
||||
|
||||
void consoleOutputBuffer(const uint8_t *buf, int size);
|
||||
void startConsole(CommandHandler console_line_callback_p);
|
||||
void onDataArrived(bool valid);
|
||||
|
|
|
@ -58,18 +58,15 @@ static void sayHello() {
|
|||
uint32_t *uid = ((uint32_t *)UID_BASE);
|
||||
efiPrintf("UID=%x %x %x", uid[0], uid[1], uid[2]);
|
||||
|
||||
#if defined(STM32F4) && !defined(AT32F4XX)
|
||||
efiPrintf("can read 0x20000010 %d", ramReadProbe((const char *)0x20000010));
|
||||
efiPrintf("can read 0x20020010 %d", ramReadProbe((const char *)0x20020010));
|
||||
efiPrintf("can read 0x20070010 %d", ramReadProbe((const char *)0x20070010));
|
||||
|
||||
#if defined(STM32F4)
|
||||
efiPrintf("isStm32F42x %s", boolToString(isStm32F42x()));
|
||||
#endif // STM32F4
|
||||
|
||||
#define TM_ID_GetFlashSize() (*(__IO uint16_t *) (FLASHSIZE_BASE))
|
||||
#define MCU_REVISION_MASK 0xfff
|
||||
|
||||
int mcuRevision = DBGMCU->IDCODE & MCU_REVISION_MASK;
|
||||
|
||||
#ifndef MIN_FLASH_SIZE
|
||||
#define MIN_FLASH_SIZE 1024
|
||||
|
@ -77,16 +74,35 @@ static void sayHello() {
|
|||
|
||||
int flashSize = TM_ID_GetFlashSize();
|
||||
if (flashSize < MIN_FLASH_SIZE) {
|
||||
// todo: bug, at the moment we report 1MB on dual-bank F7
|
||||
criticalError("rusEFI expected at least %dK of flash", MIN_FLASH_SIZE);
|
||||
}
|
||||
|
||||
// todo: bug, at the moment we report 1MB on dual-bank F7
|
||||
#ifdef AT32F4XX
|
||||
int mcuRevision = DBGMCU->SERID & 0x07;
|
||||
int mcuSerId = (DBGMCU->SERID >> 8) & 0xff;
|
||||
const char *partNumber, *package;
|
||||
uint32_t pnFlashSize;
|
||||
int ret = at32GetMcuType(DBGMCU->IDCODE, &partNumber, &package, &pnFlashSize);
|
||||
if (ret == 0) {
|
||||
efiPrintf("MCU IDCODE %s in %s with %d KB flash",
|
||||
partNumber, package, pnFlashSize);
|
||||
} else {
|
||||
efiPrintf("MCU IDCODE unknown 0x%x", DBGMCU->IDCODE);
|
||||
}
|
||||
efiPrintf("MCU SER_ID %s rev %c",
|
||||
(mcuSerId == 0x0d) ? "AT32F435" : ((mcuSerId == 0x0e) ? "AT32F437" : "UNKNOWN"),
|
||||
'A' + mcuRevision);
|
||||
efiPrintf("MCU F_SIZE %d KB", flashSize);
|
||||
#else
|
||||
#define MCU_REVISION_MASK 0xfff
|
||||
int mcuRevision = DBGMCU->IDCODE & MCU_REVISION_MASK;
|
||||
efiPrintf("MCU rev=%x flashSize=%d", mcuRevision, flashSize);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CH_FREQUENCY
|
||||
efiPrintf("CH_FREQUENCY=%d", CH_FREQUENCY);
|
||||
#ifdef CH_CFG_ST_FREQUENCY
|
||||
efiPrintf("CH_CFG_ST_FREQUENCY=%d", CH_CFG_ST_FREQUENCY);
|
||||
#endif
|
||||
|
||||
#ifdef CORTEX_MAX_KERNEL_PRIORITY
|
||||
|
|
|
@ -386,6 +386,7 @@ static void updateTempSensors() {
|
|||
SensorResult oilTemp = Sensor::get(SensorType::OilTemperature);
|
||||
engine->outputChannels.oilTemp = oilTemp.value_or(0);
|
||||
|
||||
// see also updateFuelSensors()
|
||||
SensorResult fuelTemp = Sensor::get(SensorType::FuelTemperature);
|
||||
engine->outputChannels.fuelTemp = fuelTemp.value_or(0);
|
||||
|
||||
|
@ -486,9 +487,9 @@ static void updateRawSensors() {
|
|||
engine->outputChannels.luaGauges[1] = Sensor::getOrZero(SensorType::LuaGauge2);
|
||||
|
||||
for (int i = 0; i < LUA_ANALOG_INPUT_COUNT; i++) {
|
||||
adc_channel_e ch = engineConfiguration->auxAnalogInputs[i];
|
||||
if (isAdcChannelValid(ch)) {
|
||||
engine->outputChannels.rawAnalogInput[i] = getVoltageDivided("raw aux", ch);
|
||||
adc_channel_e channel = engineConfiguration->auxAnalogInputs[i];
|
||||
if (isAdcChannelValid(channel)) {
|
||||
engine->outputChannels.rawAnalogInput[i] = getVoltageDivided("raw aux", channel);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -605,11 +606,9 @@ void updateTunerStudioState() {
|
|||
tsOutputChannels->tsConfigVersion = TS_FILE_VERSION;
|
||||
static_assert(offsetof (TunerStudioOutputChannels, tsConfigVersion) == TS_FILE_VERSION_OFFSET);
|
||||
|
||||
DcHardware *getdcHardware();
|
||||
|
||||
DcHardware *dc = getdcHardware();
|
||||
engine->dc_motors.dcOutput0 = dc->dcMotor.get();
|
||||
engine->dc_motors.isEnabled0_int = dc->msg() == nullptr;
|
||||
DcHardware *dc = getdcHardware();
|
||||
engine->dc_motors.dcOutput0 = dc->dcMotor.get();
|
||||
engine->dc_motors.isEnabled0_int = dc->msg() == nullptr;
|
||||
|
||||
tsOutputChannels->RPMValue = rpm;
|
||||
#if EFI_SHAFT_POSITION_INPUT
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#if EFI_BOOST_CONTROL
|
||||
|
||||
#include "boost_control.h"
|
||||
#include "pid_auto_tune.h"
|
||||
#include "electronic_throttle.h"
|
||||
|
||||
#define NO_PIN_PERIOD 500
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
pinDir1,
|
||||
&m_pinDir1,
|
||||
clampedFrequency,
|
||||
0
|
||||
/*dutyCycle*/0
|
||||
);
|
||||
|
||||
startSimplePwmHard(&m_pwm2, "ETB Dir 2",
|
||||
|
@ -59,7 +59,7 @@
|
|||
pinDir2,
|
||||
&m_pinDir2,
|
||||
clampedFrequency,
|
||||
0
|
||||
/*dutyCycle*/0
|
||||
);
|
||||
#endif // EFI_UNIT_TEST
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
|||
pinEnable,
|
||||
&m_pinEnable,
|
||||
clampedFrequency,
|
||||
0
|
||||
/*dutyCycle*/0
|
||||
);
|
||||
#endif // EFI_UNIT_TEST
|
||||
|
||||
|
@ -86,7 +86,7 @@
|
|||
static DcHardware dcHardware[ETB_COUNT + DC_PER_STEPPER];
|
||||
|
||||
DcHardware *getdcHardware() {
|
||||
return &dcHardware[0];
|
||||
return &dcHardware[0];
|
||||
}
|
||||
|
||||
DcMotor* initDcMotor(const char *disPinMsg,const dc_io& io, size_t index, bool useTwoWires) {
|
||||
|
|
|
@ -68,11 +68,12 @@ public:
|
|||
}
|
||||
|
||||
const char *msg() {
|
||||
return dcMotor.msg;
|
||||
return dcMotor.msg();
|
||||
}
|
||||
|
||||
void stop() {
|
||||
// todo: replace 'isStarted' with 'stop'
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
DcHardware *getdcHardware();
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
|
||||
#include "dc_motor.h"
|
||||
#include "dc_motors.h"
|
||||
#include "pid_auto_tune.h"
|
||||
#include "defaults.h"
|
||||
|
||||
#if defined(HAS_OS_ACCESS)
|
||||
|
@ -86,7 +85,7 @@ constexpr float etbPeriodSeconds = 1.0f / ETB_LOOP_FREQUENCY;
|
|||
|
||||
//static bool startupPositionError = false;
|
||||
|
||||
#define STARTUP_NEUTRAL_POSITION_ERROR_THRESHOLD 5
|
||||
//#define STARTUP_NEUTRAL_POSITION_ERROR_THRESHOLD 5
|
||||
|
||||
static const float hardCodedetbHitachiBiasBins[8] = {0.0, 19.0, 21.0, 22.0, 23.0, 25.0, 30.0, 100.0};
|
||||
|
||||
|
@ -551,7 +550,7 @@ void EtbController::setOutput(expected<percent_t> outputValue) {
|
|||
m_motor->set(ETB_PERCENT_TO_DUTY(outputValue.Value));
|
||||
} else {
|
||||
// Otherwise disable the motor.
|
||||
m_motor->disable("setOutput");
|
||||
m_motor->disable("no-ETB");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -878,42 +877,6 @@ static void etbReset() {
|
|||
}
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
/**
|
||||
* set etb_p X
|
||||
*/
|
||||
void setEtbPFactor(float value) {
|
||||
engineConfiguration->etb.pFactor = value;
|
||||
etbPidReset();
|
||||
showEtbInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* set etb_i X
|
||||
*/
|
||||
void setEtbIFactor(float value) {
|
||||
engineConfiguration->etb.iFactor = value;
|
||||
etbPidReset();
|
||||
showEtbInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* set etb_d X
|
||||
*/
|
||||
void setEtbDFactor(float value) {
|
||||
engineConfiguration->etb.dFactor = value;
|
||||
etbPidReset();
|
||||
showEtbInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* set etb_o X
|
||||
*/
|
||||
void setEtbOffset(int value) {
|
||||
engineConfiguration->etb.offset = value;
|
||||
etbPidReset();
|
||||
showEtbInfo();
|
||||
}
|
||||
|
||||
void etbAutocal(size_t throttleIndex) {
|
||||
if (throttleIndex >= ETB_COUNT) {
|
||||
return;
|
||||
|
|
|
@ -28,10 +28,6 @@ void setBoschVAGETB();
|
|||
void setDefaultEtbBiasCurve();
|
||||
void setDefaultEtbParameters();
|
||||
void setBoschVNH2SP30Curve();
|
||||
void setEtbPFactor(float value);
|
||||
void setEtbIFactor(float value);
|
||||
void setEtbDFactor(float value);
|
||||
void setEtbOffset(int value);
|
||||
void setThrottleDutyCycle(percent_t level);
|
||||
void onConfigurationChangeElectronicThrottleCallback(engine_configuration_s *previousConfiguration);
|
||||
void unregisterEtbPins();
|
||||
|
|
|
@ -109,12 +109,12 @@ float GppwmChannel::setOutput(float result) {
|
|||
}
|
||||
}
|
||||
|
||||
void GppwmChannel::init(bool usePwm, IPwm* pwm, OutputPin* outputPin, const ValueProvider3D* table, const gppwm_channel* config) {
|
||||
void GppwmChannel::init(bool usePwm, IPwm* pwm, OutputPin* outputPin, const ValueProvider3D* table, const gppwm_channel* p_config) {
|
||||
m_usePwm = usePwm;
|
||||
m_pwm = pwm;
|
||||
m_output = outputPin;
|
||||
m_table = table;
|
||||
m_config = config;
|
||||
m_config = p_config;
|
||||
}
|
||||
|
||||
GppwmResult GppwmChannel::getOutput() const {
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
|
||||
#include "pch.h"
|
||||
|
||||
#if EFI_HD_ACR
|
||||
|
||||
static bool getAcrState() {
|
||||
#if EFI_SHAFT_POSITION_INPUT
|
||||
auto currentPhase = getTriggerCentral()->getCurrentEnginePhase(getTimeNowNt());
|
||||
if (!currentPhase) {
|
||||
return false;
|
||||
|
@ -40,9 +41,6 @@ static bool getAcrState() {
|
|||
// ACR active - not enough revs completed
|
||||
return true;
|
||||
}
|
||||
#else // EFI_SHAFT_POSITION_INPUT
|
||||
return false;
|
||||
#endif // EFI_SHAFT_POSITION_INPUT
|
||||
}
|
||||
|
||||
void HarleyAcr::onSlowCallback() {
|
||||
|
@ -62,3 +60,5 @@ void HarleyAcr::onSlowCallback() {
|
|||
bool HarleyAcr::isActive() const {
|
||||
return m_active;
|
||||
}
|
||||
|
||||
#endif // EFI_HD_ACR
|
||||
|
|
|
@ -344,8 +344,6 @@ float IdleController::getIdlePosition(float rpm) {
|
|||
auto phase = determinePhase(rpm, targetRpm, tps, vehicleSpeed, crankingTaper);
|
||||
m_lastPhase = phase;
|
||||
|
||||
bool isAutomaticIdle = tps.Valid && engineConfiguration->idleMode == IM_AUTO;
|
||||
|
||||
finishIdleTestIfNeeded();
|
||||
undoIdleBlipIfNeeded();
|
||||
|
||||
|
|
|
@ -113,9 +113,6 @@ void setManualIdleValvePosition(int positionPercent);
|
|||
void startIdleThread();
|
||||
void setDefaultIdleParameters();
|
||||
void startIdleBench(void);
|
||||
void setIdlePFactor(float value);
|
||||
void setIdleIFactor(float value);
|
||||
void setIdleDFactor(float value);
|
||||
void setIdleMode(idle_mode_e value);
|
||||
void setTargetIdleRpm(int value);
|
||||
void startPedalPins();
|
||||
|
|
|
@ -28,66 +28,14 @@
|
|||
#include "dc_motors.h"
|
||||
#include "idle_hardware.h"
|
||||
|
||||
static void showIdleInfo() {
|
||||
const char * idleModeStr = getIdle_mode_e(engineConfiguration->idleMode);
|
||||
efiPrintf("useStepperIdle=%s useHbridges=%s useRawOutput=%s",
|
||||
boolToString(engineConfiguration->useStepperIdle),
|
||||
boolToString(engineConfiguration->useHbridgesToDriveIdleStepper),
|
||||
boolToString(engineConfiguration->useRawOutputToDriveIdleStepper));
|
||||
efiPrintf("idleMode=%s position=%.2f",
|
||||
idleModeStr, getIdlePosition());
|
||||
|
||||
if (engineConfiguration->useStepperIdle) {
|
||||
if (engineConfiguration->useRawOutputToDriveIdleStepper) {
|
||||
efiPrintf(" A+=%s", hwPortname(engineConfiguration->stepper_raw_output[0]));
|
||||
efiPrintf(" A-=%s", hwPortname(engineConfiguration->stepper_raw_output[1]));
|
||||
efiPrintf(" B+=%s", hwPortname(engineConfiguration->stepper_raw_output[2]));
|
||||
efiPrintf(" B-=%s", hwPortname(engineConfiguration->stepper_raw_output[3]));
|
||||
} else if (engineConfiguration->useHbridgesToDriveIdleStepper) {
|
||||
efiPrintf("Coil A:");
|
||||
efiPrintf(" pin1=%s", hwPortname(engineConfiguration->stepperDcIo[0].directionPin1));
|
||||
efiPrintf(" pin2=%s", hwPortname(engineConfiguration->stepperDcIo[0].directionPin2));
|
||||
showDcMotorInfo(2);
|
||||
efiPrintf("Coil B:");
|
||||
efiPrintf(" pin1=%s", hwPortname(engineConfiguration->stepperDcIo[1].directionPin1));
|
||||
efiPrintf(" pin2=%s", hwPortname(engineConfiguration->stepperDcIo[1].directionPin2));
|
||||
showDcMotorInfo(3);
|
||||
} else {
|
||||
efiPrintf("directionPin=%s reactionTime=%.2f", hwPortname(engineConfiguration->idle.stepperDirectionPin),
|
||||
engineConfiguration->idleStepperReactionTime);
|
||||
efiPrintf("stepPin=%s steps=%d", hwPortname(engineConfiguration->idle.stepperStepPin),
|
||||
engineConfiguration->idleStepperTotalSteps);
|
||||
efiPrintf("enablePin=%s/%d", hwPortname(engineConfiguration->stepperEnablePin),
|
||||
engineConfiguration->stepperEnablePinMode);
|
||||
}
|
||||
} else {
|
||||
if (!engineConfiguration->isDoubleSolenoidIdle) {
|
||||
efiPrintf("idle valve freq=%d on %s", engineConfiguration->idle.solenoidFrequency,
|
||||
hwPortname(engineConfiguration->idle.solenoidPin));
|
||||
} else {
|
||||
efiPrintf("idle valve freq=%d on %s", engineConfiguration->idle.solenoidFrequency,
|
||||
hwPortname(engineConfiguration->idle.solenoidPin));
|
||||
efiPrintf(" and %s", hwPortname(engineConfiguration->secondSolenoidPin));
|
||||
}
|
||||
}
|
||||
|
||||
#if EFI_IDLE_CONTROL
|
||||
if (engineConfiguration->idleMode == IM_AUTO) {
|
||||
engine->module<IdleController>().unmock().getIdlePid()->showPidStatus("idle");
|
||||
}
|
||||
#endif // EFI_IDLE_CONTROL
|
||||
}
|
||||
|
||||
void setIdleMode(idle_mode_e value) {
|
||||
engineConfiguration->idleMode = value ? IM_AUTO : IM_MANUAL;
|
||||
showIdleInfo();
|
||||
}
|
||||
|
||||
void setManualIdleValvePosition(int positionPercent) {
|
||||
if (positionPercent < 1 || positionPercent > 99)
|
||||
return;
|
||||
efiPrintf("setting idle valve position %d", positionPercent);
|
||||
showIdleInfo();
|
||||
// todo: this is not great that we have to write into configuration here
|
||||
engineConfiguration->manIdlePosition = positionPercent;
|
||||
}
|
||||
|
@ -144,25 +92,6 @@ static void applyPidSettings() {
|
|||
void setTargetIdleRpm(int value) {
|
||||
setTargetRpmCurve(value);
|
||||
efiPrintf("target idle RPM %d", value);
|
||||
showIdleInfo();
|
||||
}
|
||||
|
||||
void setIdlePFactor(float value) {
|
||||
engineConfiguration->idleRpmPid.pFactor = value;
|
||||
applyPidSettings();
|
||||
showIdleInfo();
|
||||
}
|
||||
|
||||
void setIdleIFactor(float value) {
|
||||
engineConfiguration->idleRpmPid.iFactor = value;
|
||||
applyPidSettings();
|
||||
showIdleInfo();
|
||||
}
|
||||
|
||||
void setIdleDFactor(float value) {
|
||||
engineConfiguration->idleRpmPid.dFactor = value;
|
||||
applyPidSettings();
|
||||
showIdleInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -171,7 +100,6 @@ void setIdleDFactor(float value) {
|
|||
void startIdleBench(void) {
|
||||
engine->timeToStopIdleTest = getTimeNowUs() + MS2US(3000); // 3 seconds
|
||||
efiPrintf("idle valve bench test");
|
||||
showIdleInfo();
|
||||
}
|
||||
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
@ -235,8 +163,6 @@ void startIdleThread() {
|
|||
|
||||
#if ! EFI_UNIT_TEST
|
||||
|
||||
addConsoleAction("idleinfo", showIdleInfo);
|
||||
|
||||
addConsoleActionII("blipidle", blipIdle);
|
||||
|
||||
// split this whole file into manual controller and auto controller? move these commands into the file
|
||||
|
|
|
@ -18,10 +18,10 @@ using vvt_map_t = Map3D<SCRIPT_TABLE_8, SCRIPT_TABLE_8, int8_t, uint16_t, uint16
|
|||
static vvt_map_t vvtTable1;
|
||||
static vvt_map_t vvtTable2;
|
||||
|
||||
VvtController::VvtController(int index)
|
||||
: index(index)
|
||||
, m_bank(BANK_BY_INDEX(index))
|
||||
, m_cam(CAM_BY_INDEX(index))
|
||||
VvtController::VvtController(int p_index)
|
||||
: index(p_index)
|
||||
, m_bank(BANK_BY_INDEX(p_index))
|
||||
, m_cam(CAM_BY_INDEX(p_index))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "periodic_task.h"
|
||||
#include "closed_loop_controller.h"
|
||||
#include "pwm_generator_logic.h"
|
||||
#include "efi_pid.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "rusefi_enums.h"
|
||||
// was generated automatically by rusEFI tool from rusefi_enums.h // by enum_to_string.jar tool on Thu Sep 14 21:43:52 UTC 2023
|
||||
// was generated automatically by rusEFI tool from rusefi_enums.h // by enum_to_string.jar tool on Wed Nov 01 21:34:20 UTC 2023
|
||||
// see also gen_config_and_enums.bat
|
||||
|
||||
|
||||
|
@ -49,36 +49,6 @@ case INJ_PolynomialAdder:
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getPidAutoTune_AutoTunerState(PidAutoTune_AutoTunerState value){
|
||||
switch(value) {
|
||||
case AUTOTUNER_OFF:
|
||||
return "AUTOTUNER_OFF";
|
||||
case CONVERGED:
|
||||
return "CONVERGED";
|
||||
case FAILED:
|
||||
return "FAILED";
|
||||
case RELAY_STEP_DOWN:
|
||||
return "RELAY_STEP_DOWN";
|
||||
case RELAY_STEP_UP:
|
||||
return "RELAY_STEP_UP";
|
||||
case STEADY_STATE_AFTER_STEP_UP:
|
||||
return "STEADY_STATE_AFTER_STEP_UP";
|
||||
case STEADY_STATE_AT_BASELINE:
|
||||
return "STEADY_STATE_AT_BASELINE";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getPidAutoTune_Peak(PidAutoTune_Peak value){
|
||||
switch(value) {
|
||||
case MAXIMUM:
|
||||
return "MAXIMUM";
|
||||
case MINIMUM:
|
||||
return "MINIMUM";
|
||||
case NOT_A_PEAK:
|
||||
return "NOT_A_PEAK";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getSelectedGear(SelectedGear value){
|
||||
switch(value) {
|
||||
case SelectedGear::Drive:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Sun Apr 30 04:02:03 UTC 2023
|
||||
// was generated automatically by rusEFI tool from rusefi_enums.h // by enum_to_string.jar tool on Wed Nov 01 21:34:20 UTC 2023
|
||||
// see also gen_config_and_enums.bat
|
||||
|
||||
|
||||
|
@ -15,8 +15,6 @@ const char *getGearControllerMode(GearControllerMode value);
|
|||
const char *getInjectionTimingMode(InjectionTimingMode value);
|
||||
#endif //__cplusplus
|
||||
const char *getInjectorNonlinearMode(InjectorNonlinearMode value);
|
||||
const char *getPidAutoTune_AutoTunerState(PidAutoTune_AutoTunerState value);
|
||||
const char *getPidAutoTune_Peak(PidAutoTune_Peak value);
|
||||
#if __cplusplus
|
||||
const char *getSelectedGear(SelectedGear value);
|
||||
#endif //__cplusplus
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "engine_types.h"
|
||||
// was generated automatically by rusEFI tool from engine_types.h // by enum_to_string.jar tool on Sat Oct 21 22:16:59 UTC 2023
|
||||
// was generated automatically by rusEFI tool from engine_types.h // by enum_to_string.jar tool on Tue Oct 31 06:12:38 UTC 2023
|
||||
// see also gen_config_and_enums.bat
|
||||
|
||||
|
||||
|
@ -63,6 +63,10 @@ case BENCH_VVT2_VALVE:
|
|||
return "BENCH_VVT2_VALVE";
|
||||
case BENCH_VVT3_VALVE:
|
||||
return "BENCH_VVT3_VALVE";
|
||||
case HD_ACR:
|
||||
return "HD_ACR";
|
||||
case HD_ACR2:
|
||||
return "HD_ACR2";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -188,6 +188,8 @@ void setDefaultBaseEngine() {
|
|||
engineConfiguration->stepperForceParkingEveryRestart = true;
|
||||
engineConfiguration->iacByTpsTaper = 2;
|
||||
|
||||
engineConfiguration->etbSplit = MAX_TPS_PPS_DISCREPANCY;
|
||||
|
||||
// Advanced Trigger
|
||||
|
||||
// Battery and alternator
|
||||
|
|
|
@ -19,4 +19,9 @@ void setTPS1Calibration(uint16_t tpsMin, uint16_t tpsMax);
|
|||
// Most ETB require redundant dual channel TPS
|
||||
void setTPS1Calibration(uint16_t tpsMin, uint16_t tpsMax, uint16_t tps1SecondaryMin, uint16_t tps1SecondaryMax);
|
||||
|
||||
void setEtbPID(float p, float i, float d);
|
||||
void setEtbPID(float p, float i, float d);
|
||||
|
||||
// split threshold
|
||||
#ifndef MAX_TPS_PPS_DISCREPANCY
|
||||
#define MAX_TPS_PPS_DISCREPANCY 5.0f
|
||||
#endif
|
||||
|
|
|
@ -456,9 +456,9 @@ todo: move to shutdown_controller.cpp
|
|||
*/
|
||||
|
||||
// here we are in the shutdown (the ignition is off) or initial mode (after the firmware fresh start)
|
||||
/* this needs work or tests
|
||||
const efitick_t engineStopWaitTimeoutUs = 500000LL; // 0.5 sec
|
||||
// in shutdown mode, we need a small cooldown time between the ignition off and on
|
||||
/* this needs work or tests
|
||||
todo: move to shutdown_controller.cpp
|
||||
if (stopEngineRequestTimeNt == 0 || (getTimeNowNt() - stopEngineRequestTimeNt) > US2NT(engineStopWaitTimeoutUs)) {
|
||||
// if the ignition key is turned on again,
|
||||
|
|
|
@ -153,7 +153,9 @@ public:
|
|||
FanControl2,
|
||||
PrimeController,
|
||||
DfcoController,
|
||||
#if EFI_HD_ACR
|
||||
HarleyAcr,
|
||||
#endif // EFI_HD_ACR
|
||||
Mockable<WallFuelController>,
|
||||
#if EFI_VEHICLE_SPEED
|
||||
GearDetector,
|
||||
|
|
|
@ -126,7 +126,7 @@ void EngineState::periodicFastCallback() {
|
|||
);
|
||||
// for compatibility reasons, apply only if the factor is greater than unity (only allow adding fuel)
|
||||
// if the engine run time is past the last bin, disable ASE in case the table is filled with values more than 1.0, helps with compatibility
|
||||
if ((m_postCrankingFactor < 1.0f) || (engine->fuelComputer.running.timeSinceCrankingInSecs > engineConfiguration->postCrankingDurationBins[efi::size(engineConfiguration->postCrankingDurationBins)-1])) {
|
||||
if ((m_postCrankingFactor < 1.0f) || (engine->rpmCalculator.getRevolutionCounterSinceStart() > engineConfiguration->postCrankingDurationBins[efi::size(engineConfiguration->postCrankingDurationBins)-1])) {
|
||||
m_postCrankingFactor = 1.0f;
|
||||
}
|
||||
engine->fuelComputer.running.postCrankingFuelCorrection = m_postCrankingFactor;
|
||||
|
@ -138,18 +138,18 @@ void EngineState::periodicFastCallback() {
|
|||
auto tps = Sensor::get(SensorType::Tps1);
|
||||
updateTChargeK(rpm, tps.value_or(0));
|
||||
|
||||
float injectionMass = getInjectionMass(rpm) * engine->engineState.lua.fuelMult + engine->engineState.lua.fuelAdd;
|
||||
float untrimmedInjectionMass = getInjectionMass(rpm) * engine->engineState.lua.fuelMult + engine->engineState.lua.fuelAdd;
|
||||
auto clResult = fuelClosedLoopCorrection();
|
||||
|
||||
// Store the pre-wall wetting injection duration for scheduling purposes only, not the actual injection duration
|
||||
engine->engineState.injectionDuration = engine->module<InjectorModel>()->getInjectionDuration(injectionMass);
|
||||
engine->engineState.injectionDuration = engine->module<InjectorModel>()->getInjectionDuration(untrimmedInjectionMass);
|
||||
|
||||
float fuelLoad = getFuelingLoad();
|
||||
injectionOffset = getInjectionOffset(rpm, fuelLoad);
|
||||
engine->lambdaMonitor.update(rpm, fuelLoad);
|
||||
|
||||
float ignitionLoad = getIgnitionLoad();
|
||||
float baseAdvance = getAdvance(rpm, ignitionLoad) * engine->ignitionState.luaTimingMult + engine->ignitionState.luaTimingAdd;
|
||||
float l_ignitionLoad = getIgnitionLoad();
|
||||
float baseAdvance = getAdvance(rpm, l_ignitionLoad) * engine->ignitionState.luaTimingMult + engine->ignitionState.luaTimingAdd;
|
||||
float correctedIgnitionAdvance = baseAdvance
|
||||
// Pull any extra timing for knock retard
|
||||
- engine->module<KnockController>()->getKnockRetard()
|
||||
|
@ -173,9 +173,9 @@ void EngineState::periodicFastCallback() {
|
|||
auto cylinderTrim = getCylinderFuelTrim(i, rpm, fuelLoad);
|
||||
|
||||
// Apply both per-bank and per-cylinder trims
|
||||
engine->engineState.injectionMass[i] = injectionMass * bankTrim * cylinderTrim;
|
||||
engine->engineState.injectionMass[i] = untrimmedInjectionMass * bankTrim * cylinderTrim;
|
||||
|
||||
timingAdvance[i] = correctedIgnitionAdvance + getCombinedCylinderIgnitionTrim(i, rpm, ignitionLoad);
|
||||
timingAdvance[i] = correctedIgnitionAdvance + getCombinedCylinderIgnitionTrim(i, rpm, l_ignitionLoad);
|
||||
}
|
||||
|
||||
shouldUpdateInjectionTiming = getInjectorDutyCycle(rpm) < 90;
|
||||
|
|
|
@ -250,13 +250,13 @@ static void initTemperatureCurve(float *bins, float *values, int size, float def
|
|||
}
|
||||
}
|
||||
|
||||
void prepareVoidConfiguration(engine_configuration_s *engineConfiguration) {
|
||||
criticalAssertVoid(engineConfiguration != NULL, "ec NULL");
|
||||
efi::clear(engineConfiguration);
|
||||
void prepareVoidConfiguration(engine_configuration_s *p_engineConfiguration) {
|
||||
criticalAssertVoid(p_engineConfiguration != NULL, "ec NULL");
|
||||
efi::clear(p_engineConfiguration);
|
||||
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLUP;
|
||||
engineConfiguration->clutchUpPinMode = PI_PULLUP;
|
||||
engineConfiguration->brakePedalPinMode = PI_PULLUP;
|
||||
p_engineConfiguration->clutchDownPinMode = PI_PULLUP;
|
||||
p_engineConfiguration->clutchUpPinMode = PI_PULLUP;
|
||||
p_engineConfiguration->brakePedalPinMode = PI_PULLUP;
|
||||
}
|
||||
|
||||
void setDefaultBasePins() {
|
||||
|
@ -421,7 +421,7 @@ static void setDefaultEngineConfiguration() {
|
|||
engineConfiguration->can2BaudRate = B500KBPS;
|
||||
|
||||
engineConfiguration->mafSensorType = Bosch0280218037;
|
||||
setBosch0280218037(config);
|
||||
setBosch0280218037();
|
||||
|
||||
engineConfiguration->canSleepPeriodMs = 50;
|
||||
engineConfiguration->canReadEnabled = true;
|
||||
|
@ -878,6 +878,9 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
|
|||
#endif
|
||||
|
||||
#if HW_HELLEN
|
||||
case engine_type_e::TOYOTA_1NZ_FE:
|
||||
setToyota1NZFE();
|
||||
break;
|
||||
case engine_type_e::HELLEN_NA8_96:
|
||||
setHellenMiata96();
|
||||
break;
|
||||
|
@ -952,9 +955,6 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
|
|||
case engine_type_e::MITSUBISHI_3A92:
|
||||
setMitsubishi3A92();
|
||||
break;
|
||||
case engine_type_e::TOYOTA_1NZ_FE:
|
||||
setToyota1NZFE();
|
||||
break;
|
||||
case engine_type_e::MITSUBISHI_4G93:
|
||||
setMitsubishi4G93();
|
||||
break;
|
||||
|
@ -1024,8 +1024,8 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
|
|||
applyNonPersistentConfiguration();
|
||||
}
|
||||
|
||||
void emptyCallbackWithConfiguration(engine_configuration_s * engineConfiguration) {
|
||||
UNUSED(engineConfiguration);
|
||||
void emptyCallbackWithConfiguration(engine_configuration_s * p_engineConfiguration) {
|
||||
UNUSED(p_engineConfiguration);
|
||||
}
|
||||
|
||||
void resetConfigurationExt(engine_type_e engineType) {
|
||||
|
@ -1079,3 +1079,4 @@ BOARD_WEAK int getBoardMetaOutputsCount() { return 0; }
|
|||
// default implementation: treat all outputs as low side
|
||||
BOARD_WEAK int getBoardMetaLowSideOutputsCount() { return getBoardMetaOutputsCount(); }
|
||||
BOARD_WEAK Gpio* getBoardMetaOutputs() { return nullptr; }
|
||||
BOARD_WEAK int getBoardMetaDcOutputsCount() { return 0; }
|
||||
|
|
|
@ -107,3 +107,4 @@ extern bool isActiveConfigurationVoid;
|
|||
int getBoardMetaOutputsCount();
|
||||
int getBoardMetaLowSideOutputsCount();
|
||||
Gpio* getBoardMetaOutputs();
|
||||
int getBoardMetaDcOutputsCount();
|
||||
|
|
|
@ -513,4 +513,6 @@ typedef enum {
|
|||
BENCH_AUXOUT5,
|
||||
BENCH_AUXOUT6,
|
||||
BENCH_AUXOUT7,
|
||||
HD_ACR,
|
||||
HD_ACR2,
|
||||
} bench_mode_e;
|
||||
|
|
|
@ -23,8 +23,8 @@ struct AngleBasedEvent {
|
|||
|
||||
angle_t enginePhase;
|
||||
|
||||
void setAngle(angle_t enginePhase) {
|
||||
this->enginePhase = enginePhase;
|
||||
void setAngle(angle_t p_enginePhase) {
|
||||
enginePhase = p_enginePhase;
|
||||
}
|
||||
|
||||
bool shouldSchedule(float currentPhase, float nextPhase) const;
|
||||
|
|
|
@ -138,15 +138,15 @@ bool LaunchControlBase::isLaunchFuelRpmRetardCondition() const {
|
|||
return isLaunchRpmRetardCondition() && engineConfiguration->launchFuelCutEnable;
|
||||
}
|
||||
|
||||
SoftSparkLimiter::SoftSparkLimiter(bool allowHardCut) {
|
||||
this->allowHardCut = allowHardCut;
|
||||
SoftSparkLimiter::SoftSparkLimiter(bool p_allowHardCut) {
|
||||
this->allowHardCut = p_allowHardCut;
|
||||
#if EFI_UNIT_TEST
|
||||
initLaunchControl();
|
||||
#endif // EFI_UNIT_TEST
|
||||
}
|
||||
|
||||
void SoftSparkLimiter::setTargetSkipRatio(float targetSkipRatio) {
|
||||
this->targetSkipRatio = targetSkipRatio;
|
||||
void SoftSparkLimiter::setTargetSkipRatio(float p_targetSkipRatio) {
|
||||
this->targetSkipRatio = p_targetSkipRatio;
|
||||
}
|
||||
|
||||
static tinymt32_t tinymt;
|
||||
|
|
|
@ -13,5 +13,5 @@ typedef struct {
|
|||
int version;
|
||||
int size;
|
||||
persistent_config_s persistentConfiguration;
|
||||
uint32_t value;
|
||||
uint32_t crc;
|
||||
} persistent_config_container_s;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <rusefi/true_false.h>
|
||||
#include "efifeatures.h"
|
||||
#include "obd_error_codes.h"
|
||||
#include "live_data_ids.h"
|
||||
|
@ -516,24 +517,6 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
|
||||
} tChargeMode_e;
|
||||
|
||||
// peak type
|
||||
typedef enum {
|
||||
MINIMUM = -1,
|
||||
NOT_A_PEAK = 0,
|
||||
MAXIMUM = 1
|
||||
} PidAutoTune_Peak;
|
||||
|
||||
// auto tuner state
|
||||
typedef enum {
|
||||
AUTOTUNER_OFF = 0,
|
||||
STEADY_STATE_AT_BASELINE = 1,
|
||||
STEADY_STATE_AFTER_STEP_UP = 2,
|
||||
RELAY_STEP_UP = 4,
|
||||
RELAY_STEP_DOWN = 8,
|
||||
CONVERGED = 16,
|
||||
FAILED = 128
|
||||
} PidAutoTune_AutoTunerState;
|
||||
|
||||
typedef enum __attribute__ ((__packed__)) {
|
||||
INIT = 0,
|
||||
TPS_THRESHOLD = 1,
|
||||
|
|
|
@ -137,23 +137,23 @@ static void runBench(OutputPin *output, float onTimeMs, float offTimeMs, int cou
|
|||
// todo: migrate to smarter getOutputOnTheBenchTest() approach?
|
||||
static volatile bool isBenchTestPending = false;
|
||||
static bool widebandUpdatePending = false;
|
||||
static float onTimeMs;
|
||||
static float offTimeMs;
|
||||
static int count;
|
||||
static float globalOnTimeMs;
|
||||
static float globalOffTimeMs;
|
||||
static int globalCount;
|
||||
static OutputPin* pinX;
|
||||
static bool swapOnOff = false;
|
||||
|
||||
static chibios_rt::CounterSemaphore benchSemaphore(0);
|
||||
|
||||
static void pinbench(float p_ontimeMs, float p_offtimeMs, int iterations,
|
||||
static void pinbench(float ontimeMs, float offtimeMs, int iterations,
|
||||
OutputPin* pinParam, bool p_swapOnOff = false)
|
||||
{
|
||||
onTimeMs = p_ontimeMs;
|
||||
offTimeMs = p_offtimeMs;
|
||||
globalOnTimeMs = ontimeMs;
|
||||
globalOffTimeMs = offtimeMs;
|
||||
#if EFI_SIMULATOR
|
||||
count = maxI(2, iterations);
|
||||
globalCount = maxI(2, iterations);
|
||||
#else
|
||||
count = iterations;
|
||||
globalCount = iterations;
|
||||
#endif // EFI_SIMULATOR
|
||||
pinX = pinParam;
|
||||
swapOnOff = p_swapOnOff;
|
||||
|
@ -313,7 +313,7 @@ private:
|
|||
|
||||
if (isBenchTestPending) {
|
||||
isBenchTestPending = false;
|
||||
runBench(pinX, onTimeMs, offTimeMs, count, swapOnOff);
|
||||
runBench(pinX, globalOnTimeMs, globalOffTimeMs, globalCount, swapOnOff);
|
||||
}
|
||||
|
||||
if (widebandUpdatePending) {
|
||||
|
@ -332,6 +332,13 @@ static void auxOutBench(int index) {
|
|||
// todo!
|
||||
}
|
||||
|
||||
#if EFI_HD_ACR
|
||||
static void hdAcrBench(int index) {
|
||||
OutputPin* pin = index == 0 ? &enginePins.harleyAcr : &enginePins.harleyAcr2;
|
||||
pinbench(BENCH_AC_RELAY_DURATION, 100.0, 1, pin);
|
||||
}
|
||||
#endif // EFI_HD_ACR
|
||||
|
||||
void handleBenchCategory(uint16_t index) {
|
||||
switch(index) {
|
||||
case BENCH_VVT0_VALVE:
|
||||
|
@ -370,6 +377,14 @@ void handleBenchCategory(uint16_t index) {
|
|||
case BENCH_AUXOUT7:
|
||||
auxOutBench(7);
|
||||
return;
|
||||
#if EFI_HD_ACR
|
||||
case HD_ACR:
|
||||
hdAcrBench(0);
|
||||
return;
|
||||
case HD_ACR2:
|
||||
hdAcrBench(1);
|
||||
return;
|
||||
#endif // EFI_HD_ACR
|
||||
case BENCH_HPFP_VALVE:
|
||||
hpfpValveBench();
|
||||
return;
|
||||
|
|
|
@ -21,6 +21,13 @@ bool qcDirectPinControlMode = false;
|
|||
|
||||
#if EFI_CAN_SUPPORT
|
||||
|
||||
static void directWritePad(Gpio pin, int value) {
|
||||
#if EFI_GPIO_HARDWARE && EFI_PROD_CODE
|
||||
palWritePad(getHwPort("can_write", pin), getHwPin("can_write", pin), value);
|
||||
// todo: add smart chip support support
|
||||
#endif // EFI_GPIO_HARDWARE && EFI_PROD_CODE
|
||||
}
|
||||
|
||||
static void setPin(const CANRxFrame& frame, int value) {
|
||||
int outputIndex = frame.data8[2];
|
||||
if (outputIndex >= getBoardMetaOutputsCount())
|
||||
|
@ -34,8 +41,7 @@ static void setPin(const CANRxFrame& frame, int value) {
|
|||
efiSetPadModeWithoutOwnershipAcquisition("QC_SET", pin, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
}
|
||||
|
||||
palWritePad(getHwPort("can_write", pin), getHwPin("can_write", pin), value);
|
||||
// todo: add smart chip support support
|
||||
directWritePad(pin, value);
|
||||
#endif // EFI_GPIO_HARDWARE && EFI_PROD_CODE
|
||||
}
|
||||
|
||||
|
@ -103,13 +109,13 @@ void sendRawAnalogValues() {
|
|||
// send the first packet
|
||||
{
|
||||
CanTxMessage msg(CanCategory::BENCH_TEST, (int)bench_test_packet_ids_e::RAW_ANALOG_1, 8, /*bus*/0, /*isExtended*/true);
|
||||
for (int valueIdx = 0; valueIdx < efi::size(values_1); valueIdx++) {
|
||||
for (size_t valueIdx = 0; valueIdx < efi::size(values_1); valueIdx++) {
|
||||
msg[valueIdx] = RAW_TO_BYTE(values_1[valueIdx]);
|
||||
}
|
||||
}
|
||||
{
|
||||
CanTxMessage msg(CanCategory::BENCH_TEST, (int)bench_test_packet_ids_e::RAW_ANALOG_2, 8, /*bus*/0, /*isExtended*/true);
|
||||
for (int valueIdx = 0; valueIdx < efi::size(values_2); valueIdx++) {
|
||||
for (size_t valueIdx = 0; valueIdx < efi::size(values_2); valueIdx++) {
|
||||
msg[valueIdx] = RAW_TO_BYTE(values_2[valueIdx]);
|
||||
}
|
||||
}
|
||||
|
@ -122,6 +128,7 @@ static void sendOutBoardMeta() {
|
|||
msg[1] = 0;
|
||||
msg[2] = getBoardMetaOutputsCount();
|
||||
msg[3] = getBoardMetaLowSideOutputsCount();
|
||||
msg[4] = getBoardMetaDcOutputsCount();
|
||||
#endif // EFI_PROD_CODE
|
||||
}
|
||||
|
||||
|
@ -191,35 +198,44 @@ void processCanBenchTest(const CANRxFrame& frame) {
|
|||
if (frame.data8[0] != (int)bench_test_magic_numbers_e::BENCH_HEADER) {
|
||||
return;
|
||||
}
|
||||
uint8_t command = frame.data8[1];
|
||||
if (command == (uint8_t)bench_test_io_control_e::CAN_BENCH_GET_COUNT) {
|
||||
bench_test_io_control_e command = (bench_test_io_control_e)frame.data8[1];
|
||||
if (command == bench_test_io_control_e::CAN_BENCH_GET_COUNT) {
|
||||
sendOutBoardMeta();
|
||||
} else if (command == (uint8_t)bench_test_io_control_e::CAN_QC_OUTPUT_CONTROL_SET) {
|
||||
} else if (command == bench_test_io_control_e::CAN_QC_OUTPUT_CONTROL_SET) {
|
||||
qcDirectPinControlMode = true;
|
||||
setPin(frame, 1);
|
||||
} else if (command == (uint8_t)bench_test_io_control_e::CAN_QC_OUTPUT_CONTROL_CLEAR) {
|
||||
} else if (command == bench_test_io_control_e::CAN_QC_OUTPUT_CONTROL_CLEAR) {
|
||||
qcDirectPinControlMode = true;
|
||||
setPin(frame, 0);
|
||||
} else if (command == (uint8_t)bench_test_io_control_e::CAN_BENCH_SET_ENGINE_TYPE) {
|
||||
} else if (command == bench_test_io_control_e::CAN_QC_ETB) {
|
||||
qcDirectPinControlMode = true;
|
||||
uint8_t dcIndex = frame.data8[2];
|
||||
uint8_t direction = frame.data8[3];
|
||||
const dc_io *io = &engineConfiguration->etbIo[dcIndex];
|
||||
Gpio controlPin = io->controlPin;
|
||||
directWritePad(controlPin, 1);
|
||||
efiSetPadModeWithoutOwnershipAcquisition("QC_ETB", controlPin, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
directWritePad(io->directionPin1, direction);
|
||||
directWritePad(io->disablePin, 0); // disable pin is inverted - here we ENABLE. direct pin access due to qcDirectPinControlMode
|
||||
} else if (command == bench_test_io_control_e::CAN_BENCH_SET_ENGINE_TYPE) {
|
||||
int eType = frame.data8[2];
|
||||
// todo: fix firmware for 'false' to be possible - i.e. more of properties should be applied on the fly
|
||||
setEngineType(eType, true);
|
||||
#if EFI_PROD_CODE
|
||||
scheduleReboot();
|
||||
#endif // EFI_PROD_CODE
|
||||
} else if (command == (uint8_t)bench_test_io_control_e::CAN_BENCH_START_PIN_TEST) {
|
||||
} else if (command == bench_test_io_control_e::CAN_BENCH_START_PIN_TEST) {
|
||||
bench_mode_e benchModePinIdx = (bench_mode_e)frame.data8[2];
|
||||
// ignore previous pin state and stats
|
||||
resetPinStats(benchModePinIdx);
|
||||
} else if (command == (uint8_t)bench_test_io_control_e::CAN_BENCH_END_PIN_TEST) {
|
||||
} else if (command == bench_test_io_control_e::CAN_BENCH_END_PIN_TEST) {
|
||||
sendSavedBenchStatePackets();
|
||||
} else if (command == (uint8_t)bench_test_io_control_e::CAN_BENCH_EXECUTE_BENCH_TEST) {
|
||||
} else if (command == bench_test_io_control_e::CAN_BENCH_EXECUTE_BENCH_TEST) {
|
||||
int benchCommandIdx = frame.data8[2];
|
||||
handleBenchCategory(benchCommandIdx);
|
||||
} else if (command == (uint8_t)bench_test_io_control_e::CAN_BENCH_QUERY_PIN_STATE) {
|
||||
} else if (command == bench_test_io_control_e::CAN_BENCH_QUERY_PIN_STATE) {
|
||||
bench_mode_e benchModePinIdx = (bench_mode_e)frame.data8[2];
|
||||
sendPinStatePackets(benchModePinIdx);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // EFI_CAN_SUPPORT
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue