Followup to float maths patch

This commit is contained in:
Scott Lahteine
2018-07-06 20:41:08 -05:00
parent b143441251
commit 63f4c9bdb9
5 changed files with 61 additions and 61 deletions

View File

@ -384,7 +384,7 @@ void MarlinSettings::postprocess() {
* M500 - Store Configuration
*/
bool MarlinSettings::save(PORTARG_SOLO) {
float dummy = 0.0f;
float dummy = 0;
char ver[4] = "ERR";
uint16_t working_crc = 0;
@ -466,7 +466,7 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(mesh_num_y);
EEPROM_WRITE(mbl.z_values);
#else // For disabled MBL write a default mesh
dummy = 0.0f;
dummy = 0;
const uint8_t mesh_num_x = 3, mesh_num_y = 3;
EEPROM_WRITE(dummy); // z_offset
EEPROM_WRITE(mesh_num_x);
@ -488,7 +488,7 @@ void MarlinSettings::postprocess() {
#if ABL_PLANAR
EEPROM_WRITE(planner.bed_level_matrix);
#else
dummy = 0.0f;
dummy = 0;
for (uint8_t q = 9; q--;) EEPROM_WRITE(dummy);
#endif
@ -512,7 +512,7 @@ void MarlinSettings::postprocess() {
// For disabled Bilinear Grid write an empty 3x3 grid
const uint8_t grid_max_x = 3, grid_max_y = 3;
const int bilinear_start[2] = { 0 }, bilinear_grid_spacing[2] = { 0 };
dummy = 0.0f;
dummy = 0;
EEPROM_WRITE(grid_max_x);
EEPROM_WRITE(grid_max_y);
EEPROM_WRITE(bilinear_grid_spacing);
@ -550,7 +550,7 @@ void MarlinSettings::postprocess() {
_FIELD_TEST(x_endstop_adj);
// Write dual endstops in X, Y, Z order. Unused = 0.0
dummy = 0.0f;
dummy = 0;
#if ENABLED(X_DUAL_ENDSTOPS)
EEPROM_WRITE(endstops.x_endstop_adj); // 1 float
#else
@ -602,7 +602,7 @@ void MarlinSettings::postprocess() {
{
dummy = DUMMY_PID_VALUE; // When read, will not change the existing value
EEPROM_WRITE(dummy); // Kp
dummy = 0.0f;
dummy = 0;
for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy); // Ki, Kd, Kc
}
@ -848,7 +848,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(LIN_ADVANCE)
EEPROM_WRITE(planner.extruder_advance_K);
#else
dummy = 0.0f;
dummy = 0;
EEPROM_WRITE(dummy);
#endif
@ -870,7 +870,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(CNC_COORDINATE_SYSTEMS)
EEPROM_WRITE(gcode.coordinate_system); // 27 floats
#else
dummy = 0.0f;
dummy = 0;
for (uint8_t q = MAX_COORDINATE_SYSTEMS * XYZ; q--;) EEPROM_WRITE(dummy);
#endif
@ -885,7 +885,7 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(planner.xz_skew_factor);
EEPROM_WRITE(planner.yz_skew_factor);
#else
dummy = 0.0f;
dummy = 0;
for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy);
#endif
@ -905,7 +905,7 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(dummy);
}
#else
dummy = 0.0f;
dummy = 0;
for (uint8_t q = MAX_EXTRUDERS * 2; q--;) EEPROM_WRITE(dummy);
#endif
@ -974,7 +974,7 @@ void MarlinSettings::postprocess() {
eeprom_error = true;
}
else {
float dummy = 0.0f;
float dummy = 0;
#if DISABLED(AUTO_BED_LEVELING_UBL) || DISABLED(FWRETRACT) || ENABLED(NO_VOLUMETRICS)
bool dummyb;
#endif