auto-sync
This commit is contained in:
parent
61c071f0c2
commit
291491fbb3
|
@ -93,7 +93,8 @@ static int ts_serail_ready(void) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static THD_WORKING_AREA(TS_WORKING_AREA, UTILITY_THREAD_STACK_SIZE);
|
// this thread wants a bit extra stack
|
||||||
|
static THD_WORKING_AREA(TS_WORKING_AREA, UTILITY_THREAD_STACK_SIZE + 200);
|
||||||
|
|
||||||
static int tsCounter = 0;
|
static int tsCounter = 0;
|
||||||
|
|
||||||
|
|
|
@ -131,10 +131,11 @@ static bool hasFirmwareErrorFlag = FALSE;
|
||||||
extern engine_configuration_s *engineConfiguration;
|
extern engine_configuration_s *engineConfiguration;
|
||||||
extern board_configuration_s *boardConfiguration;
|
extern board_configuration_s *boardConfiguration;
|
||||||
extern engine_configuration2_s *engineConfiguration2;
|
extern engine_configuration2_s *engineConfiguration2;
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE
|
||||||
|
;
|
||||||
|
|
||||||
char *getFirmwareError(void) {
|
char *getFirmwareError(void) {
|
||||||
return (char*)errorMessageBuffer;
|
return (char*) errorMessageBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void runRusEfi(void) {
|
void runRusEfi(void) {
|
||||||
|
@ -145,7 +146,6 @@ void runRusEfi(void) {
|
||||||
engine->engineConfiguration2 = engineConfiguration2;
|
engine->engineConfiguration2 = engineConfiguration2;
|
||||||
engineConfiguration2->engineConfiguration = engineConfiguration;
|
engineConfiguration2->engineConfiguration = engineConfiguration;
|
||||||
|
|
||||||
|
|
||||||
initErrorHandling();
|
initErrorHandling();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -243,13 +243,22 @@ void firmwareError(const char *fmt, ...) {
|
||||||
setOutputPinValue(LED_ERROR, 1);
|
setOutputPinValue(LED_ERROR, 1);
|
||||||
turnAllPinsOff();
|
turnAllPinsOff();
|
||||||
hasFirmwareErrorFlag = TRUE;
|
hasFirmwareErrorFlag = TRUE;
|
||||||
firmwareErrorMessageStream.eos = 0; // reset
|
if (indexOf(fmt, '%') == -1) {
|
||||||
va_list ap;
|
/**
|
||||||
va_start(ap, fmt);
|
* in case of simple error message let's reduce stack usage
|
||||||
chvprintf((BaseSequentialStream *) &firmwareErrorMessageStream, fmt, ap);
|
* because chvprintf might be causing an error
|
||||||
va_end(ap);
|
*/
|
||||||
|
strcpy((char*)errorMessageBuffer, fmt);
|
||||||
|
|
||||||
firmwareErrorMessageStream.buffer[firmwareErrorMessageStream.eos] = 0; // need to terminate explicitly
|
} else {
|
||||||
|
firmwareErrorMessageStream.eos = 0; // reset
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, fmt);
|
||||||
|
chvprintf((BaseSequentialStream *) &firmwareErrorMessageStream, fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
firmwareErrorMessageStream.buffer[firmwareErrorMessageStream.eos] = 0; // need to terminate explicitly
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int getRusEfiVersion(void) {
|
int getRusEfiVersion(void) {
|
||||||
|
|
Loading…
Reference in New Issue