auto-sync
This commit is contained in:
parent
af1790ee98
commit
28a6af4d91
|
@ -11,10 +11,9 @@
|
||||||
#include "subaru.h"
|
#include "subaru.h"
|
||||||
#include "honda_accord.h"
|
#include "honda_accord.h"
|
||||||
|
|
||||||
void setSubaru2003Wrx(engine_configuration_s *engineConfiguration) {
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
board_configuration_s * boardConfiguration = &engineConfiguration->bc;
|
|
||||||
|
|
||||||
|
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
setFrankenso_01_LCD(boardConfiguration);
|
setFrankenso_01_LCD(boardConfiguration);
|
||||||
setFrankenso0_1_joystick(engineConfiguration);
|
setFrankenso0_1_joystick(engineConfiguration);
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
#ifndef SUBARU_H_
|
#ifndef SUBARU_H_
|
||||||
#define SUBARU_H_
|
#define SUBARU_H_
|
||||||
|
|
||||||
#include "engine_configuration.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setSubaru2003Wrx(engine_configuration_s *engineConfiguration);
|
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_F);
|
||||||
|
|
||||||
#endif /* SUBARU_H_ */
|
#endif /* SUBARU_H_ */
|
||||||
|
|
|
@ -37,6 +37,7 @@ EXTERN_ENGINE
|
||||||
*/
|
*/
|
||||||
void Engine::updateSlowSensors() {
|
void Engine::updateSlowSensors() {
|
||||||
Engine *engine = this;
|
Engine *engine = this;
|
||||||
|
board_configuration_s * boardConfiguration = &engineConfiguration->bc;
|
||||||
engineState.iat = getIntakeAirTemperature(PASS_ENGINE_PARAMETER_F);
|
engineState.iat = getIntakeAirTemperature(PASS_ENGINE_PARAMETER_F);
|
||||||
engineState.clt = getCoolantTemperature(PASS_ENGINE_PARAMETER_F);
|
engineState.clt = getCoolantTemperature(PASS_ENGINE_PARAMETER_F);
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,6 @@ void prepareVoidConfiguration(engine_configuration_s *activeConfiguration) {
|
||||||
* and the settings saves in flash memory.
|
* and the settings saves in flash memory.
|
||||||
*/
|
*/
|
||||||
void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
|
||||||
// technically these regions currently overlap, but I will reset all individually for readability
|
// technically these regions currently overlap, but I will reset all individually for readability
|
||||||
memset(engineConfiguration, 0, sizeof(engine_configuration_s));
|
memset(engineConfiguration, 0, sizeof(engine_configuration_s));
|
||||||
memset(boardConfiguration, 0, sizeof(board_configuration_s));
|
memset(boardConfiguration, 0, sizeof(board_configuration_s));
|
||||||
|
@ -612,8 +611,6 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
|
||||||
engineConfiguration->engineType = engineType;
|
engineConfiguration->engineType = engineType;
|
||||||
engineConfiguration->headerMagicValue = HEADER_MAGIC_NUMBER;
|
engineConfiguration->headerMagicValue = HEADER_MAGIC_NUMBER;
|
||||||
|
|
||||||
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* And override them with engine-specific defaults
|
* And override them with engine-specific defaults
|
||||||
*/
|
*/
|
||||||
|
@ -704,7 +701,7 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
|
||||||
setRoverv8(PASS_ENGINE_PARAMETER_F);
|
setRoverv8(PASS_ENGINE_PARAMETER_F);
|
||||||
break;
|
break;
|
||||||
case SUBARU_2003_WRX:
|
case SUBARU_2003_WRX:
|
||||||
setSubaru2003Wrx(engineConfiguration);
|
setSubaru2003Wrx(PASS_ENGINE_PARAMETER_F);
|
||||||
break;
|
break;
|
||||||
case BMW_E34:
|
case BMW_E34:
|
||||||
setBmwE34(PASS_ENGINE_PARAMETER_F);
|
setBmwE34(PASS_ENGINE_PARAMETER_F);
|
||||||
|
|
|
@ -132,8 +132,6 @@ static void setFsioOutputPin(const char *indexStr, const char *pinName) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void setFsioExt(int index, brain_pin_e pin, const char * exp, int freq DECLARE_ENGINE_PARAMETER_S) {
|
void setFsioExt(int index, brain_pin_e pin, const char * exp, int freq DECLARE_ENGINE_PARAMETER_S) {
|
||||||
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
|
||||||
|
|
||||||
boardConfiguration->fsioPins[index] = pin;
|
boardConfiguration->fsioPins[index] = pin;
|
||||||
int len = strlen(exp);
|
int len = strlen(exp);
|
||||||
if (len >= LE_COMMAND_LENGTH) {
|
if (len >= LE_COMMAND_LENGTH) {
|
||||||
|
@ -148,7 +146,6 @@ void setFsio(int index, brain_pin_e pin, const char * exp DECLARE_ENGINE_PARAMET
|
||||||
}
|
}
|
||||||
|
|
||||||
void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
board_configuration_s * boardConfiguration = &engineConfiguration->bc;
|
|
||||||
for (int i = 0; i < LE_COMMAND_COUNT; i++) {
|
for (int i = 0; i < LE_COMMAND_COUNT; i++) {
|
||||||
brain_pin_e brainPin = boardConfiguration->fsioPins[i];
|
brain_pin_e brainPin = boardConfiguration->fsioPins[i];
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue