auto-sync
This commit is contained in:
parent
3569f7df74
commit
5e5fb89899
|
@ -221,7 +221,7 @@ static void printInfo(systime_t nowSeconds) {
|
|||
}
|
||||
timeOfPreviousPrintVersion = nowSeconds;
|
||||
appendPrintf(&logger, "rusEfiVersion%s%d@%s %s%s", DELIMETER, getRusEfiVersion(), VCS_VERSION,
|
||||
getConfigurationName(engineConfiguration),
|
||||
getConfigurationName(engineConfiguration->engineType),
|
||||
DELIMETER);
|
||||
#if EFI_PROD_CODE
|
||||
printOutPin(WC_CRANK1, boardConfiguration->triggerInputPins[0]);
|
||||
|
|
|
@ -13,5 +13,6 @@ CONTROLLERS_ALGO_SRC_CPP = $(PROJECT_DIR)/controllers/algo/OutputSignalArray.cpp
|
|||
$(PROJECT_DIR)/controllers/algo/engine_configuration.cpp \
|
||||
$(PROJECT_DIR)/controllers/algo/engine.cpp \
|
||||
$(PROJECT_DIR)/controllers/algo/event_registry.cpp \
|
||||
$(PROJECT_DIR)/controllers/algo/algo.cpp
|
||||
$(PROJECT_DIR)/controllers/algo/algo.cpp \
|
||||
$(PROJECT_DIR)/controllers/algo/enum_strings.cpp
|
||||
|
||||
|
|
|
@ -428,7 +428,6 @@ typedef struct {
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
const char* getConfigurationName(engine_configuration_s *engineConfiguration);
|
||||
void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration);
|
||||
void setWholeFuelMap(engine_configuration_s *engineConfiguration, float value);
|
||||
void setConstantDwell(engine_configuration_s *engineConfiguration, float dwellMs);
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
/**
|
||||
* @file enum_strings.cpp
|
||||
*
|
||||
* Maybe we will figure out a way to auto-generate this file?
|
||||
*
|
||||
* @date Sep 4, 2014
|
||||
* @author Andrey Belomutskiy, (c) 2012-2014
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "enum_strings.h"
|
||||
#include "error_handling.h"
|
||||
|
||||
|
||||
const char* getConfigurationName(engine_type_e engineType) {
|
||||
switch (engineType) {
|
||||
#if EFI_SUPPORT_DODGE_NEON
|
||||
case DODGE_NEON_1995:
|
||||
return "Dodge Neon";
|
||||
#endif /* EFI_SUPPORT_DODGE_NEON */
|
||||
#if EFI_SUPPORT_FORD_ASPIRE
|
||||
case FORD_ASPIRE_1996:
|
||||
return "Ford Aspire";
|
||||
#endif /* EFI_SUPPORT_FORD_ASPIRE */
|
||||
#if EFI_SUPPORT_FORD_FIESTA
|
||||
case FORD_FIESTA:
|
||||
return "Ford Fiesta";
|
||||
#endif /* EFI_SUPPORT_FORD_FIESTA */
|
||||
#if EFI_SUPPORT_NISSAN_PRIMERA
|
||||
case NISSAN_PRIMERA:
|
||||
return "Nissan Primera";
|
||||
#endif /* EFI_SUPPORT_NISSAN_PRIMERA */
|
||||
case HONDA_ACCORD_CD:
|
||||
return "Honda Accord 3w";
|
||||
case HONDA_ACCORD_CD_TWO_WIRES:
|
||||
return "Honda Accord 2w";
|
||||
case HONDA_ACCORD_CD_DIP:
|
||||
return "Honda Dip";
|
||||
case FORD_INLINE_6_1995:
|
||||
return "Ford 1995 inline 6";
|
||||
case GY6_139QMB:
|
||||
return "Gy6 139qmb";
|
||||
case MAZDA_MIATA_NB:
|
||||
return "Mazda Miata NB";
|
||||
case MAZDA_323:
|
||||
return "Mazda 323";
|
||||
case SATURN_ION_2004:
|
||||
return "Saturn Ion";
|
||||
case MINI_COOPER_R50:
|
||||
return "Mini Cooper R50";
|
||||
case FORD_ESCORT_GT:
|
||||
return "Ford Escort GT";
|
||||
case CITROEN_TU3JP:
|
||||
return "Citroen TU3JP";
|
||||
case ROVER_V8:
|
||||
return "Rover v8";
|
||||
case MITSU_4G93:
|
||||
return "Mitsu 4G93";
|
||||
case MIATA_1990:
|
||||
return "Miata 1990";
|
||||
case MIATA_1994:
|
||||
return "Miata 1994";
|
||||
case MIATA_1996:
|
||||
return "Miata 1996";
|
||||
default:
|
||||
firmwareError("Unexpected: engineType %d", engineType);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
const char * pinModeToString(pin_output_mode_e mode) {
|
||||
switch (mode) {
|
||||
case OM_DEFAULT:
|
||||
return "default";
|
||||
case OM_INVERTED:
|
||||
return "inverted";
|
||||
case OM_OPENDRAIN:
|
||||
return "open drain";
|
||||
case OM_OPENDRAIN_INVERTED:
|
||||
return "open drain inverted";
|
||||
default:
|
||||
return "unexpected";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* @file enum_strings.h
|
||||
*
|
||||
* @date Sep 4, 2014
|
||||
* @author Andrey Belomutskiy, (c) 2012-2014
|
||||
*/
|
||||
|
||||
#ifndef ENUM_STRINGS_H_
|
||||
#define ENUM_STRINGS_H_
|
||||
|
||||
#include "rusefi_enums.h"
|
||||
|
||||
const char* getConfigurationName(engine_type_e engineType);
|
||||
const char * pinModeToString(pin_output_mode_e mode);
|
||||
|
||||
#endif /* ENUM_STRINGS_H_ */
|
|
@ -54,61 +54,6 @@ void printFloatArray(const char *prefix, float array[], int size) {
|
|||
scheduleLogging(&logger);
|
||||
}
|
||||
|
||||
const char* getConfigurationName(engine_configuration_s *engineConfiguration) {
|
||||
switch (engineConfiguration->engineType) {
|
||||
#if EFI_SUPPORT_DODGE_NEON
|
||||
case DODGE_NEON_1995:
|
||||
return "Dodge Neon";
|
||||
#endif /* EFI_SUPPORT_DODGE_NEON */
|
||||
#if EFI_SUPPORT_FORD_ASPIRE
|
||||
case FORD_ASPIRE_1996:
|
||||
return "Ford Aspire";
|
||||
#endif /* EFI_SUPPORT_FORD_ASPIRE */
|
||||
#if EFI_SUPPORT_FORD_FIESTA
|
||||
case FORD_FIESTA:
|
||||
return "Ford Fiesta";
|
||||
#endif /* EFI_SUPPORT_FORD_FIESTA */
|
||||
#if EFI_SUPPORT_NISSAN_PRIMERA
|
||||
case NISSAN_PRIMERA:
|
||||
return "Nissan Primera";
|
||||
#endif /* EFI_SUPPORT_NISSAN_PRIMERA */
|
||||
case HONDA_ACCORD_CD:
|
||||
return "Honda Accord 3w";
|
||||
case HONDA_ACCORD_CD_TWO_WIRES:
|
||||
return "Honda Accord 2w";
|
||||
case HONDA_ACCORD_CD_DIP:
|
||||
return "Honda Dip";
|
||||
case FORD_INLINE_6_1995:
|
||||
return "Ford 1995 inline 6";
|
||||
case GY6_139QMB:
|
||||
return "Gy6 139qmb";
|
||||
case MAZDA_MIATA_NB:
|
||||
return "Mazda Miata NB";
|
||||
case MAZDA_323:
|
||||
return "Mazda 323";
|
||||
case SATURN_ION_2004:
|
||||
return "Saturn Ion";
|
||||
case MINI_COOPER_R50:
|
||||
return "Mini Cooper R50";
|
||||
case FORD_ESCORT_GT:
|
||||
return "Ford Escort GT";
|
||||
case CITROEN_TU3JP:
|
||||
return "Citroen TU3JP";
|
||||
case ROVER_V8:
|
||||
return "Rover v8";
|
||||
case MITSU_4G93:
|
||||
return "Mitsu 4G93";
|
||||
case MIATA_1990:
|
||||
return "Miata 1990";
|
||||
case MIATA_1994:
|
||||
return "Miata 1994";
|
||||
case MIATA_1996:
|
||||
return "Miata 1996";
|
||||
default:
|
||||
firmwareError("Unexpected: engineType %d", engineConfiguration->engineType);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
extern board_configuration_s *boardConfiguration;
|
||||
|
||||
|
@ -117,7 +62,7 @@ extern board_configuration_s *boardConfiguration;
|
|||
*/
|
||||
void printConfiguration(engine_configuration_s *engineConfiguration, engine_configuration2_s *engineConfiguration2) {
|
||||
|
||||
scheduleMsg(&logger, "Template %s/%d trigger %d", getConfigurationName(engineConfiguration),
|
||||
scheduleMsg(&logger, "Template %s/%d trigger %d", getConfigurationName(engineConfiguration->engineType),
|
||||
engineConfiguration->engineType, engineConfiguration->triggerConfig.triggerType);
|
||||
|
||||
scheduleMsg(&logger, "configurationVersion=%d", getGlobalConfigurationVersion());
|
||||
|
|
|
@ -183,7 +183,7 @@ static void triggerShapeInfo() {
|
|||
|
||||
static void triggerInfo() {
|
||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
scheduleMsg(&logger, "Template %s/%d trigger %d", getConfigurationName(engineConfiguration),
|
||||
scheduleMsg(&logger, "Template %s/%d trigger %d", getConfigurationName(engineConfiguration->engineType),
|
||||
engineConfiguration->engineType, engineConfiguration->triggerConfig.triggerType);
|
||||
|
||||
scheduleMsg(&logger, "trigger event counters %d/%d/%d/%d", triggerCentral.getHwEventCounter(0),
|
||||
|
|
|
@ -71,7 +71,7 @@ static void emulatorApplyPinState(PwmConfig *state, int stateIndex) {
|
|||
|
||||
void initTriggerEmulator(void) {
|
||||
#if EFI_EMULATE_POSITION_SENSORS || defined(__DOXYGEN__)
|
||||
print("Emulating %s\r\n", getConfigurationName(engineConfiguration));
|
||||
print("Emulating %s\r\n", getConfigurationName(engineConfiguration->engineType));
|
||||
|
||||
triggerSignal.outputPins[0] = TRIGGER_EMULATOR_PRIMARY;
|
||||
triggerSignal.outputPins[1] = TRIGGER_EMULATOR_SECONDARY;
|
||||
|
|
|
@ -102,21 +102,6 @@ brain_pin_e parseBrainPin(const char *str) {
|
|||
return basePin + pin;
|
||||
}
|
||||
|
||||
const char * pinModeToString(pin_output_mode_e mode) {
|
||||
switch (mode) {
|
||||
case OM_DEFAULT:
|
||||
return "default";
|
||||
case OM_INVERTED:
|
||||
return "inverted";
|
||||
case OM_OPENDRAIN:
|
||||
return "open drain";
|
||||
case OM_OPENDRAIN_INVERTED:
|
||||
return "open drain inverted";
|
||||
default:
|
||||
return "unexpected";
|
||||
}
|
||||
}
|
||||
|
||||
char *hwPortname(brain_pin_e brainPin) {
|
||||
if (brainPin == GPIO_INVALID) {
|
||||
return "INVALID";
|
||||
|
|
|
@ -24,7 +24,6 @@ extern "C"
|
|||
|
||||
void initPinRepository(void);
|
||||
char *hwPortname(brain_pin_e brainPin);
|
||||
const char * pinModeToString(pin_output_mode_e mode);
|
||||
brain_pin_e parseBrainPin(const char *str);
|
||||
void mySetPadMode(const char *msg, ioportid_t port, ioportmask_t pin, iomode_t mode);
|
||||
char *portname(GPIO_TypeDef* GPIOx);
|
||||
|
|
|
@ -26,6 +26,7 @@ extern "C"
|
|||
#include "efitime.h"
|
||||
#include "boards.h"
|
||||
#include "rusefi_enums.h"
|
||||
#include "enum_strings.h"
|
||||
|
||||
#include "datalogging.h"
|
||||
#include "chprintf.h"
|
||||
|
|
Loading…
Reference in New Issue