소스 검색

Have bed leveling status output current status, not requested.

Robert Kirk 8 년 전
부모
커밋
f724ef5820
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5
    4
      Marlin/Marlin_main.cpp

+ 5
- 4
Marlin/Marlin_main.cpp 파일 보기

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')) {

Loading…
취소
저장