Update macros for parity with 2.0.x
This commit is contained in:
parent
7535c21894
commit
deaa70c2cc
@ -212,8 +212,6 @@ inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
|
|||||||
*/
|
*/
|
||||||
extern int16_t feedrate_percentage;
|
extern int16_t feedrate_percentage;
|
||||||
|
|
||||||
#define MMM_TO_MMS(MM_M) ((MM_M)/60.0)
|
|
||||||
#define MMS_TO_MMM(MM_S) ((MM_S)*60.0)
|
|
||||||
#define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01)
|
#define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01)
|
||||||
|
|
||||||
extern bool axis_relative_modes[];
|
extern bool axis_relative_modes[];
|
||||||
|
@ -117,7 +117,11 @@
|
|||||||
#define DEGREES(r) ((r)*180.0/M_PI)
|
#define DEGREES(r) ((r)*180.0/M_PI)
|
||||||
#define HYPOT2(x,y) (sq(x)+sq(y))
|
#define HYPOT2(x,y) (sq(x)+sq(y))
|
||||||
|
|
||||||
|
#define CIRCLE_AREA(R) (M_PI * sq(R))
|
||||||
|
#define CIRCLE_CIRC(R) (2.0 * M_PI * (R))
|
||||||
|
|
||||||
#define SIGN(a) ((a>0)-(a<0))
|
#define SIGN(a) ((a>0)-(a<0))
|
||||||
|
#define IS_POWER_OF_2(x) ((x) && !((x) & ((x) - 1)))
|
||||||
|
|
||||||
// Macros to contrain values
|
// Macros to contrain values
|
||||||
#define NOLESS(v,n) do{ if (v < n) v = n; }while(0)
|
#define NOLESS(v,n) do{ if (v < n) v = n; }while(0)
|
||||||
@ -184,6 +188,9 @@
|
|||||||
#define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)
|
#define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)
|
||||||
#define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON))
|
#define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON))
|
||||||
|
|
||||||
|
#define MMM_TO_MMS(MM_M) ((MM_M)/60.0)
|
||||||
|
#define MMS_TO_MMM(MM_S) ((MM_S)*60.0)
|
||||||
|
|
||||||
#define NOOP do{} while(0)
|
#define NOOP do{} while(0)
|
||||||
|
|
||||||
#define CEILING(x,y) (((x) + (y) - 1) / (y))
|
#define CEILING(x,y) (((x) + (y) - 1) / (y))
|
||||||
|
Loading…
Reference in New Issue
Block a user