auto-sync

This commit is contained in:
rusEfi 2015-01-12 18:05:46 -06:00
parent a174734294
commit 3106182831
47 changed files with 98 additions and 119 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"

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_