Merge branch 'Fix_warnings_ledvinap' into fix_compiler_warnings

This commit is contained in:
Marek Bel 2018-08-01 17:39:54 +02:00
commit 1a2d7657dc

View File

@ -6685,13 +6685,12 @@ static bool lcd_selfcheck_axis_sg(char axis) {
enable_endstops(false); enable_endstops(false);
const char *_error_1; const char *_error_1;
const char *_error_2;
if (axis == X_AXIS) _error_1 = "X"; if (axis == X_AXIS) _error_1 = "X";
if (axis == Y_AXIS) _error_1 = "Y"; if (axis == Y_AXIS) _error_1 = "Y";
if (axis == Z_AXIS) _error_1 = "Z"; if (axis == Z_AXIS) _error_1 = "Z";
lcd_selftest_error(9, _error_1, _error_2); lcd_selftest_error(9, _error_1, NULL);
current_position[axis] = 0; current_position[axis] = 0;
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
reset_crash_det(axis); reset_crash_det(axis);
@ -6704,13 +6703,12 @@ static bool lcd_selfcheck_axis_sg(char axis) {
if (abs(measured_axis_length[0] - measured_axis_length[1]) > 1) { //check if difference between first and second measurement is low if (abs(measured_axis_length[0] - measured_axis_length[1]) > 1) { //check if difference between first and second measurement is low
//loose pulleys //loose pulleys
const char *_error_1; const char *_error_1;
const char *_error_2;
if (axis == X_AXIS) _error_1 = "X"; if (axis == X_AXIS) _error_1 = "X";
if (axis == Y_AXIS) _error_1 = "Y"; if (axis == Y_AXIS) _error_1 = "Y";
if (axis == Z_AXIS) _error_1 = "Z"; if (axis == Z_AXIS) _error_1 = "Z";
lcd_selftest_error(8, _error_1, _error_2); lcd_selftest_error(8, _error_1, NULL);
current_position[axis] = 0; current_position[axis] = 0;
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
reset_crash_det(axis); reset_crash_det(axis);
@ -7125,8 +7123,7 @@ static bool lcd_selftest_fsensor(void)
fsensor_init(); fsensor_init();
if (fsensor_not_responding) if (fsensor_not_responding)
{ {
const char *_err; lcd_selftest_error(11, NULL, NULL);
lcd_selftest_error(11, _err, _err);
} }
return (!fsensor_not_responding); return (!fsensor_not_responding);
} }
@ -7281,8 +7278,7 @@ static bool lcd_selftest_fan_dialog(int _fan)
} }
if (!_result) if (!_result)
{ {
const char *_err; lcd_selftest_error(_errno, NULL, NULL);
lcd_selftest_error(_errno, _err, _err);
} }
return _result; return _result;
} }