Apply Marlin coding standards to MBL class
This commit is contained in:
@@ -58,8 +58,8 @@
|
||||
* 188 M206 XYZ home_offset (float x3)
|
||||
*
|
||||
* Mesh bed leveling:
|
||||
* 200 M420 S status (0 = empty, 1 = has mesh numbers)
|
||||
* 201 z_offset (float) (added in V23)
|
||||
* 200 M420 S status (uint8)
|
||||
* 201 z_offset (float)
|
||||
* 205 mesh_num_x (uint8 as set in firmware)
|
||||
* 206 mesh_num_y (uint8 as set in firmware)
|
||||
* 207 G29 S3 XYZ z_values[][] (float x9, by default)
|
||||
@@ -187,21 +187,21 @@ void Config_StoreSettings() {
|
||||
EEPROM_WRITE_VAR(i, planner.max_e_jerk);
|
||||
EEPROM_WRITE_VAR(i, home_offset);
|
||||
|
||||
uint8_t dummy_uint8 = 0;
|
||||
uint8_t mesh_num_x = 3;
|
||||
uint8_t mesh_num_y = 3;
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
// Compile time test that sizeof(mbl.z_values) is as expected
|
||||
typedef char c_assert[(sizeof(mbl.z_values) == (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS) * sizeof(dummy)) ? 1 : -1];
|
||||
mesh_num_x = MESH_NUM_X_POINTS;
|
||||
mesh_num_y = MESH_NUM_Y_POINTS;
|
||||
dummy_uint8 = mbl.status & 0x01; // Do not save 'is active'
|
||||
uint8_t mesh_num_x = MESH_NUM_X_POINTS,
|
||||
mesh_num_y = MESH_NUM_Y_POINTS,
|
||||
dummy_uint8 = mbl.status & _BV(MBL_STATUS_HAS_MESH_BIT);
|
||||
EEPROM_WRITE_VAR(i, dummy_uint8);
|
||||
EEPROM_WRITE_VAR(i, mbl.z_offset);
|
||||
EEPROM_WRITE_VAR(i, mesh_num_x);
|
||||
EEPROM_WRITE_VAR(i, mesh_num_y);
|
||||
EEPROM_WRITE_VAR(i, mbl.z_values);
|
||||
#else
|
||||
uint8_t mesh_num_x = 3,
|
||||
mesh_num_y = 3,
|
||||
dummy_uint8 = 0;
|
||||
dummy = 0.0f;
|
||||
EEPROM_WRITE_VAR(i, dummy_uint8);
|
||||
EEPROM_WRITE_VAR(i, dummy);
|
||||
|
Reference in New Issue
Block a user