rusefi-1/firmware/controllers/algo/enum_strings.cpp

124 lines
2.5 KiB
C++
Raw Normal View History

2014-09-04 13:02:47 -07:00
/**
* @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"
2014-11-03 19:03:18 -08:00
/**
* These should be not very long because these are displayed on the LCD as is
*/
2014-09-04 13:02:47 -07:00
const char* getConfigurationName(engine_type_e engineType) {
switch (engineType) {
#if EFI_SUPPORT_DODGE_NEON
case DODGE_NEON_1995:
2014-11-03 19:03:18 -08:00
return "Neon95";
2014-10-01 16:03:00 -07:00
case DODGE_NEON_2003:
2014-11-03 19:03:18 -08:00
return "Neon03";
2014-09-04 13:02:47 -07:00
#endif /* EFI_SUPPORT_DODGE_NEON */
#if EFI_SUPPORT_FORD_ASPIRE
case FORD_ASPIRE_1996:
2014-11-03 19:03:18 -08:00
return "Aspire";
2014-09-04 13:02:47 -07:00
#endif /* EFI_SUPPORT_FORD_ASPIRE */
#if EFI_SUPPORT_FORD_FIESTA
case FORD_FIESTA:
2014-11-03 19:03:18 -08:00
return "Fiesta";
2014-09-04 13:02:47 -07:00
#endif /* EFI_SUPPORT_FORD_FIESTA */
#if EFI_SUPPORT_NISSAN_PRIMERA
case NISSAN_PRIMERA:
2014-11-03 19:03:18 -08:00
return "Primera";
2014-09-04 13:02:47 -07:00
#endif /* EFI_SUPPORT_NISSAN_PRIMERA */
case HONDA_ACCORD_CD:
2014-11-03 19:03:18 -08:00
return "Accord3";
2014-09-04 13:02:47 -07:00
case HONDA_ACCORD_CD_TWO_WIRES:
2014-11-03 19:03:18 -08:00
return "Accord2";
2014-09-04 13:02:47 -07:00
case HONDA_ACCORD_CD_DIP:
2014-11-03 19:03:18 -08:00
return "HondaD";
2014-09-04 13:02:47 -07:00
case FORD_INLINE_6_1995:
2014-11-03 19:03:18 -08:00
return "Fordi6";
2014-09-04 13:02:47 -07:00
case GY6_139QMB:
2014-11-03 19:03:18 -08:00
return "Gy6139";
2014-09-04 13:02:47 -07:00
case MAZDA_MIATA_NB:
2014-11-03 19:03:18 -08:00
return "MiataNB";
2014-09-04 13:02:47 -07:00
case MAZDA_323:
2014-11-03 19:03:18 -08:00
return "M323";
2014-09-04 13:02:47 -07:00
case SATURN_ION_2004:
return "Saturn Ion";
case MINI_COOPER_R50:
2014-11-03 19:03:18 -08:00
return "CoopR50";
2014-09-04 13:02:47 -07:00
case FORD_ESCORT_GT:
2014-11-03 19:03:18 -08:00
return "EscrtGT";
2014-09-04 13:02:47 -07:00
case CITROEN_TU3JP:
2014-11-03 19:03:18 -08:00
return "TU3JP";
2014-09-04 13:02:47 -07:00
case ROVER_V8:
2014-11-03 19:03:18 -08:00
return "Rvrv8";
2014-09-04 13:02:47 -07:00
case MITSU_4G93:
2014-11-03 19:03:18 -08:00
return "Mi4G93";
2014-09-04 13:02:47 -07:00
case MIATA_1990:
2014-11-03 19:03:18 -08:00
return "MX590";
2014-10-22 16:02:58 -07:00
case MIATA_1994_DEVIATOR:
2014-11-03 19:03:18 -08:00
return "MX594d";
2014-10-22 16:02:58 -07:00
case MIATA_1994_SPAGS:
2014-11-03 19:03:18 -08:00
return "MX594s";
2014-09-04 13:02:47 -07:00
case MIATA_1996:
2014-11-03 19:03:18 -08:00
return "MX596";
2014-11-05 14:03:24 -08:00
case BMW_E34:
return "BMWe34";
2014-11-14 20:04:21 -08:00
case TEST_ENGINE:
return "Test";
2014-09-04 13:02:47 -07:00
default:
firmwareError("Unexpected: engineType %d", engineType);
return NULL;
}
}
2014-10-12 15:02:54 -07:00
/*
2014-09-25 20:06:56 -07:00
const char * ignitionModeToString(ignition_mode_e mode) {
switch (mode) {
case IM_ONE_COIL:
return "single";
case IM_INDIVIDUAL_COILS:
return "individual";
case IM_WASTED_SPARK:
return "wasted";
default:
return "unexpected";
}
}
2014-10-12 15:02:54 -07:00
*/
2014-09-04 13:02:47 -07:00
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";
}
}
2014-10-12 15:02:54 -07:00
/*
2014-09-04 15:02:56 -07:00
const char * algorithmToString(engine_load_mode_e mode) {
switch(mode) {
2014-09-28 13:05:28 -07:00
case LM_ALPHA_N:
2014-09-04 15:02:56 -07:00
return "Alpha-N";
case LM_MAF:
return "Maf";
case LM_MAP:
return "pMap";
case LM_SPEED_DENSITY:
return "SD";
default:
return "unexpected";
}
}
2014-10-12 15:02:54 -07:00
*/