Browse Source

Merge pull request #5560 from thinkyhead/rc_bl_status

Have bed leveling status output current status, not requested.
Scott Lahteine 8 years ago
parent
commit
04f77df6c0
2 changed files with 6 additions and 5 deletions
  1. 5
    4
      Marlin/Marlin_main.cpp
  2. 1
    1
      Marlin/configuration_store.cpp

+ 5
- 4
Marlin/Marlin_main.cpp View File

7030
       if (code_seen('Z')) set_z_fade_height(code_value_linear_units());
7030
       if (code_seen('Z')) set_z_fade_height(code_value_linear_units());
7031
     #endif
7031
     #endif
7032
 
7032
 
7033
-    if (to_enable && !(
7033
+    const bool new_status =
7034
       #if ENABLED(MESH_BED_LEVELING)
7034
       #if ENABLED(MESH_BED_LEVELING)
7035
         mbl.active()
7035
         mbl.active()
7036
       #else
7036
       #else
7037
         planner.abl_enabled
7037
         planner.abl_enabled
7038
       #endif
7038
       #endif
7039
-    ) ) {
7040
-      to_enable = false;
7039
+    ;
7040
+
7041
+    if (to_enable && !new_status) {
7041
       SERIAL_ERROR_START;
7042
       SERIAL_ERROR_START;
7042
       SERIAL_ERRORLNPGM(MSG_ERR_M420_FAILED);
7043
       SERIAL_ERRORLNPGM(MSG_ERR_M420_FAILED);
7043
     }
7044
     }
7044
 
7045
 
7045
     SERIAL_ECHO_START;
7046
     SERIAL_ECHO_START;
7046
-    SERIAL_ECHOLNPAIR("Bed Leveling ", to_enable ? MSG_ON : MSG_OFF);
7047
+    SERIAL_ECHOLNPAIR("Bed Leveling ", new_status ? MSG_ON : MSG_OFF);
7047
 
7048
 
7048
     // V to print the matrix or mesh
7049
     // V to print the matrix or mesh
7049
     if (code_seen('V')) {
7050
     if (code_seen('V')) {

+ 1
- 1
Marlin/configuration_store.cpp View File

183
 
183
 
184
   bool eeprom_write_error;
184
   bool eeprom_write_error;
185
 
185
 
186
-  void _EEPROM_writeData(int &pos, uint8_t* value, uint16_t size) {
186
+  void _EEPROM_writeData(int &pos, const uint8_t* value, uint16_t size) {
187
     if (eeprom_write_error) return;
187
     if (eeprom_write_error) return;
188
     while (size--) {
188
     while (size--) {
189
       uint8_t * const p = (uint8_t * const)pos;
189
       uint8_t * const p = (uint8_t * const)pos;

Loading…
Cancel
Save