浏览代码

Patch M_PI in Marduino.h

Scott Lahteine 6 年前
父节点
当前提交
44e4f853c8
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 4
    0
      Marlin/src/HAL/shared/Marduino.h
  2. 0
    4
      Marlin/src/core/macros.h

+ 4
- 0
Marlin/src/HAL/shared/Marduino.h 查看文件

64
 #define RST_JTAG       16
64
 #define RST_JTAG       16
65
 #define RST_SOFTWARE   32
65
 #define RST_SOFTWARE   32
66
 #define RST_BACKUP     64
66
 #define RST_BACKUP     64
67
+
68
+#ifndef M_PI
69
+  #define M_PI 3.14159265358979323846f
70
+#endif

+ 0
- 4
Marlin/src/core/macros.h 查看文件

84
 #define SBI32(n,b) (n |= _BV32(b))
84
 #define SBI32(n,b) (n |= _BV32(b))
85
 #define CBI32(n,b) (n &= ~_BV32(b))
85
 #define CBI32(n,b) (n &= ~_BV32(b))
86
 
86
 
87
-// Macros for maths shortcuts
88
-#undef M_PI
89
-#define M_PI 3.14159265358979323846f
90
-
91
 #define RADIANS(d) ((d)*float(M_PI)/180.0f)
87
 #define RADIANS(d) ((d)*float(M_PI)/180.0f)
92
 #define DEGREES(r) ((r)*180.0f/float(M_PI))
88
 #define DEGREES(r) ((r)*180.0f/float(M_PI))
93
 #define HYPOT2(x,y) (sq(x)+sq(y))
89
 #define HYPOT2(x,y) (sq(x)+sq(y))

正在加载...
取消
保存