Launch control - experimental (#1816)

* Update tachometer.cpp

Initial implementation of E30 M3 Tach output solution #907, unit_test plus debugging next

* tacho unit tests

First successfull unit test for tachometer

* RAM adjustment so it would link

* refactoring tacho, broken!

* starting to make some progress...still fails after a few seconds

* Rework with SW PWM

* Update after code review

* unit_test update

* First working unit_test

* Update .gitignore

* Update engine_controller.cpp

* Update engine_controller.cpp

* Update tachometer.h

* Update test_tacho.cpp

* Switched UART DMA on

* Revert "Switched UART DMA on"

This reverts commit 4a23974c431e0e7fd760595d2161e74e6854897e.

* enable launch control

make use of already existent code + integration

* Delete compile_frankenso_all.sh

remove it since it is not part of the project

* Update main_trigger_callback.cpp

broke unit_Tests

Co-authored-by: rusefi <rusefi@users.noreply.github.com>
This commit is contained in:
shadowm60 2020-09-22 23:25:27 +03:00 committed by GitHub
parent 2614020c6b
commit 8d8e8ec260
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 6 deletions

View File

@ -13,7 +13,7 @@
#define EFI_BOOST_CONTROL TRUE
#define EFI_LAUNCH_CONTROL FALSE
#define EFI_LAUNCH_CONTROL TRUE
#define EFI_FSIO TRUE

View File

@ -145,7 +145,7 @@ void applyLaunchControlLimiting(bool *limitedSpark, bool *limitedFuel DECLARE_EN
(CONFIG(enableLaunchRetard) ? CONFIG(launchAdvanceRpmRange) : 0) +
CONFIG(hardCutRpmRange);
if (retardThresholdRpm > GET_RPM()) {
if (retardThresholdRpm < GET_RPM()) {
*limitedSpark = engine->isLaunchCondition && engineConfiguration->launchSparkCutEnable;
*limitedFuel = engine->isLaunchCondition && engineConfiguration->launchFuelCutEnable;
engine->rpmHardCut = true;

View File

@ -11,3 +11,4 @@
void initLaunchControl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
void setDefaultLaunchParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void applyLaunchControlLimiting(bool *limitedSpark, bool *limitedFuel DECLARE_ENGINE_PARAMETER_SUFFIX);

View File

@ -52,6 +52,9 @@
#include "engine.h"
#include "perf_trace.h"
#include "sensor.h"
#if EFI_LAUNCH_CONTROL
#include "launch_control.h"
#endif
#include "backup_ram.h"
@ -427,7 +430,13 @@ static void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t trgEvent
limitedFuel = true;
}
}
#if EFI_LAUNCH_CONTROL
if ((!limitedSpark)&&(!limitedFuel))
{
/* in case we are not already on a limited conditions, check launch as well */
applyLaunchControlLimiting(&limitedSpark,&limitedFuel PASS_ENGINE_PARAMETER_SUFFIX);
}
#endif
if (trgEventIndex == 0) {
if (HAVE_CAM_INPUT()) {
engine->triggerCentral.validateCamVvtCounters();

View File

@ -1446,8 +1446,8 @@ menuDialog = main
subMenu = etbTpsBiasCurve, "Electronic throttle body bias curve" @@if_ts_show_etb
subMenu = pedalToTpsTbl, "Electronic Pedal Map" @@if_ts_show_etb
subMenu = std_separator
# subMenu = smLaunchControl, "Launch Control"
# subMenu = std_separator
subMenu = smLaunchControl, "Launch Control"
subMenu = std_separator
# subMenu = smRollingLaunch, "Rolling Launch"
# subMenu = std_separator
# subMenu = antiLag, "Antilag Setup"
@ -3158,7 +3158,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
field = "Log recent errors list", enableLogErrorList
; Racing Features->Launch Control
dialog = smLaunchControl, "Launch Control Settings NOT WORKING"
dialog = smLaunchControl, "Launch Control Settings EXPERIMENTAL"
field = "Enable Launch Control", launchControlEnabled
field = "Activation Mode", launchActivationMode
field = "Switch Input", launchActivatePin, {launchActivationMode == 0 && launchControlEnabled == 1}
@ -3170,6 +3170,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
field = "Launch RPM", launchRpm, {launchControlEnabled == 1}
field = "Extra Fuel", launchFuelAdded, {launchControlEnabled == 1}
field = "Boost Solenoid Duty", launchBoostDuty, {launchControlEnabled == 1}
field = "Ignition Retard enable", enableLaunchRetard, {launchControlEnabled == 1}
field = "Ignition Retard", launchTimingRetard, {launchControlEnabled == 1}
field = "Ignition Retard RPM Range", launchTimingRpmRange, {launchControlEnabled == 1}
field = "Smooth Retard Mode", launchSmoothRetard, {launchControlEnabled == 1}