#657 pulling global access down

This commit is contained in:
rusefi 2019-01-28 00:44:30 -05:00
parent 5c40815758
commit 57c6b75e81
12 changed files with 62 additions and 16 deletions

View File

@ -22,6 +22,7 @@
*/
#include "global.h"
#include "engine.h"
#include "trigger_central.h"
#include "accel_enrichment.h"
#include "engine_state.h"
@ -35,7 +36,6 @@ extern TunerStudioOutputChannels tsOutputChannels;
EXTERN_ENGINE
;
tps_tps_Map3D_t tpsTpsMap("tpsTps");
static Logging *logger = NULL;

View File

@ -20,6 +20,7 @@
*/
#include "global.h"
#include "globalaccess.h"
#include "algo.h"
#include "advance_map.h"
#include "fuel_math.h"

View File

@ -8,6 +8,7 @@
#define H_ENGINE_H_
#include "global.h"
#include "globalaccess.h"
#include "pid.h"
#include "rpm_calculator.h"
#include "event_registry.h"

View File

@ -12,6 +12,7 @@
#include "global.h"
#include "crc.h"
#include "engine_configuration_generated_structures.h"
#include "globalaccess.h"
#ifndef DEFAULT_ENGINE_TYPE
#define DEFAULT_ENGINE_TYPE CUSTOM_ENGINE

View File

@ -5,7 +5,7 @@
* See also common_headers.h
*
* Dec 25, 2018
* @author Andrey Belomutskiy, (c) 2012-2018
* @author Andrey Belomutskiy, (c) 2012-2019
*/
#ifndef GLOBAL_SHARED_H_

View File

@ -11,6 +11,7 @@
#include "global.h"
#include "engine_configuration_generated_structures.h"
#include "EfiWave.h"
#include "globalaccess.h"
#define FOUR_STROKE_ENGINE_CYCLE 720

View File

@ -10,8 +10,8 @@
* @author Andrey Belomutskiy, (c) 2012-2018
*/
#include "rpm_calculator.h"
#include "engine.h"
#include "rpm_calculator.h"
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)

15
firmware/globalaccess.h Normal file
View File

@ -0,0 +1,15 @@
/*
* globalaccess.h
*
* @date Jan 28, 2019
* @author Andrey Belomutskiy, (c) 2012-2019
*/
#ifndef GLOBALACCESS_H_
#define GLOBALACCESS_H_
#endif /* GLOBALACCESS_H_ */

View File

@ -0,0 +1,15 @@
/*
* @file globalaccess.h
*
* @date Jan 28, 2019
* @author Andrey Belomutskiy, (c) 2012-2019
*/
#ifndef SIMULATOR_GLOBALACCESS_H_
#define SIMULATOR_GLOBALACCESS_H_
#endif /* SIMULATOR_GLOBALACCESS_H_ */

View File

@ -69,18 +69,6 @@ void print(const char *fmt, ...);
#define EXTERN_ENGINE extern EnginePins enginePins
#define EXTERN_CONFIG
/**
* @see firmware/global.h for explanation
*/
#define DECLARE_ENGINE_PARAMETER_SIGNATURE Engine *engine, engine_configuration_s *engineConfiguration, persistent_config_s *config, board_configuration_s *boardConfiguration
#define DECLARE_ENGINE_PARAMETER_SUFFIX , DECLARE_ENGINE_PARAMETER_SIGNATURE
#define PASS_ENGINE_PARAMETER_SIGNATURE engine, engineConfiguration, config, boardConfiguration
#define PASS_ENGINE_PARAMETER_SUFFIX , PASS_ENGINE_PARAMETER_SIGNATURE
#define DECLARE_CONFIG_PARAMETER_SIGNATURE engine_configuration_s *engineConfiguration, persistent_config_s *config, board_configuration_s *boardConfiguration
#define DECLARE_CONFIG_PARAMETER_SUFFIX , DECLARE_CONFIG_PARAMETER_SIGNATURE
#define PASS_CONFIG_PARAMETER_SIGNATURE engineConfiguration, config, boardConfiguration
#define PASS_CONFIG_PARAMETER_SUFFIX , PASS_CONFIG_PARAMETER_SIGNATURE
#define DEFINE_CONFIG_PARAM(x, y) , x y
#define PASS_CONFIG_PARAM(x) , x

24
unit_tests/globalaccess.h Normal file
View File

@ -0,0 +1,24 @@
/*
* @file globalaccess.h
*
* @date Jan 28, 2019
* @author Andrey Belomutskiy, (c) 2012-2019
*/
#ifndef GLOBALACCESS_H_
#define GLOBALACCESS_H_
/**
* @see firmware/global.h for explanation
*/
#define DECLARE_ENGINE_PARAMETER_SIGNATURE Engine *engine, engine_configuration_s *engineConfiguration, persistent_config_s *config, board_configuration_s *boardConfiguration
#define DECLARE_ENGINE_PARAMETER_SUFFIX , DECLARE_ENGINE_PARAMETER_SIGNATURE
#define PASS_ENGINE_PARAMETER_SIGNATURE engine, engineConfiguration, config, boardConfiguration
#define PASS_ENGINE_PARAMETER_SUFFIX , PASS_ENGINE_PARAMETER_SIGNATURE
#define DECLARE_CONFIG_PARAMETER_SIGNATURE engine_configuration_s *engineConfiguration, persistent_config_s *config, board_configuration_s *boardConfiguration
#define DECLARE_CONFIG_PARAMETER_SUFFIX , DECLARE_CONFIG_PARAMETER_SIGNATURE
#define PASS_CONFIG_PARAMETER_SIGNATURE engineConfiguration, config, boardConfiguration
#define PASS_CONFIG_PARAMETER_SUFFIX , PASS_CONFIG_PARAMETER_SIGNATURE
#endif /* GLOBALACCESS_H_ */

View File

@ -7,8 +7,8 @@
*/
#include "global.h"
#include "accel_enrichment.h"
#include "engine_configuration.h"
#include "accel_enrichment.h"
#include "engine_test_helper.h"
TEST(big, testAccelEnrichment) {