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