Merge upstream changes from Marlin 2.1.1

This commit is contained in:
Stefan Kalscheuer
2022-09-03 09:23:32 +02:00
parent 626283aadb
commit 986e416c7f
1610 changed files with 73839 additions and 40857 deletions

View File

@@ -75,8 +75,8 @@ void vector_3::apply_rotation(const matrix_3x3 &matrix) {
matrix.vectors[0].z * _x + matrix.vectors[1].z * _y + matrix.vectors[2].z * _z };
}
void vector_3::debug(PGM_P const title) {
SERIAL_ECHOPGM_P(title);
void vector_3::debug(FSTR_P const title) {
SERIAL_ECHOF(title);
SERIAL_ECHOPAIR_F_P(SP_X_STR, x, 6);
SERIAL_ECHOPAIR_F_P(SP_Y_STR, y, 6);
SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, z, 6);
@@ -100,14 +100,14 @@ void matrix_3x3::set_to_identity() {
// Create a matrix from 3 vector_3 inputs
matrix_3x3 matrix_3x3::create_from_rows(const vector_3 &row_0, const vector_3 &row_1, const vector_3 &row_2) {
//row_0.debug(PSTR("row_0"));
//row_1.debug(PSTR("row_1"));
//row_2.debug(PSTR("row_2"));
//row_0.debug(F("row_0"));
//row_1.debug(F("row_1"));
//row_2.debug(F("row_2"));
matrix_3x3 new_matrix;
new_matrix.vectors[0] = row_0;
new_matrix.vectors[1] = row_1;
new_matrix.vectors[2] = row_2;
//new_matrix.debug(PSTR("new_matrix"));
//new_matrix.debug(F("new_matrix"));
return new_matrix;
}
@@ -117,14 +117,14 @@ matrix_3x3 matrix_3x3::create_look_at(const vector_3 &target) {
x_row = vector_3(1, 0, -target.x / target.z).get_normal(),
y_row = vector_3::cross(z_row, x_row).get_normal();
// x_row.debug(PSTR("x_row"));
// y_row.debug(PSTR("y_row"));
// z_row.debug(PSTR("z_row"));
// x_row.debug(F("x_row"));
// y_row.debug(F("y_row"));
// z_row.debug(F("z_row"));
// create the matrix already correctly transposed
matrix_3x3 rot = matrix_3x3::create_from_rows(x_row, y_row, z_row);
// rot.debug(PSTR("rot"));
// rot.debug(F("rot"));
return rot;
}
@@ -137,12 +137,11 @@ matrix_3x3 matrix_3x3::transpose(const matrix_3x3 &original) {
return new_matrix;
}
void matrix_3x3::debug(PGM_P const title) {
if (title) SERIAL_ECHOLNPGM_P(title);
void matrix_3x3::debug(FSTR_P const title) {
if (title) SERIAL_ECHOLNF(title);
LOOP_L_N(i, 3) {
LOOP_L_N(j, 3) {
if (vectors[i][j] >= 0.0) SERIAL_CHAR('+');
SERIAL_ECHO_F(vectors[i][j], 6);
serial_offset(vectors[i][j], 2);
SERIAL_CHAR(' ');
}
SERIAL_EOL();