auto-sync

This commit is contained in:
rusEfi 2015-01-12 18:05:46 -06:00
parent 9820527bdb
commit f8ee4cf62c
56 changed files with 7080 additions and 486 deletions

View File

@ -26,7 +26,6 @@
#include "main.h"
#include "status_loop.h"
#include "ec2.h"
#include "adc_inputs.h"
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)

View File

@ -12,48 +12,6 @@
#ifndef EC2_H_
#define EC2_H_
#include "global.h"
#include "engine_configuration.h"
#include "event_registry.h"
#include "trigger_structure.h"
#include "table_helper.h"
class FuelSchedule {
public:
FuelSchedule();
void clear();
ActuatorEventList events;
void addFuelEvents(injection_mode_e mode DECLARE_ENGINE_PARAMETER_S);
void registerInjectionEvent(
io_pin_e pin, float angle, bool_t isSimultanious DECLARE_ENGINE_PARAMETER_S);
uint8_t hasEvents[PWM_PHASE_MAX_COUNT];
};
/**
* this part of the structure is separate just because so far
* these fields are not integrated with Tuner Studio. Step by step :)
*/
class engine_configuration2_s {
// todo: move these fields into Engine class, eliminate this class
public:
engine_configuration2_s();
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
FuelSchedule crankingInjectionEvents;
FuelSchedule injectionEvents;
#endif
float fsioLastValue[LE_COMMAND_COUNT];
/**
* We are alternating two event lists in order to avoid a potential issue around revolution boundary
* when an event is scheduled within the next revolution.
*/
IgnitionEventList ignitionEvents[2];
};
#endif /* EC2_H_ */

View File

