Tighten up logging stuff

This commit is contained in:
Vincent Barrilliot 2023-10-31 23:56:57 +01:00
parent 954dae8ced
commit 3563bcf539
2 changed files with 5 additions and 2 deletions

View file

@ -56,10 +56,12 @@ void log_init(void) {
do_log = log_to_uart; do_log = log_to_uart;
break; break;
#if (MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X)
case LOG_CHANNEL_CHANNEL_A_LOW_LEVEL: case LOG_CHANNEL_CHANNEL_A_LOW_LEVEL:
channel_A_logger_init(); channel_A_logger_init();
do_log = log_to_channel_A_low_level; do_log = log_to_channel_A_low_level;
break; break;
#endif
default: default:
do_log = log_to_screen; do_log = log_to_screen;
} }
@ -265,11 +267,12 @@ static void log_to_screen(const char *message) {
txt_print(log_channel, "\n"); txt_print(log_channel, "\n");
} }
#if (MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X)
static void log_to_channel_A_low_level(const char *message) { static void log_to_channel_A_low_level(const char *message) {
channel_A_write(message); channel_A_write(message);
channel_A_write("\n"); channel_A_write("\n");
} }
#endif
/* /*
* Log a message to the console. * Log a message to the console.

View file

@ -17,7 +17,7 @@
* Settings * Settings
*/ */
#ifndef DEFAULT_LOG_LEVEL #ifndef DEFAULT_LOG_LEVEL
#define DEFAULT_LOG_LEVEL LOG_TRACE #define DEFAULT_LOG_LEVEL LOG_ERROR
#endif #endif
#ifndef LOG_CHANNEL #ifndef LOG_CHANNEL