Merge remote-tracking branch 'origin/master'

This commit is contained in:
rusefi 2020-12-17 16:59:18 -05:00
commit 1327a872f8
17 changed files with 3247 additions and 3054 deletions

View File

@ -368,7 +368,8 @@
#define EFI_PRINT_ERRORS_AS_WARNINGS TRUE
#define EFI_PRINT_MESSAGES_TO_TERMINAL TRUE
#define EFI_ACTIVE_CONFIGURATION_IN_FLASH
#undef EFI_ACTIVE_CONFIGURATION_IN_FLASH
#define EFI_ACTIVE_CONFIGURATION_IN_FLASH TRUE
//#define PWM_PHASE_MAX_COUNT 122

View File

@ -3,10 +3,10 @@ This directory contains pre-defined configurations for popular engines.
These configurations are a convenience, not a limit. Most engine types
can be manually configured.
In TunerStudio or rusEfi console use the "Popular Vehicles" dialog to
In TunerStudio or rusEFI console use the "Popular Vehicles" dialog to
apply one of these presets.
See http://rusefi.com/wiki/index.php?title=Manual:Engine_Type
See https://github.com/rusefi/rusefi/wiki/Engine-Types
This folder is also used by the continuous integration testing suite.

View File

@ -31,6 +31,8 @@
#define EFI_PWM_TESTER FALSE
#define EFI_ACTIVE_CONFIGURATION_IN_FLASH FALSE
#define EFI_MC33816 TRUE
#define EFI_HPFP TRUE

View File