@ -9,9 +9,52 @@
#include "main.h"
#include "engine_configuration.h"
#include "ec2.h"
#include "rpm_calculator.h"
#include "global.h"
#include "engine_configuration.h"
#include "event_registry.h"
#include "trigger_structure.h"
#include "table_helper.h"
class FuelSchedule {
public:
FuelSchedule();
void clear();
ActuatorEventList events;
void addFuelEvents(injection_mode_e mode DECLARE_ENGINE_PARAMETER_S);
void registerInjectionEvent(
io_pin_e pin, float angle, bool_t isSimultanious DECLARE_ENGINE_PARAMETER_S);
uint8_t hasEvents[PWM_PHASE_MAX_COUNT];
};
/**
* this part of the structure is separate just because so far
* these fields are not integrated with Tuner Studio. Step by step :)
*/
class engine_configuration2_s {
// todo: move these fields into Engine class, eliminate this class
public:
engine_configuration2_s();
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
FuelSchedule crankingInjectionEvents;
FuelSchedule injectionEvents;
#endif
float fsioLastValue[LE_COMMAND_COUNT];
/**
* We are alternating two event lists in order to avoid a potential issue around revolution boundary
* when an event is scheduled within the next revolution.
*/
IgnitionEventList ignitionEvents[2];
};
class EngineState {
public:
/**

View File

@ -49,7 +49,6 @@
#include "adc_inputs.h"
#include "algo.h"
#include "efilib2.h"
#include "ec2.h"
#include "PwmTester.h"
#include "engine.h"
#include "pin_repository.h"

View File

@ -32,7 +32,6 @@
#include "main_trigger_callback.h"
#include "engine_configuration.h"
#include "pin_repository.h"
#include "ec2.h"
#include "efiGpio.h"
static Logging logger;

View File

@ -10,7 +10,6 @@
#include "engine_configuration.h"
#include "ec2.h"
#include "trigger_structure.h"
#include "table_helper.h"
#include "engine.h"

View File

@ -7,8 +7,6 @@
#ifndef SPEED_DENSITY_H_
#define SPEED_DENSITY_H_
#include "engine_configuration.h"
#include "ec2.h"
#include "engine.h"
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp);

View File

@ -16,7 +16,6 @@
#include "adc_inputs.h"
#include "interpolation.h"
#include "tps.h"
#include "ec2.h"
#include "map.h"
#include "trigger_decoder.h"
#include "console_io.h"

View File

@ -33,7 +33,6 @@
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
#include "main_trigger_callback.h"
#include "ec2.h"
#include "engine_math.h"
#include "trigger_central.h"

View File

@ -16,8 +16,6 @@
#define MAX_IGNITER_COUNT 4
#ifdef __cplusplus
#include "engine_configuration.h"
#include "ec2.h"
#include "event_registry.h"
#include "engine.h"

View File

@ -12,31 +12,28 @@
#include "main.h"
#include "rpm_calculator.h"
#if EFI_WAVE_CHART
#include "wave_chart.h"
extern WaveChart waveChart;
#endif /* EFI_WAVE_CHART */
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
#include "rpm_calculator.h"
#include "trigger_central.h"
#include "engine_configuration.h"
#include "ec2.h"
#include "engine_math.h"
#if EFI_PROD_CODE
#include "rfiutil.h"
#include "engine.h"
#endif
#if EFI_ANALOG_CHART
#if ! EFI_UNIT_TEST
#include "analog_chart.h"
#endif /* EFI_PROD_CODE */
#endif
#include "efilib2.h"
#define TOP_DEAD_CENTER_MESSAGE "r"
#if EFI_WAVE_CHART
#include "wave_chart.h"
extern WaveChart waveChart;
#endif /* EFI_WAVE_CHART */
EXTERN_ENGINE;
@ -125,8 +122,6 @@ bool isCranking(void) {
}
#endif
extern uint32_t triggerHanlderEntryTime;
/**
* @brief Shaft position callback used by RPM calculation logic.
*

View File

@ -12,6 +12,8 @@
#include <global.h>
#include "engine_configuration.h"
#define TOP_DEAD_CENTER_MESSAGE "r"
#define WC_DOWN "d"
#define WC_UP "u"
#define WC_CRANK1 "c1"
@ -78,14 +80,11 @@ void initRpmCalculator(Engine *engine);
float getCrankshaftAngleNt(uint64_t timeNt DECLARE_ENGINE_PARAMETER_S);
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
bool isCranking(void);
int getRevolutionCounter(void);
bool isCranking(void);
#define isValidRpm(rpm) ((rpm) > 0 && (rpm) < UNREALISTIC_RPM)
#if EFI_WAVE_CHART
@ -95,6 +94,10 @@ int getRevolutionCounter(void);
#endif /* EFI_WAVE_CHART */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -7,8 +7,7 @@
#ifndef TRIGGER_BMW_H_
#define TRIGGER_BMW_H_
#include "engine_configuration.h"
#include "ec2.h"
#include "engine.h"
void configureMiniCooperTriggerShape(trigger_shape_s *s);

View File

@ -228,8 +228,11 @@ void triggerInfo(Engine *engine) {
trigger_shape_s *ts = &engine->triggerShape;
scheduleMsg(&logger, "Template %s/%d trigger %d", getConfigurationName(engineConfiguration->engineType),
engineConfiguration->engineType, engineConfiguration->triggerConfig.triggerType);
scheduleMsg(&logger, "Template %s (%d) trigger %s (%d)",
getConfigurationName(engineConfiguration->engineType),
engineConfiguration->engineType,
getTrigger_type_e(engineConfiguration->triggerConfig.triggerType),
engineConfiguration->triggerConfig.triggerType);
scheduleMsg(&logger, "trigger event counters %d/%d/%d/%d", triggerCentral.getHwEventCounter(0),
triggerCentral.getHwEventCounter(1), triggerCentral.getHwEventCounter(2),

View File

@ -16,7 +16,6 @@ class Engine;
typedef void (*ShaftPositionListener)(trigger_event_e signal, uint32_t index DECLARE_ENGINE_PARAMETER_S);
#ifdef __cplusplus
#include "ec2.h"
#include "engine.h"
#define HW_EVENT_TYPES 6

View File

@ -10,7 +10,6 @@
#include "trigger_structure.h"
#include "engine_configuration.h"
#include "ec2.h"
class TriggerState;

View File

@ -11,7 +11,6 @@
#include "trigger_emulator_algo.h"
#include "engine_configuration.h"
#include "LocalVersionHolder.h"
#include "ec2.h"
#include "trigger_central.h"
#if EFI_PROD_CODE

View File

@ -9,8 +9,7 @@
#define TRIGGER_MAZDA_H_
#include "trigger_structure.h"
#include "engine_configuration.h"
#include "ec2.h"
#include "engine.h"
#define MIATA_NA_GAP 1.4930f

View File

@ -8,16 +8,9 @@
#ifndef ANALOG_CHART_H_
#define ANALOG_CHART_H_
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
#include "global.h"
void acAddData(float angle, float value);
void initAnalogChart(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ANALOG_CHART_H_ */

View File

@ -13,7 +13,6 @@
#if EFI_WAVE_CHART
#include "datalogging.h"
#endif /* EFI_WAVE_CHART */
/**
* @brief Dev console sniffer data buffer
@ -28,9 +27,7 @@ public:
void publishChartIfFull();
void addWaveChartEvent3(const char *name, const char *msg);
private:
#if EFI_WAVE_CHART
Logging logging;
#endif /* EFI_WAVE_CHART */
uint32_t counter;
uint64_t startTimeNt;
volatile int isInitialized;
@ -40,4 +37,6 @@ void initWaveChart(WaveChart *chart);
void showWaveChartHistogram(void);
void setChartSize(int newSize);
#endif /* EFI_WAVE_CHART */
#endif /* WAVE_CHART_H_ */

View File

@ -37,7 +37,6 @@
#include "trigger_central.h"
#include "svnversion.h"
#include "engine_configuration.h"
#include "ec2.h"
#endif
#if EFI_INTERNAL_FLASH

View File

@ -96,7 +96,6 @@
#include "main.h"
#include "trigger_structure.h"
#include "ec2.h"
#include "hardware.h"
#include "engine_controller.h"
#include "efiGpio.h"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,128 @@
(rules PCB 176-pin_board
(snap_angle
fortyfive_degree
)
(autoroute_settings
(fanout off)
(autoroute on)
(postroute on)
(vias on)
(via_costs 50)
(plane_via_costs 5)
(start_ripup_costs 100)
(start_pass_no 108)
(layer_rule F.Cu
(active on)
(preferred_direction vertical)
(preferred_direction_trace_costs 1.0)
(against_preferred_direction_trace_costs 2.2)
)
(layer_rule GND
(active off)
(preferred_direction vertical)
(preferred_direction_trace_costs 1.0)
(against_preferred_direction_trace_costs 2.2)
)
(layer_rule PWR
(active off)
(preferred_direction vertical)
(preferred_direction_trace_costs 1.0)
(against_preferred_direction_trace_costs 2.2)
)
(layer_rule B.Cu
(active on)
(preferred_direction horizontal)
(preferred_direction_trace_costs 1.0)
(against_preferred_direction_trace_costs 1.8)
)
)
(rule
(width 254.0)
(clear 203.4)
(clear 127.0 (type smd_to_turn_gap))
(clear 50.8 (type smd_smd))
)
(padstack "Via[0-3]_889:635_um"
(shape
(circle F.Cu 889.0 0.0 0.0)
)
(shape
(circle GND 889.0 0.0 0.0)
)
(shape
(circle PWR 889.0 0.0 0.0)
)
(shape
(circle B.Cu 889.0 0.0 0.0)
)
(attach off)
)
(padstack "Via[0-3]_889:0_um"
(shape
(circle F.Cu 889.0 0.0 0.0)
)
(shape
(circle GND 889.0 0.0 0.0)
)
(shape
(circle PWR 889.0 0.0 0.0)
)
(shape
(circle B.Cu 889.0 0.0 0.0)
)
(attach off)
)
(via
"Via[0-3]_889:635_um" "Via[0-3]_889:635_um" default
)
(via
"Via[0-3]_889:0_um" "Via[0-3]_889:0_um" default
)
(via
"Via[0-3]_889:635_um-kicad_default" "Via[0-3]_889:635_um" "kicad_default"
)
(via
"Via[0-3]_889:0_um-kicad_default" "Via[0-3]_889:0_um" "kicad_default"
)
(via_rule
default "Via[0-3]_889:635_um"
)
(via_rule
"kicad_default" "Via[0-3]_889:635_um-kicad_default"
)
(class default
(clearance_class default)
(via_rule default)
(rule
(width 254.0)
)
(circuit
(use_layer F.Cu B.Cu)
)
)
(class "kicad_default"
GND /VDD /3.3V /5V /5Vi /BOOT0 /D+ "/D-"
/NRST /PA0 /PA1 /PA10 /PA11 /PA12 /PA13 /PA14
/PA15 /PA2 /PA3 /PA4 /PA5 /PA6 /PA7 /PA8
/PA9 /PB0 /PB1 /PB10 /PB11 /PB12 /PB13 /PB14
/PB15 /PB3 /PB4 /PB5 /PB6 /PB7 /PB8 /PB9
/PC0 /PC1 /PC10 /PC11 /PC12 /PC13 /PC2 /PC3
/PC4 /PC5 /PC6 /PC7 /PC8 /PC9 /PD0 /PD1
/PD10 /PD11 /PD12 /PD13 /PD14 /PD15 /PD2 /PD3
/PD4 /PD5 /PD6 /PD7 /PD8 /PD9 /PE0 /PE1
/PE10 /PE11 /PE12 /PE13 /PE14 /PE15 /PE2 /PE3
/PE4 /PE5 /PE6 /PE7 /PE8 /PE9 /PH0 /PH1
"N-0000013" "N-0000014" "N-0000015" "N-00000154" "N-00000159" "N-0000016" "N-0000017" "N-0000021"
"N-0000030" "N-0000031" "N-0000033" "N-0000038" "N-0000039" "N-0000042" "N-0000046" "N-0000047"
"N-0000078"
(clearance_class "kicad_default")
(via_rule kicad_default)
(rule
(width 254.0)
)
(circuit
(use_layer F.Cu B.Cu)
)
)
)

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
* @file adc_inputs.h
*
* @date Dec 7, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef ADC_INPUTS_H_

View File

@ -2,7 +2,7 @@
* @file board.c
*
* @date Nov 15, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "boards.h"

View File

@ -2,7 +2,7 @@
* boards.h
*
* Created on: Nov 15, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef BOARDS_H_

View File

@ -26,11 +26,12 @@
#include "test_idle_controller.h"
#include "test_signal_executor.h"
extern "C"
{
#include "map_resize.h"
#include "test_event_registry.h"
#include "test_signal_executor.h"
#include "test_util.h"
}

View File

@ -2,7 +2,7 @@
* @file map_resize.c
*
* @date Jan 12, 2014
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include <stdio.h>

View File

@ -2,7 +2,7 @@
* @file map_resize.h
*
* @date Jan 12, 2014
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef MAP_RESIZE_H_

View File

@ -3,7 +3,7 @@
*
* Created on: apr 29, 2014
* Author: Dmitry Sidin
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"

View File

@ -3,7 +3,7 @@
*
* Created on: apr 29, 2014
* Author: Dmitry Sidin
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef TEST_ACCEL_ENRICHMENT_H_

View File

@ -2,7 +2,7 @@
* test_find_index.cpp
*
* Created on: Oct 30, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"

View File

@ -2,7 +2,7 @@
* test_find_index.h
*
* Created on: Oct 30, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef TEST_FIND_INDEX_H_

View File

@ -1,6 +1,6 @@
/*
* Created on: Oct 17, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
/**

View File

@ -1,6 +1,6 @@
/*
* Created on: Oct 17, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
/**

View File

@ -2,7 +2,7 @@
* test_event_registry.cpp
*
* Created on: Nov 27, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
#include "event_registry.h"

View File

@ -2,7 +2,7 @@
* test_event_registry.h
*
* Created on: Nov 27, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef TEST_EVENT_REGISTRY_H_

View File

@ -2,7 +2,7 @@
* @file test_engine_math.c
*
* Created on: Nov 14, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
#include "test_engine_math.h"

View File

@ -2,7 +2,7 @@
* @file test_engine_math.h
*
* Created on: Nov 14, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef TEST_ENGINE_MATH_H_

View File

@ -2,7 +2,7 @@
* @file test_fuel_map.cpp
*
* Created on: Nov 6, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
* Author: Andrey Belomutskiy, (c) 2012-2015
*/
#include "test_fuel_map.h"

View File

@ -2,7 +2,7 @@
* @file test_sensors.c
*
* @date Dec 7, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"

View File

@ -2,7 +2,7 @@
* @file test_sensors.h
*
* @date Dec 7, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef TEST_SENSORS_H_

View File

@ -2,7 +2,7 @@
* @file test_signal_executor.cpp
*
* @date Nov 28, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include <time.h>

View File

@ -2,19 +2,20 @@
* @file test_signal_executor.h
*
* @date Nov 28, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef TEST_SIGNAL_EXECUTOR_H_
#define TEST_SIGNAL_EXECUTOR_H_
int getRevolutionCounter();
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
void testSignalExecutor(void);
int getRevolutionCounter();
#ifdef __cplusplus
}

View File

@ -2,7 +2,7 @@
* @file test_trigger_decoder.cpp
*
* @date Dec 24, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"

View File

@ -2,7 +2,7 @@
* @file test_trigger_decoder.h
*
* @date Dec 24, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef TEST_TRIGGER_DECODER_H_

View File

@ -2,7 +2,7 @@
* @file test_util.c
*
* @date Dec 8, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include <string.h>

View File

@ -2,7 +2,7 @@
* @file test_cyclic_buffer.h
*
* @date Dec 8, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef TEST_CYCLIC_BUFFER_H_

View File

@ -2,7 +2,7 @@
* @file adc_inputs.h
*
* @date Dec 7, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef ADC_INPUTS_H_

View File

@ -2,7 +2,7 @@
* @file board.c
*
* @date Nov 15, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"

View File

@ -1,8 +1,8 @@
/*
* efifeatures.h
*
* Created on: Mar 7, 2014
* Author: Andrey
* @date Mar 7, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef EFIFEATURES_H_

View File

@ -2,7 +2,7 @@
* @file rusEfiFunctionalTest.cpp
*
* @date Mar 1, 2014
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "global.h"

View File

@ -2,7 +2,7 @@
* @file rusEfiFunctionalTest.h
*
* @date Mar 1, 2014
* @author Andrey Belomutskiy, (c) 2012-2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef RUSEFIFUNCTIONALTEST_H_