fome-fw/firmware/controllers/algo/enum_strings.cpp

118 lines
2.4 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"
const char* getConfigurationName(engine_type_e engineType) {
switch (engineType) {
#if EFI_SUPPORT_DODGE_NEON
case DODGE_NEON_1995:
2014-10-01 16:03:00 -07:00
return "Neon 1995";
case DODGE_NEON_2003:
return "Neon 2003";
2014-09-04 13:02:47 -07:00
#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";
2014-10-22 16:02:58 -07:00
case MIATA_1994_DEVIATOR:
return "Miata 1994d";
case MIATA_1994_SPAGS:
return "Miata 1994s";
2014-09-04 13:02:47 -07:00
case MIATA_1996:
return "Miata 1996";
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
*/