better constant names

This commit is contained in:
rusefi 2017-03-09 01:10:33 -05:00
parent 60920bfa14
commit 4bf5456457
5 changed files with 13 additions and 13 deletions

View File

@ -1723,7 +1723,7 @@ typedef enum {
CUSTOM_OBD_LOW_CAN_PERIOD = 6040,
CUSTOM_OBD_KNOCK_PROCESSOR = 6041,
CUSTOM_OBD_42 = 6042,
CUSTOM_OBD_LOCAL_FREEZE = 6042,
CUSTOM_OBD_MMC_ERROR = 6043,
CUSTOM_LOGGING_BUFFER_OVERFLOW = 6044,
/**
@ -1747,7 +1747,7 @@ typedef enum {
CUSTOM_OBD_ZERO_CYLINDER_COUNT = 6051,
CUSTOM_OBD_TS_PAGE_MISMATCH = 6052,
CUSTOM_OBD_TS_OUTPUT_MISMATCH = 6053,
CUSTOM_OBD_54 = 6054,
CUSTOM_TOO_LONG_CRANKING_FUEL_INJECTION = 6054,
CUSTOM_OBD_55 = 6055,
CUSTOM_OBD_56 = 6056,
CUSTOM_OBD_57 = 6057,
@ -1874,15 +1874,15 @@ typedef enum {
CUSTOM_ERR_6515 = 6515,
CUSTOM_ERR_6516 = 6516,
CUSTOM_ERR_ADC_USED = 6517,
CUSTOM_ERR_ADC_DEPTH = 6518,
CUSTOM_ERR_6519 = 6519,
CUSTOM_ERR_ADC_DEPTH_SLOW = 6518,
CUSTOM_ERR_ADC_DEPTH_FAST = 6519,
CUSTOM_ERR_6520 = 6520,
CUSTOM_ERR_6521 = 6521,
CUSTOM_ERR_6522 = 6522,
CUSTOM_ERR_6523 = 6523,
CUSTOM_ERR_6524 = 6524,
CUSTOM_ERR_6525 = 6525,
CUSTOM_ERR_6526 = 6526,
CUSTOM_ERR_UNEXPECTED_SPI = 6524,
CUSTOM_ERR_EXT_MODE = 6525,
CUSTOM_ERR_TIMER_OVERFLOW = 6526,
CUSTOM_ERR_6527 = 6527,
CUSTOM_ERR_6528 = 6528,
CUSTOM_ERR_6529 = 6529,

View File

@ -547,9 +547,9 @@ static void configureInputs(void) {
void initAdcInputs(bool boardTestMode) {
printMsg(&logger, "initAdcInputs()");
if (ADC_BUF_DEPTH_FAST > MAX_ADC_GRP_BUF_DEPTH)
firmwareError(CUSTOM_ERR_6519, "ADC_BUF_DEPTH_FAST too high");
firmwareError(CUSTOM_ERR_ADC_DEPTH_FAST, "ADC_BUF_DEPTH_FAST too high");
if (ADC_BUF_DEPTH_SLOW > MAX_ADC_GRP_BUF_DEPTH)
firmwareError(CUSTOM_ERR_ADC_DEPTH, "ADC_BUF_DEPTH_SLOW too high");
firmwareError(CUSTOM_ERR_ADC_DEPTH_SLOW, "ADC_BUF_DEPTH_SLOW too high");
configureInputs();

View File

@ -106,7 +106,7 @@ SPIDriver * getSpiDevice(spi_device_e spiDevice) {
return &SPID3;
}
#endif
firmwareError(CUSTOM_ERR_6524, "Unexpected SPI device: %d", spiDevice);
firmwareError(CUSTOM_ERR_UNEXPECTED_SPI, "Unexpected SPI device: %d", spiDevice);
return NULL;
}
#endif

View File

@ -117,7 +117,7 @@ static uint32_t getExtMode(ioportid_t port) {
} else if (port == GPIOF) {
return EXT_MODE_GPIOF;
}
firmwareError(CUSTOM_ERR_6525, "Unsupported %d", port);
firmwareError(CUSTOM_ERR_EXT_MODE, "Unsupported %d", port);
return 0;
}

View File

@ -52,13 +52,13 @@ void setHardwareUsTimer(int32_t timeUs) {
*/
if (timeUs <= 0) {
timerFreezeCounter++;
warning(CUSTOM_OBD_42, "local freeze cnt=%d", timerFreezeCounter);
warning(CUSTOM_OBD_LOCAL_FREEZE, "local freeze cnt=%d", timerFreezeCounter);
}
if (timeUs < 2)
timeUs = 2; // for some reason '1' does not really work
efiAssertVoid(timeUs > 0, "not positive timeUs");
if (timeUs >= 10 * US_PER_SECOND) {
firmwareError(CUSTOM_ERR_6526, "setHardwareUsTimer() too long: %d", timeUs);
firmwareError(CUSTOM_ERR_TIMER_OVERFLOW, "setHardwareUsTimer() too long: %d", timeUs);
return;
}