This commit is contained in:
Tester23 2025-10-10 19:24:35 +02:00
parent 1ca376e9c0
commit 5ea4a6c5b9

View File

@ -276,6 +276,7 @@ void UART_DebugTool_Run(int auartindex) {
char tmp[128];
char *p = tmp;
int i;
int bytes = 0;
for (i = 0; i < sizeof(tmp) - 4; i++) {
if (UART_GetDataSizeEx(auartindex)==0) {
@ -286,12 +287,14 @@ void UART_DebugTool_Run(int auartindex) {
*p = ' ';
p++;
}
bytes++;
sprintf(p, "%02X", b);
p += 2;
UART_ConsumeBytesEx(auartindex,1);
}
*p = 0;
addLogAdv(LOG_INFO, LOG_FEATURE_CMD, "UART %i received: %s\n", auartindex, tmp);
addLogAdv(LOG_INFO, LOG_FEATURE_CMD, "UART %i received %i bytes: %s\n",
auartindex, bytes, tmp);
}
void UART_RunEverySecond() {
@ -301,7 +304,7 @@ void UART_RunEverySecond() {
}
}
}
// uartInit 115200
commandResult_t CMD_UART_Init(const void *context, const char *cmd, const char *args, int cmdFlags) {
int baud;