[New Feature] I2C position encoder support (#6946)
* [New Feature] I2C position encoder support I plan to continue improving/cleaning this up, as there areas that need work. * let the cleanups begin. * progress * more progress * comments, rename files, etc. * clean * Cleanups per thinkyhead * a few more cleanups * cleanups, bugfixes, etc. * remove unnecessary passes_test(), additional cleanups/optimizations * cleanups * misc. * Fix up I2CPEM.init() and a few other things. * organize, fix, rename, etc. * more optimization * a few more tweaks
This commit is contained in:
@ -108,6 +108,8 @@
|
||||
#define HYPOT2(x,y) (sq(x)+sq(y))
|
||||
#define HYPOT(x,y) sqrt(HYPOT2(x,y))
|
||||
|
||||
#define SIGN(a) ((a>0)-(a<0))
|
||||
|
||||
// Macros to contrain values
|
||||
#define NOLESS(v,n) do{ if (v < n) v = n; }while(0)
|
||||
#define NOMORE(v,n) do{ if (v > n) v = n; }while(0)
|
||||
|
Reference in New Issue
Block a user