Simpler Allen Key config. Fixes, cleanups from refactor (#15256)

This commit is contained in:
Scott Lahteine
2019-09-14 03:05:10 -05:00
committed by GitHub
parent ffb418b226
commit 465c6d9230
62 changed files with 389 additions and 685 deletions

View File

@ -79,6 +79,7 @@
#define SBI32(n,b) (n |= _BV32(b))
#define CBI32(n,b) (n &= ~_BV32(b))
#define cu(x) ((x)*(x)*(x))
#define RADIANS(d) ((d)*float(M_PI)/180.0f)
#define DEGREES(r) ((r)*180.0f/float(M_PI))
#define HYPOT2(x,y) (sq(x)+sq(y))

View File

@ -68,7 +68,7 @@ void print_bin(const uint16_t val) {
}
}
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z) {
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float &x, const float &y, const float &z) {
serialprintPGM(prefix);
SERIAL_CHAR('(');
SERIAL_ECHO(x);

View File

@ -186,7 +186,7 @@ void serial_spaces(uint8_t count);
void print_bin(const uint16_t val);
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z);
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]);
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float &x, const float &y, const float &z);
#define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); }while(0)
#define SERIAL_XYZ(PREFIX,V...) do { print_xyz(PSTR(PREFIX), nullptr, V); }while(0)