mirror of https://github.com/FOME-Tech/fome-fw.git
individual error codes for all errors
This commit is contained in:
parent
05b33d567e
commit
5d855376f7
|
@ -5,6 +5,7 @@ current binaries are always available at http://rusefi.com/build_server/
|
||||||
|
|
||||||
| Release date | Revision | Details |
|
| Release date | Revision | Details |
|
||||||
| ------------ | --------- | ------- |
|
| ------------ | --------- | ------- |
|
||||||
|
| 03/05/2017 | r13108 | bugfix #363: trigger front only processing |
|
||||||
| 02/22/2017 | r12980 | bugfix: false error message in case of single coin or simultaneous injection |
|
| 02/22/2017 | r12980 | bugfix: false error message in case of single coin or simultaneous injection |
|
||||||
| 02/22/2017 | r12973 | unused property 'custom Use Rise Edge' removed |
|
| 02/22/2017 | r12973 | unused property 'custom Use Rise Edge' removed |
|
||||||
| 02/22/2017 | r12972 | protocol signature changed to 'v0.02' (this would happen from time to time to ensure version match between console and TS project |
|
| 02/22/2017 | r12972 | protocol signature changed to 'v0.02' (this would happen from time to time to ensure version match between console and TS project |
|
||||||
|
|
|
@ -34,7 +34,7 @@ static digital_input_s * finddigital_input_s(ICUDriver *driver) {
|
||||||
return ®isteredIcus.elements[i];
|
return ®isteredIcus.elements[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "reader not found");
|
firmwareError(CUSTOM_ERR_6520, "reader not found");
|
||||||
return (digital_input_s *) NULL;
|
return (digital_input_s *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ static void icuPeriordCallBack(ICUDriver *driver) {
|
||||||
|
|
||||||
static uint32_t getAlternateFunctions(ICUDriver *driver) {
|
static uint32_t getAlternateFunctions(ICUDriver *driver) {
|
||||||
if (driver == NULL) {
|
if (driver == NULL) {
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "getAlternateFunctions(NULL)");
|
firmwareError(CUSTOM_ERR_6521, "getAlternateFunctions(NULL)");
|
||||||
return 0xffffffff;
|
return 0xffffffff;
|
||||||
}
|
}
|
||||||
#if STM32_ICU_USE_TIM1
|
#if STM32_ICU_USE_TIM1
|
||||||
|
@ -88,7 +88,7 @@ static uint32_t getAlternateFunctions(ICUDriver *driver) {
|
||||||
return GPIO_AF_TIM9;
|
return GPIO_AF_TIM9;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "No such driver");
|
firmwareError(CUSTOM_ERR_6522, "No such driver");
|
||||||
return 0xffffffff;
|
return 0xffffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ icuchannel_t getInputCaptureChannel(brain_pin_e hwPin) {
|
||||||
case GPIOE_11:
|
case GPIOE_11:
|
||||||
return ICU_CHANNEL_2;
|
return ICU_CHANNEL_2;
|
||||||
default:
|
default:
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "Unexpected hw pin in getInputCaptureChannel %s", hwPortname(hwPin));
|
firmwareError(CUSTOM_ERR_6523, "Unexpected hw pin in getInputCaptureChannel %s", hwPortname(hwPin));
|
||||||
return ICU_CHANNEL_1;
|
return ICU_CHANNEL_1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ SPIDriver * getSpiDevice(spi_device_e spiDevice) {
|
||||||
return &SPID3;
|
return &SPID3;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "Unexpected SPI device: %d", spiDevice);
|
firmwareError(CUSTOM_ERR_6524, "Unexpected SPI device: %d", spiDevice);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -117,7 +117,7 @@ static uint32_t getExtMode(ioportid_t port) {
|
||||||
} else if (port == GPIOF) {
|
} else if (port == GPIOF) {
|
||||||
return EXT_MODE_GPIOF;
|
return EXT_MODE_GPIOF;
|
||||||
}
|
}
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "Unsupported %d", port);
|
firmwareError(CUSTOM_ERR_6525, "Unsupported %d", port);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ void lcd_HD44780_init(Logging *sharedLogger) {
|
||||||
addConsoleAction("lcdinfo", lcdInfo);
|
addConsoleAction("lcdinfo", lcdInfo);
|
||||||
|
|
||||||
if (engineConfiguration->displayMode > DM_HD44780_OVER_PCF8574) {
|
if (engineConfiguration->displayMode > DM_HD44780_OVER_PCF8574) {
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "Unexpected displayMode %d", engineConfiguration->displayMode);
|
firmwareError(CUSTOM_ERR_6515, "Unexpected displayMode %d", engineConfiguration->displayMode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ void setHardwareUsTimer(int32_t timeUs) {
|
||||||
timeUs = 2; // for some reason '1' does not really work
|
timeUs = 2; // for some reason '1' does not really work
|
||||||
efiAssertVoid(timeUs > 0, "not positive timeUs");
|
efiAssertVoid(timeUs > 0, "not positive timeUs");
|
||||||
if (timeUs >= 10 * US_PER_SECOND) {
|
if (timeUs >= 10 * US_PER_SECOND) {
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "setHardwareUsTimer() too long: %d", timeUs);
|
firmwareError(CUSTOM_ERR_6526, "setHardwareUsTimer() too long: %d", timeUs);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ static void callback(GPTDriver *gptp) {
|
||||||
(void)gptp;
|
(void)gptp;
|
||||||
timerCallbackCounter++;
|
timerCallbackCounter++;
|
||||||
if (globalTimerCallback == NULL) {
|
if (globalTimerCallback == NULL) {
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "NULL globalTimerCallback");
|
firmwareError(CUSTOM_ERR_6527, "NULL globalTimerCallback");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
isTimerPending = false;
|
isTimerPending = false;
|
||||||
|
@ -100,7 +100,7 @@ static void usTimerWatchDog(void) {
|
||||||
if (getTimeNowNt() >= lastSetTimerTimeNt + 2 * CORE_CLOCK) {
|
if (getTimeNowNt() >= lastSetTimerTimeNt + 2 * CORE_CLOCK) {
|
||||||
strcpy(buff, "no_event");
|
strcpy(buff, "no_event");
|
||||||
itoa10(&buff[8], lastSetTimerValue);
|
itoa10(&buff[8], lastSetTimerValue);
|
||||||
firmwareError(OBD_PCM_Processor_Fault, buff);
|
firmwareError(CUSTOM_ERR_6528, buff);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ static bool intermediateLoggingBufferInited = false;
|
||||||
*/
|
*/
|
||||||
static ALWAYS_INLINE bool validateBuffer(Logging *logging, uint32_t extraLen) {
|
static ALWAYS_INLINE bool validateBuffer(Logging *logging, uint32_t extraLen) {
|
||||||
if (logging->buffer == NULL) {
|
if (logging->buffer == NULL) {
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "Logging not initialized: %s", logging->name);
|
firmwareError(CUSTOM_ERR_6529, "Logging not initialized: %s", logging->name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ static void vappendPrintfI(Logging *logging, const char *fmt, va_list arg) {
|
||||||
void vappendPrintf(Logging *logging, const char *fmt, va_list arg) {
|
void vappendPrintf(Logging *logging, const char *fmt, va_list arg) {
|
||||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#5b");
|
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#5b");
|
||||||
if (!intermediateLoggingBufferInited) {
|
if (!intermediateLoggingBufferInited) {
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "intermediateLoggingBufferInited not inited!");
|
firmwareError(CUSTOM_ERR_6532, "intermediateLoggingBufferInited not inited!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int wasLocked = lockAnyContext();
|
int wasLocked = lockAnyContext();
|
||||||
|
@ -240,7 +240,7 @@ void appendMsgPostfix(Logging *logging) {
|
||||||
void resetLogging(Logging *logging) {
|
void resetLogging(Logging *logging) {
|
||||||
char *buffer = logging->buffer;
|
char *buffer = logging->buffer;
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "Null buffer: %s", logging->name);
|
firmwareError(CUSTOM_ERR_6531, "Null buffer: %s", logging->name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logging->linePointer = buffer;
|
logging->linePointer = buffer;
|
||||||
|
|
|
@ -83,7 +83,7 @@ int histogramGetIndex(int64_t value) {
|
||||||
*/
|
*/
|
||||||
void initHistogram(histogram_s *h, const char *name) {
|
void initHistogram(histogram_s *h, const char *name) {
|
||||||
if (efiStrlen(name) > sizeof(h->name) - 1) {
|
if (efiStrlen(name) > sizeof(h->name) - 1) {
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "Histogram name [%s] too long", name);
|
firmwareError(CUSTOM_ERR_6533, "Histogram name [%s] too long", name);
|
||||||
}
|
}
|
||||||
strcpy(h->name, name);
|
strcpy(h->name, name);
|
||||||
h->total_value = 0;
|
h->total_value = 0;
|
||||||
|
|
|
@ -94,7 +94,7 @@ char * swapOutputBuffers(int *actualOutputBufferSize) {
|
||||||
*actualOutputBufferSize = efiStrlen(outputBuffer);
|
*actualOutputBufferSize = efiStrlen(outputBuffer);
|
||||||
#if EFI_ENABLE_ASSERTS || defined(__DOXYGEN__)
|
#if EFI_ENABLE_ASSERTS || defined(__DOXYGEN__)
|
||||||
if (*actualOutputBufferSize != expectedOutputSize) {
|
if (*actualOutputBufferSize != expectedOutputSize) {
|
||||||
firmwareError(OBD_PCM_Processor_Fault, "out constr %d/%d", *actualOutputBufferSize, expectedOutputSize);
|
firmwareError(CUSTOM_ERR_6534, "out constr %d/%d", *actualOutputBufferSize, expectedOutputSize);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif /* EFI_ENABLE_ASSERTS */
|
#endif /* EFI_ENABLE_ASSERTS */
|
||||||
|
|
Loading…
Reference in New Issue