@ -140,7 +140,7 @@ static fuel_table_t alphaNfuel = {
*
* todo: place this field next to 'engineConfiguration'?
*/
#ifdef EFI_ACTIVE_CONFIGURATION_IN_FLASH
#if EFI_ACTIVE_CONFIGURATION_IN_FLASH
#include "flash_int.h"
engine_configuration_s & activeConfiguration = reinterpret_cast<persistent_config_container_s*>(getFlashAddrFirstCopy())->persistentConfiguration.engineConfiguration;
// we cannot use this activeConfiguration until we call rememberCurrentConfiguration()
@ -153,7 +153,7 @@ engine_configuration_s & activeConfiguration = activeConfigurationLocalStorage;
extern engine_configuration_s *engineConfiguration;
void rememberCurrentConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#ifndef EFI_ACTIVE_CONFIGURATION_IN_FLASH
#if ! EFI_ACTIVE_CONFIGURATION_IN_FLASH
memcpy(&activeConfiguration, engineConfiguration, sizeof(engine_configuration_s));
#else
isActiveConfigurationVoid = false;

View File

@ -74,7 +74,7 @@
#define DISPLAY_SENSOR(x) {}
#define DISPLAY_IF(x) x
#ifndef EFI_ACTIVE_CONFIGURATION_IN_FLASH
#if ! EFI_ACTIVE_CONFIGURATION_IN_FLASH
// We store a special changeable copy of configuration is RAM, so we can just compare them
#define isConfigurationChanged(x) (engineConfiguration->x != activeConfiguration.x)
#else

View File

@ -1,2 +1,2 @@
#pragma once
#define VCS_DATE 20201216
#define VCS_DATE 20201217

View File

@ -14,7 +14,7 @@ void SimpleTransmissionController::init() {
void SimpleTransmissionController::update(gear_e gear) {
for (size_t i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) {
#ifndef EFI_UNIT_TEST
#if ! EFI_UNIT_TEST
tcuSolenoids[i].setValue(config->tcuSolenoidTable[i][static_cast<int>(gear) + 1]);
#endif
}

View File

@ -22,7 +22,7 @@ We need to have a separate init function because we do not have the pin or mode
*/
void ButtonDebounce::init (efitimems_t threshold, brain_pin_e &pin, pin_input_mode_e &mode) {
// we need to keep track of whether we have already been initialized due to the way unit tests run.
if (!initialized) {
if (!isInstanceRegisteredInGlobalList) {
// Link us to the list that is used to track ButtonDebounce instances, so that when the configuration changes,
// they can be looped through and updated.
nextDebounce = s_firstDebounce;
@ -33,7 +33,7 @@ void ButtonDebounce::init (efitimems_t threshold, brain_pin_e &pin, pin_input_mo
m_pin = &pin;
m_mode = &mode;
startConfiguration();
initialized = true;
isInstanceRegisteredInGlobalList = true;
}
void ButtonDebounce::stopConfigurationList () {
@ -54,23 +54,23 @@ void ButtonDebounce::startConfigurationList () {
void ButtonDebounce::stopConfiguration () {
// If the configuration has changed
#ifndef EFI_ACTIVE_CONFIGURATION_IN_FLASH
#if ! EFI_ACTIVE_CONFIGURATION_IN_FLASH
if (*m_pin != active_pin || *m_mode != active_mode) {
#else
if (*m_pin != active_pin || *m_mode != active_mode || (isActiveConfigurationVoid && (*m_pin != 0 || *m_mode != 0))) {
#endif /* EFI_ACTIVE_CONFIGURATION_IN_FLASH */
#ifndef EFI_UNIT_TEST
#if EFI_PROD_CODE
efiSetPadUnused(active_pin);
needsInit = true;
#endif /* EFI_UNIT_TEST */
needsPinInitialization = true;
}
}
void ButtonDebounce::startConfiguration () {
#ifndef EFI_UNIT_TEST
if (needsInit) {
#if EFI_PROD_CODE
if (needsPinInitialization) {
efiSetPadMode("Button", *m_pin, getInputMode(*m_mode));
needsInit = false;
needsPinInitialization = false;
}
#endif
active_pin = *m_pin;

View File

@ -33,10 +33,10 @@ private:
pin_input_mode_e *m_mode;
pin_input_mode_e active_mode = PI_DEFAULT;
bool storedValue = false;
bool initialized = false;
bool isInstanceRegisteredInGlobalList = false;
bool needsPinInitialization = true;
ButtonDebounce *nextDebounce = nullptr;
static ButtonDebounce* s_firstDebounce;
bool needsInit = false;
};
void initButtonDebounce(Logging *sharedLogger);

View File

@ -197,7 +197,7 @@ void runRusEfi(void) {
#endif // HW_CHECK_MODE
#ifndef EFI_ACTIVE_CONFIGURATION_IN_FLASH
#if ! EFI_ACTIVE_CONFIGURATION_IN_FLASH
// TODO: need to fix this place!!! should be a version of PASS_ENGINE_PARAMETER_SIGNATURE somehow
prepareVoidConfiguration(&activeConfiguration);
#endif /* EFI_ACTIVE_CONFIGURATION_IN_FLASH */

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
update=12/12/2018 6:48:20 AM
update=17/12/2020 02:53:36
version=1
last_client=kicad
[cvpcb]
@ -6,79 +6,267 @@ version=1
NetIExt=net
[cvpcb/libraries]
EquName1=devcms
[pcbnew]
version=1
LastNetListRead=
UseCmpFile=1
PadDrill=1.000000000000
PadDrillOvalY=1.000000000000
PadSizeH=1.500000000000
PadSizeV=1.500000000000
PcbTextSizeV=1.500000000000
PcbTextSizeH=1.500000000000
PcbTextThickness=0.300000000000
ModuleTextSizeV=1.000000000000
ModuleTextSizeH=1.000000000000
ModuleTextSizeThickness=0.150000000000
SolderMaskClearance=0.000000000000
SolderMaskMinWidth=0.000000000000
DrawSegmentWidth=0.200000000000
BoardOutlineThickness=0.100000000000
ModuleOutlineThickness=0.150000000000
[pcbnew/libraries]
LibDir=
LibName1=sockets
LibName2=connect
LibName3=discret
LibName4=pin_array
LibName5=divers
LibName6=smd_capacitors
LibName7=smd_resistors
LibName8=smd_crystal&oscillator
LibName9=smd_dil
LibName10=smd_transistors
LibName11=libcms
LibName12=display
LibName13=led
LibName14=dip_sockets
LibName15=pga_sockets
LibName16=valves
LibName17=modules/284617-1
LibName18=modules/kt819a_mod
[general]
version=1
[eeschema]
version=1
LibDir=
[eeschema/libraries]
LibName1=power
LibName2=device
LibName3=transistors
LibName4=conn
LibName5=linear
LibName6=regul
LibName7=74xx
LibName8=cmos4000
LibName9=adc-dac
LibName10=memory
LibName11=xilinx
LibName12=special
LibName13=microcontrollers
LibName14=dsp
LibName15=microchip
LibName16=analog_switches
LibName17=motorola
LibName18=texas
LibName19=intel
LibName20=audio
LibName21=interface
LibName22=digital-audio
LibName23=philips
LibName24=display
LibName25=cypress
LibName26=siliconi
LibName27=opto
LibName28=atmel
LibName29=contrib
LibName30=valves
LibName31=symbols/284617-1
[pcbnew]
version=1
PageLayoutDescrFile=
LastNetListRead=
CopperLayerCount=2
BoardThickness=1.6
AllowMicroVias=0
AllowBlindVias=0
RequireCourtyardDefinitions=0
ProhibitOverlappingCourtyards=1
MinTrackWidth=0.2
MinViaDiameter=0.889
MinViaDrill=0.508
MinMicroViaDiameter=0.508
MinMicroViaDrill=0.127
MinHoleToHole=0.25
TrackWidth1=0.3
TrackWidth2=0.8
TrackWidth3=1
ViaDiameter1=0.889
ViaDrill1=0.635
dPairWidth1=0.3
dPairGap1=0.4
dPairViaGap1=0.25
SilkLineWidth=0.15
SilkTextSizeV=1
SilkTextSizeH=1
SilkTextSizeThickness=0.15
SilkTextItalic=0
SilkTextUpright=1
CopperLineWidth=0.2
CopperTextSizeV=1.5
CopperTextSizeH=1.5
CopperTextThickness=0.3
CopperTextItalic=0
CopperTextUpright=1
EdgeCutLineWidth=0.09999999999999999
CourtyardLineWidth=0.05
OthersLineWidth=0.15
OthersTextSizeV=1
OthersTextSizeH=1
OthersTextSizeThickness=0.15
OthersTextItalic=0
OthersTextUpright=1
SolderMaskClearance=0
SolderMaskMinWidth=0
SolderPasteClearance=0
SolderPasteRatio=-0
[pcbnew/Layer.F.Cu]
Name=F.Cu
Type=0
Enabled=1
[pcbnew/Layer.In1.Cu]
Name=In1.Cu
Type=0
Enabled=0
[pcbnew/Layer.In2.Cu]
Name=In2.Cu
Type=0
Enabled=0
[pcbnew/Layer.In3.Cu]
Name=In3.Cu
Type=0
Enabled=0
[pcbnew/Layer.In4.Cu]
Name=In4.Cu
Type=0
Enabled=0
[pcbnew/Layer.In5.Cu]
Name=In5.Cu
Type=0
Enabled=0
[pcbnew/Layer.In6.Cu]
Name=In6.Cu
Type=0
Enabled=0
[pcbnew/Layer.In7.Cu]
Name=In7.Cu
Type=0
Enabled=0
[pcbnew/Layer.In8.Cu]
Name=In8.Cu
Type=0
Enabled=0
[pcbnew/Layer.In9.Cu]
Name=In9.Cu
Type=0
Enabled=0
[pcbnew/Layer.In10.Cu]
Name=In10.Cu
Type=0
Enabled=0
[pcbnew/Layer.In11.Cu]
Name=In11.Cu
Type=0
Enabled=0
[pcbnew/Layer.In12.Cu]
Name=In12.Cu
Type=0
Enabled=0
[pcbnew/Layer.In13.Cu]
Name=In13.Cu
Type=0
Enabled=0
[pcbnew/Layer.In14.Cu]
Name=In14.Cu
Type=0
Enabled=0
[pcbnew/Layer.In15.Cu]
Name=In15.Cu
Type=0
Enabled=0
[pcbnew/Layer.In16.Cu]
Name=In16.Cu
Type=0
Enabled=0
[pcbnew/Layer.In17.Cu]
Name=In17.Cu
Type=0
Enabled=0
[pcbnew/Layer.In18.Cu]
Name=In18.Cu
Type=0
Enabled=0
[pcbnew/Layer.In19.Cu]
Name=In19.Cu
Type=0
Enabled=0
[pcbnew/Layer.In20.Cu]
Name=In20.Cu
Type=0
Enabled=0
[pcbnew/Layer.In21.Cu]
Name=In21.Cu
Type=0
Enabled=0
[pcbnew/Layer.In22.Cu]
Name=In22.Cu
Type=0
Enabled=0
[pcbnew/Layer.In23.Cu]
Name=In23.Cu
Type=0
Enabled=0
[pcbnew/Layer.In24.Cu]
Name=In24.Cu
Type=0
Enabled=0
[pcbnew/Layer.In25.Cu]
Name=In25.Cu
Type=0
Enabled=0
[pcbnew/Layer.In26.Cu]
Name=In26.Cu
Type=0
Enabled=0
[pcbnew/Layer.In27.Cu]
Name=In27.Cu
Type=0
Enabled=0
[pcbnew/Layer.In28.Cu]
Name=In28.Cu
Type=0
Enabled=0
[pcbnew/Layer.In29.Cu]
Name=In29.Cu
Type=0
Enabled=0
[pcbnew/Layer.In30.Cu]
Name=In30.Cu
Type=0
Enabled=0
[pcbnew/Layer.B.Cu]
Name=B.Cu
Type=0
Enabled=1
[pcbnew/Layer.B.Adhes]
Enabled=1
[pcbnew/Layer.F.Adhes]
Enabled=1
[pcbnew/Layer.B.Paste]
Enabled=1
[pcbnew/Layer.F.Paste]
Enabled=1
[pcbnew/Layer.B.SilkS]
Enabled=1
[pcbnew/Layer.F.SilkS]
Enabled=1
[pcbnew/Layer.B.Mask]
Enabled=1
[pcbnew/Layer.F.Mask]
Enabled=1
[pcbnew/Layer.Dwgs.User]
Enabled=1
[pcbnew/Layer.Cmts.User]
Enabled=1
[pcbnew/Layer.Eco1.User]
Enabled=1
[pcbnew/Layer.Eco2.User]
Enabled=1
[pcbnew/Layer.Edge.Cuts]
Enabled=1
[pcbnew/Layer.Margin]
Enabled=1
[pcbnew/Layer.B.CrtYd]
Enabled=1
[pcbnew/Layer.F.CrtYd]
Enabled=1
[pcbnew/Layer.B.Fab]
Enabled=0
[pcbnew/Layer.F.Fab]
Enabled=0
[pcbnew/Layer.Rescue]
Enabled=0
[pcbnew/Netclasses]
[pcbnew/Netclasses/Default]
Name=Default
Clearance=0.254
TrackWidth=0.3
ViaDiameter=0.889
ViaDrill=0.635
uViaDiameter=0.508
uViaDrill=0.127
dPairWidth=0.3
dPairGap=0.4
dPairViaGap=0.25
[pcbnew/Netclasses/1]
Name=1.5A
Clearance=0.254
TrackWidth=0.49
ViaDiameter=0.889
ViaDrill=0.635
uViaDiameter=0.508
uViaDrill=0.127
dPairWidth=0.2
dPairGap=0.25
dPairViaGap=0.25
[pcbnew/Netclasses/2]
Name=1A
Clearance=0.254
TrackWidth=0.3
ViaDiameter=0.889
ViaDrill=0.635
uViaDiameter=0.508
uViaDrill=0.127
dPairWidth=0.2
dPairGap=0.25
dPairViaGap=0.25
[pcbnew/Netclasses/3]
Name=4A
Clearance=0.254
TrackWidth=2
ViaDiameter=0.889
ViaDrill=0.635
uViaDiameter=0.508
uViaDrill=0.127
dPairWidth=0.2
dPairGap=0.25
dPairViaGap=0.25

View File

@ -1,4 +1,2 @@
1) Corners are hitting the plastic
2) P18 P19 etc silkscreen is hitting useful silkscreen
3) need much more trace width for pins 1,2,3 16,17,18 31,32,33 46,47,48 maybe both sides of PCB?
4) change silkscreen of larger connector 1-94 like on to https://raw.githubusercontent.com/wiki/rusefi/rusefi/oem_docs/Bosch/connector_154.png

View File

@ -0,0 +1,15 @@
Item,Qty,Reference(s),Value,LibPart,Footprint,Datasheet,LCSC
1,3,"C1, C2, C3",0.022u,Device:C,Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder,~,C47526
2,1,C4,0.22u,Device:C,Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder,~,C1857
3,3,"D1, D3, D4",LED,Device:LED,LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder,~,C2296
4,1,D2,NCV1124,ncv1124:NCV1124,Package_SO:SO-8_3.9x4.9mm_P1.27mm,,C152274
5,1,G1,LOGO,logo:LOGO,rusefi_lib:LOGO,,
6,2,"H1, H2",MountingHole_Pad,Mechanical:MountingHole_Pad,MountingHole:MountingHole_3.2mm_M3_Pad_Via,~,
7,6,"J1, J2, J3, J4, J5, J6",Screw_Terminal_01x02,Connector:Screw_Terminal_01x02,TerminalBlock_RND:TerminalBlock_RND_205-00001_1x02_P5.00mm_Horizontal,~,
8,1,J7,Conn_01x02_Male,Connector:Conn_01x02_Male,Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical,~,
9,1,J8,Conn_01x03_Male,Connector:Conn_01x03_Male,Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical,~,
10,2,"Q1, Q2",2N7002,Transistor_FET:2N7002,Package_TO_SOT_SMD:SOT-23,https://www.onsemi.com/pub/Collateral/NDS7002A-D.PDF,C8545
11,4,"R1, R12, R13, R14",3K,Device:R,Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder,~,C17661
12,8,"R2, R3, R4, R5, R6, R7, R8, R9",22k,Device:R,Resistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolder,~,C147142
13,1,R10,24k,Device:R,Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder,~,C17960
14,1,R11,39,Device:R,Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder,~,C22198
1 Item Qty Reference(s) Value LibPart Footprint Datasheet LCSC
2 1 3 C1, C2, C3 0.022u Device:C Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder ~ C47526
3 2 1 C4 0.22u Device:C Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder ~ C1857
4 3 3 D1, D3, D4 LED Device:LED LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder ~ C2296
5 4 1 D2 NCV1124 ncv1124:NCV1124 Package_SO:SO-8_3.9x4.9mm_P1.27mm C152274
6 5 1 G1 LOGO logo:LOGO rusefi_lib:LOGO
7 6 2 H1, H2 MountingHole_Pad Mechanical:MountingHole_Pad MountingHole:MountingHole_3.2mm_M3_Pad_Via ~
8 7 6 J1, J2, J3, J4, J5, J6 Screw_Terminal_01x02 Connector:Screw_Terminal_01x02 TerminalBlock_RND:TerminalBlock_RND_205-00001_1x02_P5.00mm_Horizontal ~
9 8 1 J7 Conn_01x02_Male Connector:Conn_01x02_Male Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical ~
10 9 1 J8 Conn_01x03_Male Connector:Conn_01x03_Male Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical ~
11 10 2 Q1, Q2 2N7002 Transistor_FET:2N7002 Package_TO_SOT_SMD:SOT-23 https://www.onsemi.com/pub/Collateral/NDS7002A-D.PDF C8545
12 11 4 R1, R12, R13, R14 3K Device:R Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder ~ C17661
13 12 8 R2, R3, R4, R5, R6, R7, R8, R9 22k Device:R Resistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolder ~ C147142
14 13 1 R10 24k Device:R Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder ~ C17960
15 14 1 R11 39 Device:R Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder ~ C22198

View File

@ -0,0 +1,25 @@
Designator,Mid X,Mid Y,Layer,Rotation
C1,134.000000,-44.562500,top,270.000000
C2,134.000000,-50.437500,top,90.000000
C3,138.312500,-39.000000,top,180.000000
C4,144.437500,-43.000000,top,180.000000
D1,149.937500,-38.000000,top,180.000000
D2,141.000000,-47.000000,top,0.000000
D3,155.000000,-42.975000,top,90.000000
D4,155.000000,-57.975000,top,90.000000
Q1,152.000000,-48.000000,top,0.000000
Q2,152.000000,-63.000000,top,0.000000
R1,154.000000,-38.000000,top,180.000000
R2,123.550000,-37.000000,top,0.000000
R3,123.550000,-43.000000,top,0.000000
R4,123.550000,-58.000000,top,0.000000
R5,123.550000,-52.000000,top,0.000000
R6,129.550000,-37.000000,top,0.000000
R7,129.550000,-43.000000,top,0.000000
R8,129.550000,-58.000000,top,0.000000
R9,129.550000,-52.000000,top,0.000000
R10,138.300000,-41.550000,top,180.000000
R11,146.000000,-39.000000,top,90.000000
R12,155.000000,-47.000000,top,90.000000
R13,155.000000,-62.000000,top,90.000000
R14,146.050000,-51.435000,top,0.000000
1 Designator Mid X Mid Y Layer Rotation
2 C1 134.000000 -44.562500 top 270.000000
3 C2 134.000000 -50.437500 top 90.000000
4 C3 138.312500 -39.000000 top 180.000000
5 C4 144.437500 -43.000000 top 180.000000
6 D1 149.937500 -38.000000 top 180.000000
7 D2 141.000000 -47.000000 top 0.000000
8 D3 155.000000 -42.975000 top 90.000000
9 D4 155.000000 -57.975000 top 90.000000
10 Q1 152.000000 -48.000000 top 0.000000
11 Q2 152.000000 -63.000000 top 0.000000
12 R1 154.000000 -38.000000 top 180.000000
13 R2 123.550000 -37.000000 top 0.000000
14 R3 123.550000 -43.000000 top 0.000000
15 R4 123.550000 -58.000000 top 0.000000
16 R5 123.550000 -52.000000 top 0.000000
17 R6 129.550000 -37.000000 top 0.000000
18 R7 129.550000 -43.000000 top 0.000000
19 R8 129.550000 -58.000000 top 0.000000
20 R9 129.550000 -52.000000 top 0.000000
21 R10 138.300000 -41.550000 top 180.000000
22 R11 146.000000 -39.000000 top 90.000000
23 R12 155.000000 -47.000000 top 90.000000
24 R13 155.000000 -62.000000 top 90.000000
25 R14 146.050000 -51.435000 top 0.000000

View File

@ -23,6 +23,8 @@
#define SC_BUFFER_SIZE 4000
#define EFI_ACTIVE_CONFIGURATION_IN_FLASH FALSE
#define EFI_BOOST_CONTROL FALSE
#define EFI_CANBUS_SLAVE FALSE