🧑‍💻 MAP macro for axis lists, etc. (#24191)

This commit is contained in:
Scott Lahteine
2022-05-22 16:08:29 -05:00
committed by Scott Lahteine
parent ecfe7b6400
commit 3c482a9ba1
11 changed files with 57 additions and 83 deletions

View File

@ -41,8 +41,6 @@
#define PCT_TO_PWM(X) ((X) * 255 / 100)
#define PCT_TO_SERVO(X) ((X) * 180 / 100)
// #define _MAP(N,S1,S2,D1,D2) ((N)*_MAX((D2)-(D1),0)/_MAX((S2)-(S1),1)+(D1))
class SpindleLaser {
public:
static const inline uint8_t pct_to_ocr(const_float_t pct) { return uint8_t(PCT_TO_PWM(pct)); }