log4cpp arm下毫秒修复
This commit is contained in:
parent
5e978eaea4
commit
c98aa7b5d6
@ -63,7 +63,11 @@ public:
|
||||
// Workpiece点云和角点检测结果转图像 - 将角点画成圆点
|
||||
static QImage GeneratePointCloudRetPointImage(const std::vector<std::vector<SVzNL3DPosition>>& scanLines,
|
||||
const std::vector<std::vector<SVzNL3DPoint>>& cornerPoints,
|
||||
double margin = 0.0);
|
||||
double margin = 0.0,
|
||||
double* outXMin = nullptr,
|
||||
double* outXMax = nullptr,
|
||||
double* outYMin = nullptr,
|
||||
double* outYMax = nullptr);
|
||||
|
||||
// ParticleSize点云和颗粒检测结果转图像 - 生成带颗粒标记的点云图像 (直接返回QImage)
|
||||
static QImage GeneratePointCloudImageWithParticles(
|
||||
|
||||
@ -629,7 +629,11 @@ void PointCloudImageUtils::DrawLapWeldResults(QPainter& painter,
|
||||
// Workpiece点云和角点检测结果转图像 - 将角点画成圆点
|
||||
QImage PointCloudImageUtils::GeneratePointCloudRetPointImage(const std::vector<std::vector<SVzNL3DPosition>>& scanLines,
|
||||
const std::vector<std::vector<SVzNL3DPoint>>& cornerPoints,
|
||||
double margin)
|
||||
double margin,
|
||||
double* outXMin,
|
||||
double* outXMax,
|
||||
double* outYMin,
|
||||
double* outYMax)
|
||||
{
|
||||
if (scanLines.empty()) {
|
||||
return QImage();
|
||||
@ -650,6 +654,12 @@ QImage PointCloudImageUtils::GeneratePointCloudRetPointImage(const std::vector<s
|
||||
return QImage();
|
||||
}
|
||||
|
||||
// 输出原始点云范围(扩展边界之前)
|
||||
if (outXMin) *outXMin = xMin;
|
||||
if (outXMax) *outXMax = xMax;
|
||||
if (outYMin) *outYMin = yMin;
|
||||
if (outYMax) *outYMax = yMax;
|
||||
|
||||
// 在3D范围上扩展边界(如果指定)
|
||||
if (margin > 0.0) {
|
||||
xMin -= margin;
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
ADD_DEFINITIONS(-D__OPENVMS__) #log4cpp 编译选项
|
||||
if(NOT WIN32)
|
||||
ADD_DEFINITIONS(-DLOG4CPP_HAVE_GETTIMEOFDAY) #ARM/Linux 上直接启用 gettimeofday,确保毫秒正确
|
||||
endif()
|
||||
ADD_DEFINITIONS(-DVR_UTILS_EXPORTS) #VrUtils 导出宏定义
|
||||
# ADD_COMPILE_OPTIONS(-Wno-deprecated-declarations) #auto_ptr警告消除
|
||||
|
||||
|
||||
@ -290,11 +290,7 @@ void VrLogUtils::UninitLog()
|
||||
/// 开启/关闭时间戳
|
||||
void VrLogUtils::EnableTime(bool bEnable)
|
||||
{
|
||||
if (nullptr != m_pLayout)
|
||||
{
|
||||
m_pLayout->setConversionPattern(bEnable ? "%d{%Y-%m-%d %H:%M:%S.%l} [%p] %m" : "%p %m");
|
||||
}
|
||||
g_isTimeEnabled = false;
|
||||
g_isTimeEnabled = bEnable;
|
||||
}
|
||||
|
||||
/// 输出log
|
||||
|
||||
@ -37,8 +37,10 @@
|
||||
#else
|
||||
# if defined(__MINGW32__)
|
||||
# include <log4cpp/config-MinGW32.h>
|
||||
//# else
|
||||
//# include <log4cpp/config.h>
|
||||
# else
|
||||
// Linux/ARM 等 POSIX 平台:启用 gettimeofday 以支持毫秒精度
|
||||
# define LOG4CPP_HAVE_GETTIMEOFDAY 1
|
||||
# define LOG4CPP_HAVE_SSTREAM 1
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user