mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-12 19:10:27 +03:00
s/dmesg/bootlog/g
This commit is contained in:
parent
fd971725c9
commit
3d6e80f53e
2 changed files with 14 additions and 14 deletions
|
@ -62,8 +62,8 @@ PG_RESET_TEMPLATE(logConfig_t, logConfig,
|
|||
);
|
||||
|
||||
#if defined(USE_BOOTLOG)
|
||||
char dmesg_buffer[USE_BOOTLOG];
|
||||
char *dmesg_head = dmesg_buffer;
|
||||
char bootlog_buffer[USE_BOOTLOG];
|
||||
char *bootlog_head = bootlog_buffer;
|
||||
#endif
|
||||
|
||||
void logInit(void)
|
||||
|
@ -142,14 +142,14 @@ static void logPrint(const char *buf, size_t size)
|
|||
}
|
||||
|
||||
#ifdef USE_BOOTLOG
|
||||
if ( (dmesg_head + size + 2) < (dmesg_buffer + USE_BOOTLOG) ) {
|
||||
if ( (bootlog_head + size + 2) < (bootlog_buffer + USE_BOOTLOG) ) {
|
||||
for (unsigned int ii = 0; ii < size; ii++) {
|
||||
*dmesg_head = buf[ii];
|
||||
dmesg_head++;
|
||||
*bootlog_head = buf[ii];
|
||||
bootlog_head++;
|
||||
}
|
||||
dmesg_head[0] = '\r';
|
||||
dmesg_head[1] = '\n';
|
||||
dmesg_head = dmesg_head + 2;
|
||||
bootlog_head[0] = '\r';
|
||||
bootlog_head[1] = '\n';
|
||||
bootlog_head = bootlog_head + 2;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -131,8 +131,8 @@ extern timeDelta_t cycleTime; // FIXME dependency on mw.c
|
|||
extern uint8_t detectedSensors[SENSOR_INDEX_COUNT];
|
||||
|
||||
#ifdef USE_BOOTLOG
|
||||
extern char dmesg_buffer[USE_BOOTLOG];
|
||||
extern char *dmesg_head;
|
||||
extern char bootlog_buffer[USE_BOOTLOG];
|
||||
extern char *bootlog_head;
|
||||
#endif
|
||||
|
||||
static serialPort_t *cliPort;
|
||||
|
@ -4804,11 +4804,11 @@ static void cliUbloxPrintSatelites(char *arg)
|
|||
#endif
|
||||
|
||||
#ifdef USE_BOOTLOG
|
||||
static void printDmesg(char *cmdline __attribute__((unused))) {
|
||||
int size = dmesg_head - dmesg_buffer;
|
||||
static void printBootLog(char *cmdline __attribute__((unused))) {
|
||||
int size = bootlog_head - bootlog_buffer;
|
||||
cliPrintLinef("log size written: %i of %i bytes reserved", size, USE_BOOTLOG);
|
||||
for (int ii = 0; ii < size; ii++) {
|
||||
cliWrite(dmesg_buffer[ii]);
|
||||
cliWrite(bootlog_buffer[ii]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -4833,7 +4833,7 @@ const clicmd_t cmdTable[] = {
|
|||
CLI_COMMAND_DEF("bind_rx", "initiate binding for RX SPI or SRXL2", NULL, cliRxBind),
|
||||
#endif
|
||||
#if defined(USE_BOOTLOG)
|
||||
CLI_COMMAND_DEF("bootlog", "show boot log", NULL, printDmesg),
|
||||
CLI_COMMAND_DEF("bootlog", "show boot log", NULL, printBootLog),
|
||||
#endif
|
||||
#ifdef USE_LED_STRIP
|
||||
CLI_COMMAND_DEF("color", "configure colors", NULL, cliColor),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue