添加读取电机步数命令

添加新赋码仪检测命令,赋码仪注码命令
  添加检测并写入流水号命令
This commit is contained in:
ranchuan
2023-12-22 19:07:05 +08:00
parent d1e617afd3
commit 8558857fd4
12 changed files with 324 additions and 39 deletions

View File

@@ -89,7 +89,7 @@ void print_to_console(QtMsgType type, const QMessageLogContext &context, const Q
QString current_date_time = QDateTime::currentDateTime().toString("hh:mm:ss.zzz");
Q_UNUSED(current_date_time);
if(context.file!=0){
fprintf(stderr, "%s | %s | %s:%u | %s\n", msgHead[type], current_date_time.toLocal8Bit().constData(), &context.file[20], context.line, localMsg.constData());
fprintf(stderr, "%s | %s | %s:%u | %s\n", msgHead[type], current_date_time.toLocal8Bit().constData(), &context.file[10], context.line, localMsg.constData());
}else{
fprintf(stderr,"%s | %s | %s\n", msgHead[type], current_date_time.toLocal8Bit().constData(), localMsg.constData());
}
@@ -105,7 +105,7 @@ void print_to_file(QtMsgType type, const QMessageLogContext &context, const QStr
{
QTextStream tWrite(g_debug.file);
if(context.file!=0){
tWrite << QString::asprintf("%s | %s | %s:%u | %s\n", msgHead[type], current_date_time.toLocal8Bit().constData(), &context.file[20], context.line, localMsg.constData());
tWrite << QString::asprintf("%s | %s | %s:%u | %s\n", msgHead[type], current_date_time.toLocal8Bit().constData(), &context.file[10], context.line, localMsg.constData());
}else{
tWrite << QString::asprintf("%s | %s | %s\n", msgHead[type], current_date_time.toLocal8Bit().constData(), localMsg.constData());
}