hopefully fix log messages
This commit is contained in:
parent
b9f937d78c
commit
d86cc50caf
@ -145,8 +145,10 @@ static void isotp_backend_write(const log_message_t *message) {
|
||||
|
||||
/* Process buffered log messages and send them via ISO-TP */
|
||||
void isotp_log_process(void) {
|
||||
/* Process ISO-TP updates to send any pending messages */
|
||||
isotp_update();
|
||||
/* Check if we have data to send */
|
||||
if (message_buffer.write_pos > 0 || message_buffer.write_pos_2 > 0) {
|
||||
isotp_backend_flush();
|
||||
}
|
||||
}
|
||||
|
||||
/* Flush the ISO-TP backend */
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
/* Configuration */
|
||||
#define MAX_MESSAGE_LENGTH 384
|
||||
#define USE_ANSI_ESCAPE_CODES true // if true, log messages will be colored according to their log level
|
||||
#define USE_ANSI_ESCAPE_CODES false // if true, log messages will be colored according to their log level
|
||||
#define PRINT_TIMESTAMP false // if true, timestamp (from HAL_GetTick) is printed before each log message
|
||||
|
||||
/* Maximum number of backends that can be registered */
|
||||
|
@ -217,6 +217,7 @@ int main(void)
|
||||
int error_count = 0;
|
||||
while (1)
|
||||
{
|
||||
isotp_log_process();
|
||||
isotp_update();
|
||||
//left over from slave communication test, could be nicer and in an additional function !!
|
||||
if (error_count > 25) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user