Skip to content

Commit

Permalink
Merge branch 'master' into main-loop
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Sep 17, 2024
2 parents 9e170cb + 7cb539d commit ee093ab
Show file tree
Hide file tree
Showing 147 changed files with 53,919 additions and 55,038 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Initialize the checkout:

See [firmware/gcc_version_check.c](firmware/gcc_version_check.c) for the recommended version of GCC.

Check out https://rusefi.com/forum/viewtopic.php?f=5&t=9
Refer to [firmware/DEVELOPER.md](firmware/DEVELOPER.md) for details on building FOME firmware.

# Release Notes

Expand Down
14 changes: 12 additions & 2 deletions firmware/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,25 @@ or

# Changelog

## Unreleased
## September 2024 Release

### Added
- Staged injection: a second set of fuel injectors that inject part of the fuel load when you run out of primary injector
- VE/Ign/Boost blend tables can select a Y axis override for even more flexibility
- Added Lua function `getAuxDigital` for parity with rusEFI #351
- Optional table to change after start idle taper time #369 (thank you, Krakert!)
- Optional table to change after start idle taper time #369 (thank you, @Krakert!)
- Increased precision available for Lua tables
- Add EGT values to CAN broadcast format #398
- Add options to enable/disable optional CAN frames (cams, EGT so far)
- Add 1-5-4-8-3-7-2-6 and 1-6-5-10-2-7-3-8-4-9 firing orders
- Console command `set_sensor_mock` now accepts a sensor by name, instead of index. Example: `set_sensor_mock CLT 85.5`
- TunerStudio UI improvements (#436, etc)
- Dropdown selector for popular gearbox ratios (#358, thank you @alrijleh and @nmschulte!)
- Add two more aux linear sensors #476
- Support wasted spark on odd cylinder count and odd-fire engines. Improves startup and allows running without a cam sensor!
- Add an option for the DFCO MAP threshold to use a table dependent upon RPM #485 (thank you @alrijleh!)
- Option to disable DFCO on gear shift #487
- Ability to use an 8x8 table for after-start fuel multiplier that depends on CLT and engine run time

### Fixed
- Improve performance with Lua CAN reception of a high volume of frames
Expand All @@ -50,6 +56,10 @@ or
- Fix a scenario where noisy trigger can cause overdwell [rusefi/rusefi#6349](https://github.com/rusefi/rusefi/issues/6349)
- Fix decel fuel cutoff (DFCO) on engines without a MAP sensor #457
- Automatic calculation of knock sense frequency based on cylinder bore #379
- Removed MAP sampling option that can result in inaccurate MAP sensor readings
- Improve TunerStudio performance on STM32F4-based ECUs #474
- Inhibit VVT control if the cam position sensor dies
- Fix "Alpha-N IAT density correction" option

## December 2023 Release

Expand Down
2 changes: 0 additions & 2 deletions firmware/config/boards/atlas/prepend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
! Atlas is guaranteed dual bank flash, so there's no delay when sending the burn command.
! All commands should complete effectively instantly.
#define TS_BLOCK_READ_TIMEOUT 250

#define BLOCKING_FACTOR 1500
8 changes: 4 additions & 4 deletions firmware/config/boards/hellen/hellen_board_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ int detectHellenBoardId() {
int boardId = -1;
#ifdef HELLEN_BOARD_ID_PIN_1
efiPrintf("Starting Hellen Board ID detection...");
efitick_t beginNt = getTimeNowNt();
Timer t;
t.reset();

const int numPins = 2;
Gpio rPins[numPins] = { HELLEN_BOARD_ID_PIN_1, HELLEN_BOARD_ID_PIN_2};
Expand Down Expand Up @@ -363,8 +364,7 @@ int detectHellenBoardId() {
palSetPadMode(getBrainPinPort(rPins[k]), getBrainPinIndex(rPins[k]), PAL_MODE_RESET);
}

efitick_t endNt = getTimeNowNt();
int elapsed_Ms = US2MS(NT2US(endNt - beginNt));
float elapsed_Ms = t.getElapsedSeconds() * 1000;

// Check that all resistors were actually detected
bool allRValid = true;
Expand All @@ -379,7 +379,7 @@ int detectHellenBoardId() {
boardId = -1;
}

efiPrintf("* RESULT: BoardId = %d, R1 = %.0f, R2 = %.0f (Elapsed time: %d ms)", boardId, R[0], R[1], elapsed_Ms);
efiPrintf("* RESULT: BoardId = %d, R1 = %.0f, R2 = %.0f (Elapsed time: %.1f ms)", boardId, R[0], R[1], elapsed_Ms);
#endif /* HELLEN_BOARD_ID_PIN_1 */
return boardId;
}
3 changes: 2 additions & 1 deletion firmware/config/boards/hellen/small-can-board/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ DDEFS += -DEFI_SHAFT_POSITION_INPUT=FALSE
DDEFS += -DEFI_ALTERNATOR_CONTROL=FALSE
DDEFS += -DEFI_VVT_PID=FALSE
DDEFS += -DEFI_EMULATE_POSITION_SENSORS=FALSE
DDEFS += -DEFI_MAP_AVERAGING=FALSE
DDEFS += -DEFI_HPFP=FALSE
DDEFS += -DEFI_TOOTH_LOGGER=FALSE
DDEFS += -DRAM_UNUSED_SIZE=100

NO_MAP_AVERAGING = yes

DDEFS += -DHW_SMALL_CAN_BOARD=1

#Mass Storage
Expand Down
1 change: 0 additions & 1 deletion firmware/config/boards/nucleo_f767/prepend.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
#define BLOCKING_FACTOR 1500
1 change: 0 additions & 1 deletion firmware/config/boards/proteus/prepend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@
#define show_Proteus_presets true

#define LUA_SCRIPT_SIZE 12000
#define BLOCKING_FACTOR 1500
2 changes: 0 additions & 2 deletions firmware/config/engines/ford_aspire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ void setFordAspireEngineConfiguration() {
engineConfiguration->ignitionMode = IM_ONE_COIL;
engineConfiguration->trigger.type = trigger_type_e::TT_FORD_ASPIRE;

engineConfiguration->triggerInputDebugPins[0] = Gpio::C15;

engineConfiguration->injectionPins[4] = Gpio::Unassigned;
engineConfiguration->injectionPins[5] = Gpio::Unassigned;

Expand Down
10 changes: 5 additions & 5 deletions firmware/config/engines/mazda_miata_1_6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ void miataNAcommonEngineSettings() {

// Vehicle speed/gears
engineConfiguration->totalGearsCount = 5;
engineConfiguration->gearRatio[0] = 3.136;
engineConfiguration->gearRatio[1] = 1.888;
engineConfiguration->gearRatio[2] = 1.330;
engineConfiguration->gearRatio[3] = 1.000;
engineConfiguration->gearRatio[4] = 0.814;
engineConfiguration->gearRatio[0] = 3.14;
engineConfiguration->gearRatio[1] = 1.89;
engineConfiguration->gearRatio[2] = 1.33;
engineConfiguration->gearRatio[3] = 1.00;
engineConfiguration->gearRatio[4] = 0.81;

// These may need to change based on your real car
engineConfiguration->driveWheelRevPerKm = 551;
Expand Down
22 changes: 11 additions & 11 deletions firmware/config/engines/mazda_miata_vvt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ static void setMazdaMiataEngineNB1Defaults() {

// Vehicle speed/gears
engineConfiguration->totalGearsCount = 5;
engineConfiguration->gearRatio[0] = 3.136;
engineConfiguration->gearRatio[1] = 1.888;
engineConfiguration->gearRatio[2] = 1.330;
engineConfiguration->gearRatio[3] = 1.000;
engineConfiguration->gearRatio[4] = 0.814;
engineConfiguration->gearRatio[0] = 3.14;
engineConfiguration->gearRatio[1] = 1.89;
engineConfiguration->gearRatio[2] = 1.33;
engineConfiguration->gearRatio[3] = 1.00;
engineConfiguration->gearRatio[4] = 0.81;

// These may need to change based on your real car
engineConfiguration->driveWheelRevPerKm = 551;
Expand Down Expand Up @@ -423,12 +423,12 @@ static void setMazdaMiataEngineNB2Defaults() {

// Vehicle speed/gears
engineConfiguration->totalGearsCount = 6;
engineConfiguration->gearRatio[0] = 3.760;
engineConfiguration->gearRatio[1] = 2.269;
engineConfiguration->gearRatio[2] = 1.646;
engineConfiguration->gearRatio[3] = 1.257;
engineConfiguration->gearRatio[4] = 1.000;
engineConfiguration->gearRatio[5] = 0.843;
engineConfiguration->gearRatio[0] = 3.76;
engineConfiguration->gearRatio[1] = 2.27;
engineConfiguration->gearRatio[2] = 1.65;
engineConfiguration->gearRatio[3] = 1.26;
engineConfiguration->gearRatio[4] = 1.00;
engineConfiguration->gearRatio[5] = 0.84;

// These may need to change based on your real car
engineConfiguration->driveWheelRevPerKm = 538;
Expand Down
6 changes: 1 addition & 5 deletions firmware/config/stm32f4ems/efifeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@

#if MODULE_ETHERNET_CONSOLE
// F4 ethernet needs some extra space
#define LUA_USER_HEAP 40000
#define LUA_USER_HEAP 25000
#else // MODULE_ETHERNET_CONSOLE
#define LUA_USER_HEAP 50000
#endif
Expand Down Expand Up @@ -302,10 +302,6 @@
//#define EFI_MALFUNCTION_INDICATOR FALSE
#endif

#ifndef EFI_MAP_AVERAGING
#define EFI_MAP_AVERAGING TRUE
#endif

// todo: most of this should become configurable

// todo: switch to continuous ADC conversion for fast ADC?
Expand Down
29 changes: 3 additions & 26 deletions firmware/console/binary/output_channels.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ int16_t rpmAcceleration;dRPM;"RPM acceleration",1, 0, 0, 5, 2

float auxLinear1;@@GAUGE_NAME_AUX_LINEAR_1@@;"", 1, 0, 0, 0, 2
float auxLinear2;@@GAUGE_NAME_AUX_LINEAR_2@@;"", 1, 0, 0, 0, 2
float auxLinear3;@@GAUGE_NAME_AUX_LINEAR_3@@;"", 1, 0, 0, 0, 2
float auxLinear4;@@GAUGE_NAME_AUX_LINEAR_4@@;"", 1, 0, 0, 0, 2


uint16_t autoscale fallbackMap;;"kPa", 0.1, 0, 0, 1000, 1
Expand Down Expand Up @@ -310,31 +312,6 @@ int16_t rpmAcceleration;dRPM;"RPM acceleration",1, 0, 0, 5, 2
uint8_t[BOOST_BLEND_COUNT iterate] autoscale boostClosedLoopBlendBias;;"%", 0.5, 0, 0, 100, 1
int16_t[BOOST_BLEND_COUNT iterate] autoscale boostClosedLoopBlendOutput;;"%", 0.1, 0, -1000, 1000, 1

bit coilState1
bit coilState2
bit coilState3
bit coilState4
bit coilState5
bit coilState6
bit coilState7
bit coilState8
bit coilState9
bit coilState10
bit coilState11
bit coilState12
bit injectorState1
bit injectorState2
bit injectorState3
bit injectorState4
bit injectorState5
bit injectorState6
bit injectorState7
bit injectorState8
bit injectorState9
bit injectorState10
bit injectorState11
bit injectorState12

uint32_t outputRequestPeriod
float mapFast
float[LUA_GAUGE_COUNT iterate] luaGauges;Lua: Gauge;"value",1, 0, 0, 50000, 3
Expand Down Expand Up @@ -372,5 +349,5 @@ float mapFast

uint8_t[12 iterate] mapPerCylinder;;"kPa", 1, 0, 0, 0, 0

uint8_t[102 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0
uint16_t autoscale dwellAccuracyRatio;;"ratio", 0.001, 0, 0, 0, 3
end_struct
Loading

0 comments on commit ee093ab

Please sign in to comment.