Contact me: hankecnc@gmail.com

在 src/emc/usr_intf/halui.cc 中为“INCH_PER_MM”重新定义警告的补丁 #1417

推推 grbl 3年前 (2023-01-30) 309次浏览
关闭
mnarigon 打开了这个问题 2021 年 11 月 29 日 · 0 条评论
关闭

在 src/emc/usr_intf/halui.cc 中为“INCH_PER_MM”重新定义警告的补丁#1417

mnarigon 打开了这个问题 2021 年 11 月 29 日 · 0 条评论

注释

在 src/emc/usr_intf/halui.cc 中为“INCH_PER_MM”重新定义警告的补丁 #1417

在 linux 上使用 gcc 编译 linuxcnc master 分支时,我在 src/emc/usr_intf/halui.cc 的第 503 行收到“INCH_PER_MM”重新定义的警告。

halui.cc 包含 emc_nml.hh,其中包含定义 INCH_PER_MM 的 linuxcnc.h。

补丁是删除halui.cc中的define

”’
diff –git a/src/emc/usr_intf/halui.cc b/src/emc/usr_intf/halui.cc
index 41e25982a..899cd7dc1 100644
— a/src/emc/usr_intf/halui.cc
+ ++ b/src/emc/usr_intf/halui.cc
@@ -500,7 +500,6 @@ static enum {
#define CLOSE(a,b,eps) ((a)-(b) < +(eps ) && (a)-(b) > -(eps))
#define LINEAR_CLOSENESS 0.0001
#define ANGULAR_CLOSENESS 0.0001
-#define INCH_PER_MM (1.0/25.4)
#define CM_PER_MM 0.1
#define GRAD_PER_DEG (100.0/90.0)
#define RAD_PER_DEG TO_RAD //来自 posemath.h
”’