Browse Source

Add Z Probe Offset to EEPROM and Ultra LCD

Alex Borro 11 years ago
parent
commit
05932e4458
5 changed files with 97 additions and 81 deletions
  1. 4
    1
      Marlin/ConfigurationStore.cpp
  2. 1
    0
      Marlin/Marlin.h
  3. 81
    79
      Marlin/Marlin_main.cpp
  4. 9
    1
      Marlin/language.h
  5. 2
    0
      Marlin/ultralcd.cpp

+ 4
- 1
Marlin/ConfigurationStore.cpp View File

37
 // the default values are used whenever there is a change to the data, to prevent
37
 // the default values are used whenever there is a change to the data, to prevent
38
 // wrong data being written to the variables.
38
 // wrong data being written to the variables.
39
 // ALSO:  always make sure the variables in the Store and retrieve sections are in the same order.
39
 // ALSO:  always make sure the variables in the Store and retrieve sections are in the same order.
40
-#define EEPROM_VERSION "V09"
40
+#define EEPROM_VERSION "V10"
41
 
41
 
42
 #ifdef EEPROM_SETTINGS
42
 #ifdef EEPROM_SETTINGS
43
 void Config_StoreSettings() 
43
 void Config_StoreSettings() 
70
   EEPROM_WRITE_VAR(i,absPreheatHotendTemp);
70
   EEPROM_WRITE_VAR(i,absPreheatHotendTemp);
71
   EEPROM_WRITE_VAR(i,absPreheatHPBTemp);
71
   EEPROM_WRITE_VAR(i,absPreheatHPBTemp);
72
   EEPROM_WRITE_VAR(i,absPreheatFanSpeed);
72
   EEPROM_WRITE_VAR(i,absPreheatFanSpeed);
73
+  EEPROM_WRITE_VAR(i,zprobe_zoffset);
73
   #ifdef PIDTEMP
74
   #ifdef PIDTEMP
74
     EEPROM_WRITE_VAR(i,Kp);
75
     EEPROM_WRITE_VAR(i,Kp);
75
     EEPROM_WRITE_VAR(i,Ki);
76
     EEPROM_WRITE_VAR(i,Ki);
210
         EEPROM_READ_VAR(i,absPreheatHotendTemp);
211
         EEPROM_READ_VAR(i,absPreheatHotendTemp);
211
         EEPROM_READ_VAR(i,absPreheatHPBTemp);
212
         EEPROM_READ_VAR(i,absPreheatHPBTemp);
212
         EEPROM_READ_VAR(i,absPreheatFanSpeed);
213
         EEPROM_READ_VAR(i,absPreheatFanSpeed);
214
+        EEPROM_READ_VAR(i,zprobe_zoffset);
213
         #ifndef PIDTEMP
215
         #ifndef PIDTEMP
214
         float Kp,Ki,Kd;
216
         float Kp,Ki,Kd;
215
         #endif
217
         #endif
272
     absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP;
274
     absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP;
273
     absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
275
     absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
274
 #endif
276
 #endif
277
+    zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER;
275
 #ifdef DOGLCD
278
 #ifdef DOGLCD
276
     lcd_contrast = DEFAULT_LCD_CONTRAST;
279
     lcd_contrast = DEFAULT_LCD_CONTRAST;
277
 #endif
280
 #endif

+ 1
- 0
Marlin/Marlin.h View File

210
 extern float min_pos[3];
210
 extern float min_pos[3];
211
 extern float max_pos[3];
211
 extern float max_pos[3];
212
 extern bool axis_known_position[3];
212
 extern bool axis_known_position[3];
213
+extern float zprobe_zoffset;
213
 extern int fanSpeed;
214
 extern int fanSpeed;
214
 #ifdef BARICUDA
215
 #ifdef BARICUDA
215
 extern int ValvePressure;
216
 extern int ValvePressure;

+ 81
- 79
Marlin/Marlin_main.cpp View File

196
 float min_pos[3] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS };
196
 float min_pos[3] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS };
197
 float max_pos[3] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
197
 float max_pos[3] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
198
 bool axis_known_position[3] = {false, false, false};
198
 bool axis_known_position[3] = {false, false, false};
199
+float zprobe_zoffset;
199
 
200
 
200
 // Extruder offset
201
 // Extruder offset
201
 #if EXTRUDERS > 1
202
 #if EXTRUDERS > 1
240
 float delta[3] = {0.0, 0.0, 0.0};
241
 float delta[3] = {0.0, 0.0, 0.0};
241
 #endif
242
 #endif
242
 
243
 
244
+  
243
 //===========================================================================
245
 //===========================================================================
244
 //=============================private variables=============================
246
 //=============================private variables=============================
245
 //===========================================================================
247
 //===========================================================================
779
 static float duplicate_extruder_x_offset = DEFAULT_DUPLICATION_X_OFFSET; // used in mode 2
781
 static float duplicate_extruder_x_offset = DEFAULT_DUPLICATION_X_OFFSET; // used in mode 2
780
 static float duplicate_extruder_temp_offset = 0; // used in mode 2
782
 static float duplicate_extruder_temp_offset = 0; // used in mode 2
781
 bool extruder_duplication_enabled = false; // used in mode 2
783
 bool extruder_duplication_enabled = false; // used in mode 2
782
-#endif //DUAL_X_CARRIAGE
784
+#endif //DUAL_X_CARRIAGE    
783
 
785
 
784
 static void axis_is_at_home(int axis) {
786
 static void axis_is_at_home(int axis) {
785
 #ifdef DUAL_X_CARRIAGE
787
 #ifdef DUAL_X_CARRIAGE
792
     }
794
     }
793
     else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
795
     else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
794
       current_position[X_AXIS] = base_home_pos(X_AXIS) + add_homeing[X_AXIS];
796
       current_position[X_AXIS] = base_home_pos(X_AXIS) + add_homeing[X_AXIS];
795
-      min_pos[X_AXIS] =          base_min_pos(X_AXIS) + add_homeing[X_AXIS];
796
-      max_pos[X_AXIS] =          min(base_max_pos(X_AXIS) + add_homeing[X_AXIS],
797
+      min_pos[X_AXIS] =          base_min_pos(X_AXIS) + add_homeing[X_AXIS]; 
798
+      max_pos[X_AXIS] =          min(base_max_pos(X_AXIS) + add_homeing[X_AXIS], 
797
                                   max(extruder_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
799
                                   max(extruder_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
798
       return;
800
       return;
799
     }
801
     }
824
     current_position[Z_AXIS] = corrected_position.z;
826
     current_position[Z_AXIS] = corrected_position.z;
825
 
827
 
826
     // but the bed at 0 so we don't go below it.
828
     // but the bed at 0 so we don't go below it.
827
-    current_position[Z_AXIS] = -Z_PROBE_OFFSET_FROM_EXTRUDER;
829
+    current_position[Z_AXIS] = zprobe_zoffset; // in the lsq we reach here after raising the extruder due to the loop structure
828
 
830
 
829
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
831
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
830
 }
832
 }
860
     current_position[Z_AXIS] = corrected_position.z;
862
     current_position[Z_AXIS] = corrected_position.z;
861
 
863
 
862
     // but the bed at 0 so we don't go below it.
864
     // but the bed at 0 so we don't go below it.
863
-    current_position[Z_AXIS] = -Z_PROBE_OFFSET_FROM_EXTRUDER;
865
+    current_position[Z_AXIS] = zprobe_zoffset;
864
 
866
 
865
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
867
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
866
 }
868
 }
885
     st_synchronize();
887
     st_synchronize();
886
 
888
 
887
     // move back down slowly to find bed
889
     // move back down slowly to find bed
888
-    feedrate = homing_feedrate[Z_AXIS]/4;
890
+    feedrate = homing_feedrate[Z_AXIS]/4; 
889
     zPosition -= home_retract_mm(Z_AXIS) * 2;
891
     zPosition -= home_retract_mm(Z_AXIS) * 2;
890
     plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder);
892
     plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder);
891
     st_synchronize();
893
     st_synchronize();
982
 
984
 
983
     current_position[axis] = 0;
985
     current_position[axis] = 0;
984
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
986
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
985
-
987
+	
986
 
988
 
987
     // Engage Servo endstop if enabled
989
     // Engage Servo endstop if enabled
988
     #ifdef SERVO_ENDSTOPS
990
     #ifdef SERVO_ENDSTOPS
1040
 #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1042
 #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1041
     if (axis==Z_AXIS) retract_z_probe();
1043
     if (axis==Z_AXIS) retract_z_probe();
1042
 #endif
1044
 #endif
1043
-
1045
+    
1044
   }
1046
   }
1045
 }
1047
 }
1046
 #define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
1048
 #define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
1114
         destination[Y_AXIS]=current_position[Y_AXIS];
1116
         destination[Y_AXIS]=current_position[Y_AXIS];
1115
         destination[Z_AXIS]=current_position[Z_AXIS];
1117
         destination[Z_AXIS]=current_position[Z_AXIS];
1116
         current_position[Z_AXIS]+=retract_zlift;
1118
         current_position[Z_AXIS]+=retract_zlift;
1117
-        destination[E_AXIS]=current_position[E_AXIS]+retract_length+retract_recover_length;
1119
+        destination[E_AXIS]=current_position[E_AXIS]+retract_length+retract_recover_length; 
1118
         feedrate=retract_recover_feedrate;
1120
         feedrate=retract_recover_feedrate;
1119
         retracted=false;
1121
         retracted=false;
1120
         prepare_move();
1122
         prepare_move();
1228
         // reset state used by the different modes
1230
         // reset state used by the different modes
1229
         memcpy(raised_parked_position, current_position, sizeof(raised_parked_position));
1231
         memcpy(raised_parked_position, current_position, sizeof(raised_parked_position));
1230
         delayed_move_time = 0;
1232
         delayed_move_time = 0;
1231
-        active_extruder_parked = true;
1232
-      #else
1233
+        active_extruder_parked = true; 
1234
+      #else      
1233
         HOMEAXIS(X);
1235
         HOMEAXIS(X);
1234
-      #endif
1236
+      #endif         
1235
       }
1237
       }
1236
 
1238
 
1237
       if((home_all_axis) || (code_seen(axis_codes[Y_AXIS]))) {
1239
       if((home_all_axis) || (code_seen(axis_codes[Y_AXIS]))) {
1250
           current_position[Y_AXIS]=code_value()+add_homeing[1];
1252
           current_position[Y_AXIS]=code_value()+add_homeing[1];
1251
         }
1253
         }
1252
       }
1254
       }
1253
-
1255
+      
1254
       #if Z_HOME_DIR < 0                      // If homing towards BED do Z last
1256
       #if Z_HOME_DIR < 0                      // If homing towards BED do Z last
1255
         #ifndef Z_SAFE_HOMING
1257
         #ifndef Z_SAFE_HOMING
1256
           if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1258
           if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1262
             #endif
1264
             #endif
1263
             HOMEAXIS(Z);
1265
             HOMEAXIS(Z);
1264
           }
1266
           }
1265
-        #else                      // Z Safe mode activated.
1267
+        #else                      // Z Safe mode activated. 
1266
           if(home_all_axis) {
1268
           if(home_all_axis) {
1267
             destination[X_AXIS] = round(Z_SAFE_HOMING_X_POINT - X_PROBE_OFFSET_FROM_EXTRUDER);
1269
             destination[X_AXIS] = round(Z_SAFE_HOMING_X_POINT - X_PROBE_OFFSET_FROM_EXTRUDER);
1268
             destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - Y_PROBE_OFFSET_FROM_EXTRUDER);
1270
             destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - Y_PROBE_OFFSET_FROM_EXTRUDER);
1269
             destination[Z_AXIS] = Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS) * (-1);    // Set destination away from bed
1271
             destination[Z_AXIS] = Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS) * (-1);    // Set destination away from bed
1270
             feedrate = XY_TRAVEL_SPEED;
1272
             feedrate = XY_TRAVEL_SPEED;
1271
             current_position[Z_AXIS] = 0;
1273
             current_position[Z_AXIS] = 0;
1272
-
1274
+			
1273
             plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1275
             plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1274
             plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate, active_extruder);
1276
             plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate, active_extruder);
1275
             st_synchronize();
1277
             st_synchronize();
1287
               && (current_position[Y_AXIS]+Y_PROBE_OFFSET_FROM_EXTRUDER <= Y_MAX_POS)) {
1289
               && (current_position[Y_AXIS]+Y_PROBE_OFFSET_FROM_EXTRUDER <= Y_MAX_POS)) {
1288
 
1290
 
1289
               current_position[Z_AXIS] = 0;
1291
               current_position[Z_AXIS] = 0;
1290
-              plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1292
+              plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);			  
1291
               destination[Z_AXIS] = Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS) * (-1);    // Set destination away from bed
1293
               destination[Z_AXIS] = Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS) * (-1);    // Set destination away from bed
1292
               feedrate = max_feedrate[Z_AXIS];
1294
               feedrate = max_feedrate[Z_AXIS];
1293
               plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate, active_extruder);
1295
               plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate, active_extruder);
1307
         #endif
1309
         #endif
1308
       #endif
1310
       #endif
1309
 
1311
 
1310
-
1311
-
1312
+      
1313
+     
1312
       if(code_seen(axis_codes[Z_AXIS])) {
1314
       if(code_seen(axis_codes[Z_AXIS])) {
1313
         if(code_value_long() != 0) {
1315
         if(code_value_long() != 0) {
1314
           current_position[Z_AXIS]=code_value()+add_homeing[2];
1316
           current_position[Z_AXIS]=code_value()+add_homeing[2];
1316
       }
1318
       }
1317
       #ifdef ENABLE_AUTO_BED_LEVELING
1319
       #ifdef ENABLE_AUTO_BED_LEVELING
1318
         if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1320
         if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1319
-          current_position[Z_AXIS] -= Z_PROBE_OFFSET_FROM_EXTRUDER;  //Add Z_Probe offset (the distance is negative)
1321
+          current_position[Z_AXIS] += zprobe_zoffset;  //Add Z_Probe offset (the distance is negative)
1320
         }
1322
         }
1321
       #endif
1323
       #endif
1322
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1324
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1471
             run_z_probe();
1473
             run_z_probe();
1472
             float z_at_xLeft_yFront = current_position[Z_AXIS];
1474
             float z_at_xLeft_yFront = current_position[Z_AXIS];
1473
             retract_z_probe();
1475
             retract_z_probe();
1474
-
1476
+            
1475
             SERIAL_PROTOCOLPGM("Bed x: ");
1477
             SERIAL_PROTOCOLPGM("Bed x: ");
1476
             SERIAL_PROTOCOL(LEFT_PROBE_BED_POSITION);
1478
             SERIAL_PROTOCOL(LEFT_PROBE_BED_POSITION);
1477
             SERIAL_PROTOCOLPGM(" y: ");
1479
             SERIAL_PROTOCOLPGM(" y: ");
1489
             run_z_probe();
1491
             run_z_probe();
1490
             float z_at_xRight_yFront = current_position[Z_AXIS];
1492
             float z_at_xRight_yFront = current_position[Z_AXIS];
1491
             retract_z_probe(); // Retract Z Servo endstop if available
1493
             retract_z_probe(); // Retract Z Servo endstop if available
1492
-
1494
+            
1493
             SERIAL_PROTOCOLPGM("Bed x: ");
1495
             SERIAL_PROTOCOLPGM("Bed x: ");
1494
             SERIAL_PROTOCOL(RIGHT_PROBE_BED_POSITION);
1496
             SERIAL_PROTOCOL(RIGHT_PROBE_BED_POSITION);
1495
             SERIAL_PROTOCOLPGM(" y: ");
1497
             SERIAL_PROTOCOLPGM(" y: ");
1504
          
1506
          
1505
             
1507
             
1506
 #endif // ACCURATE_BED_LEVELING
1508
 #endif // ACCURATE_BED_LEVELING
1507
-            st_synchronize();
1509
+            st_synchronize();            
1508
 
1510
 
1509
             // The following code correct the Z height difference from z-probe position and hotend tip position.
1511
             // The following code correct the Z height difference from z-probe position and hotend tip position.
1510
-            // The Z height on homing is measured by Z-Probe, but the probe is quite far from the hotend.
1512
+            // The Z height on homing is measured by Z-Probe, but the probe is quite far from the hotend. 
1511
             // When the bed is uneven, this height must be corrected.
1513
             // When the bed is uneven, this height must be corrected.
1512
             real_z = float(st_get_position(Z_AXIS))/axis_steps_per_unit[Z_AXIS];  //get the real Z (since the auto bed leveling is already correcting the plane)
1514
             real_z = float(st_get_position(Z_AXIS))/axis_steps_per_unit[Z_AXIS];  //get the real Z (since the auto bed leveling is already correcting the plane)
1513
             x_tmp = current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER;
1515
             x_tmp = current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER;
1519
             plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1521
             plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1520
         }
1522
         }
1521
         break;
1523
         break;
1522
-
1524
+        
1523
     case 30: // G30 Single Z Probe
1525
     case 30: // G30 Single Z Probe
1524
         {
1526
         {
1525
             engage_z_probe(); // Engage Z Servo endstop if available
1527
             engage_z_probe(); // Engage Z Servo endstop if available
1526
-
1528
+            
1527
             st_synchronize();
1529
             st_synchronize();
1528
             // TODO: make sure the bed_level_rotation_matrix is identity or the planner will get set incorectly
1530
             // TODO: make sure the bed_level_rotation_matrix is identity or the planner will get set incorectly
1529
             setup_for_endstop_move();
1531
             setup_for_endstop_move();
1674
         card.removeFile(strchr_pointer + 4);
1676
         card.removeFile(strchr_pointer + 4);
1675
       }
1677
       }
1676
       break;
1678
       break;
1677
-    case 32: //M32 - Select file and start SD print
1679
+    case 32: //M32 - Select file and start SD print 
1678
     {
1680
     {
1679
       if(card.sdprinting) {
1681
       if(card.sdprinting) {
1680
         st_synchronize();
1682
         st_synchronize();
1681
 
1683
 
1682
       }
1684
       }
1683
-      starpos = (strchr(strchr_pointer + 4,'*'));
1684
-
1685
+      starpos = (strchr(strchr_pointer + 4,'*')); 
1686
+      
1685
       char* namestartpos = (strchr(strchr_pointer + 4,'!'));   //find ! to indicate filename string start.
1687
       char* namestartpos = (strchr(strchr_pointer + 4,'!'));   //find ! to indicate filename string start.
1686
       if(namestartpos==NULL)
1688
       if(namestartpos==NULL)
1687
       {
1689
       {
1689
       }
1691
       }
1690
       else
1692
       else
1691
         namestartpos++; //to skip the '!'
1693
         namestartpos++; //to skip the '!'
1692
-
1694
+        
1693
       if(starpos!=NULL)
1695
       if(starpos!=NULL)
1694
         *(starpos-1)='\0';
1696
         *(starpos-1)='\0';
1695
-
1697
+            
1696
       bool call_procedure=(code_seen('P'));
1698
       bool call_procedure=(code_seen('P'));
1697
-
1698
-      if(strchr_pointer>namestartpos)
1699
+      
1700
+      if(strchr_pointer>namestartpos) 
1699
         call_procedure=false;  //false alert, 'P' found within filename
1701
         call_procedure=false;  //false alert, 'P' found within filename
1700
-
1701
-      if( card.cardOK )
1702
+      
1703
+      if( card.cardOK ) 
1702
       {
1704
       {
1703
         card.openFile(namestartpos,true,!call_procedure);
1705
         card.openFile(namestartpos,true,!call_procedure);
1704
         if(code_seen('S'))
1706
         if(code_seen('S'))
1771
 #ifdef DUAL_X_CARRIAGE
1773
 #ifdef DUAL_X_CARRIAGE
1772
       if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && tmp_extruder == 0)
1774
       if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && tmp_extruder == 0)
1773
         setTargetHotend1(code_value() == 0.0 ? 0.0 : code_value() + duplicate_extruder_temp_offset);
1775
         setTargetHotend1(code_value() == 0.0 ? 0.0 : code_value() + duplicate_extruder_temp_offset);
1774
-#endif
1776
+#endif          
1775
       setWatch();
1777
       setWatch();
1776
       break;
1778
       break;
1777
     case 140: // M140 set bed temp
1779
     case 140: // M140 set bed temp
1827
             SERIAL_PROTOCOL_F(rawHotendTemp(cur_extruder)/OVERSAMPLENR,0);
1829
             SERIAL_PROTOCOL_F(rawHotendTemp(cur_extruder)/OVERSAMPLENR,0);
1828
           }
1830
           }
1829
         #endif
1831
         #endif
1830
-
1832
+		
1831
         SERIAL_PROTOCOLLN("");
1833
         SERIAL_PROTOCOLLN("");
1832
       return;
1834
       return;
1833
       break;
1835
       break;
1845
 #ifdef DUAL_X_CARRIAGE
1847
 #ifdef DUAL_X_CARRIAGE
1846
         if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && tmp_extruder == 0)
1848
         if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && tmp_extruder == 0)
1847
           setTargetHotend1(code_value() == 0.0 ? 0.0 : code_value() + duplicate_extruder_temp_offset);
1849
           setTargetHotend1(code_value() == 0.0 ? 0.0 : code_value() + duplicate_extruder_temp_offset);
1848
-#endif
1850
+#endif          
1849
         CooldownNoWait = true;
1851
         CooldownNoWait = true;
1850
       } else if (code_seen('R')) {
1852
       } else if (code_seen('R')) {
1851
         setTargetHotend(code_value(), tmp_extruder);
1853
         setTargetHotend(code_value(), tmp_extruder);
1852
 #ifdef DUAL_X_CARRIAGE
1854
 #ifdef DUAL_X_CARRIAGE
1853
         if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && tmp_extruder == 0)
1855
         if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && tmp_extruder == 0)
1854
           setTargetHotend1(code_value() == 0.0 ? 0.0 : code_value() + duplicate_extruder_temp_offset);
1856
           setTargetHotend1(code_value() == 0.0 ? 0.0 : code_value() + duplicate_extruder_temp_offset);
1855
-#endif
1857
+#endif          
1856
         CooldownNoWait = false;
1858
         CooldownNoWait = false;
1857
       }
1859
       }
1858
       #ifdef AUTOTEMP
1860
       #ifdef AUTOTEMP
2016
             SET_OUTPUT(SUICIDE_PIN);
2018
             SET_OUTPUT(SUICIDE_PIN);
2017
             WRITE(SUICIDE_PIN, HIGH);
2019
             WRITE(SUICIDE_PIN, HIGH);
2018
         #endif
2020
         #endif
2019
-
2021
+        
2020
         #ifdef ULTIPANEL
2022
         #ifdef ULTIPANEL
2021
           powersupply = true;
2023
           powersupply = true;
2022
           LCD_MESSAGEPGM(WELCOME_MSG);
2024
           LCD_MESSAGEPGM(WELCOME_MSG);
2173
       #endif
2175
       #endif
2174
       break;
2176
       break;
2175
       //TODO: update for all axis, use for loop
2177
       //TODO: update for all axis, use for loop
2176
-    #ifdef BLINKM
2178
+    #ifdef BLINKM  
2177
     case 150: // M150
2179
     case 150: // M150
2178
       {
2180
       {
2179
         byte red;
2181
         byte red;
2180
         byte grn;
2182
         byte grn;
2181
         byte blu;
2183
         byte blu;
2182
-
2184
+        
2183
         if(code_seen('R')) red = code_value();
2185
         if(code_seen('R')) red = code_value();
2184
         if(code_seen('U')) grn = code_value();
2186
         if(code_seen('U')) grn = code_value();
2185
         if(code_seen('B')) blu = code_value();
2187
         if(code_seen('B')) blu = code_value();
2186
-
2187
-        SendColors(red,grn,blu);
2188
+        
2189
+        SendColors(red,grn,blu);        
2188
       }
2190
       }
2189
       break;
2191
       break;
2190
     #endif //BLINKM
2192
     #endif //BLINKM
2306
       {
2308
       {
2307
         extruder_offset[Z_AXIS][tmp_extruder] = code_value();
2309
         extruder_offset[Z_AXIS][tmp_extruder] = code_value();
2308
       }
2310
       }
2309
-      #endif
2311
+      #endif       
2310
       SERIAL_ECHO_START;
2312
       SERIAL_ECHO_START;
2311
       SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
2313
       SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
2312
       for(tmp_extruder = 0; tmp_extruder < EXTRUDERS; tmp_extruder++)
2314
       for(tmp_extruder = 0; tmp_extruder < EXTRUDERS; tmp_extruder++)
2339
       }
2341
       }
2340
     }
2342
     }
2341
     break;
2343
     break;
2342
-
2344
+	
2343
 	case 226: // M226 P<pin number> S<pin state>- Wait until the specified pin reaches the state required
2345
 	case 226: // M226 P<pin number> S<pin state>- Wait until the specified pin reaches the state required
2344
 	{
2346
 	{
2345
       if(code_seen('P')){
2347
       if(code_seen('P')){
2346
         int pin_number = code_value(); // pin number
2348
         int pin_number = code_value(); // pin number
2347
         int pin_state = -1; // required pin state - default is inverted
2349
         int pin_state = -1; // required pin state - default is inverted
2348
-
2350
+        
2349
         if(code_seen('S')) pin_state = code_value(); // required pin state
2351
         if(code_seen('S')) pin_state = code_value(); // required pin state
2350
-
2352
+      
2351
         if(pin_state >= -1 && pin_state <= 1){
2353
         if(pin_state >= -1 && pin_state <= 1){
2352
-
2354
+        
2353
           for(int8_t i = 0; i < (int8_t)sizeof(sensitive_pins); i++)
2355
           for(int8_t i = 0; i < (int8_t)sizeof(sensitive_pins); i++)
2354
           {
2356
           {
2355
             if (sensitive_pins[i] == pin_number)
2357
             if (sensitive_pins[i] == pin_number)
2358
               break;
2360
               break;
2359
             }
2361
             }
2360
           }
2362
           }
2361
-
2363
+        
2362
           if (pin_number > -1)
2364
           if (pin_number > -1)
2363
           {
2365
           {
2364
             st_synchronize();
2366
             st_synchronize();
2365
-
2367
+            
2366
             pinMode(pin_number, INPUT);
2368
             pinMode(pin_number, INPUT);
2367
-
2369
+            
2368
             int target;
2370
             int target;
2369
             switch(pin_state){
2371
             switch(pin_state){
2370
             case 1:
2372
             case 1:
2371
               target = HIGH;
2373
               target = HIGH;
2372
               break;
2374
               break;
2373
-
2375
+            
2374
             case 0:
2376
             case 0:
2375
               target = LOW;
2377
               target = LOW;
2376
               break;
2378
               break;
2377
-
2379
+            
2378
             case -1:
2380
             case -1:
2379
               target = !digitalRead(pin_number);
2381
               target = !digitalRead(pin_number);
2380
               break;
2382
               break;
2381
             }
2383
             }
2382
-
2384
+            
2383
             while(digitalRead(pin_number) != target){
2385
             while(digitalRead(pin_number) != target){
2384
               manage_heater();
2386
               manage_heater();
2385
               manage_inactivity();
2387
               manage_inactivity();
2389
         }
2391
         }
2390
       }
2392
       }
2391
     }
2393
     }
2392
-    break;
2394
+    break;	
2393
 
2395
 
2394
     #if NUM_SERVOS > 0
2396
     #if NUM_SERVOS > 0
2395
     case 280: // M280 - set servo position absolute. P: servo index, S: angle or microseconds
2397
     case 280: // M280 - set servo position absolute. P: servo index, S: angle or microseconds
2565
         engage_z_probe();    // Engage Z Servo endstop if available
2567
         engage_z_probe();    // Engage Z Servo endstop if available
2566
     }
2568
     }
2567
     break;
2569
     break;
2568
-
2570
+    
2569
     case 402:
2571
     case 402:
2570
     {
2572
     {
2571
         retract_z_probe();    // Retract Z Servo endstop if enabled
2573
         retract_z_probe();    // Retract Z Servo endstop if enabled
2572
     }
2574
     }
2573
     break;
2575
     break;
2574
-#endif
2576
+#endif    
2575
     case 500: // M500 Store settings in EEPROM
2577
     case 500: // M500 Store settings in EEPROM
2576
     {
2578
     {
2577
         Config_StoreSettings();
2579
         Config_StoreSettings();
2729
               //    M605 S0: Full control mode. The slicer has full control over x-carriage movement
2731
               //    M605 S0: Full control mode. The slicer has full control over x-carriage movement
2730
               //    M605 S1: Auto-park mode. The inactive head will auto park/unpark without slicer involvement
2732
               //    M605 S1: Auto-park mode. The inactive head will auto park/unpark without slicer involvement
2731
               //    M605 S2 [Xnnn] [Rmmm]: Duplication mode. The second extruder will duplicate the first with nnn
2733
               //    M605 S2 [Xnnn] [Rmmm]: Duplication mode. The second extruder will duplicate the first with nnn
2732
-              //                         millimeters x-offset and an optional differential hotend temperature of
2734
+              //                         millimeters x-offset and an optional differential hotend temperature of 
2733
               //                         mmm degrees. E.g., with "M605 S2 X100 R2" the second extruder will duplicate
2735
               //                         mmm degrees. E.g., with "M605 S2 X100 R2" the second extruder will duplicate
2734
               //                         the first with a spacing of 100mm in the x direction and 2 degrees hotter.
2736
               //                         the first with a spacing of 100mm in the x direction and 2 degrees hotter.
2735
               //
2737
               //
2736
               //    Note: the X axis should be homed after changing dual x-carriage mode.
2738
               //    Note: the X axis should be homed after changing dual x-carriage mode.
2737
     {
2739
     {
2738
         st_synchronize();
2740
         st_synchronize();
2739
-
2741
+        
2740
         if (code_seen('S'))
2742
         if (code_seen('S'))
2741
           dual_x_carriage_mode = code_value();
2743
           dual_x_carriage_mode = code_value();
2742
 
2744
 
2747
 
2749
 
2748
           if (code_seen('R'))
2750
           if (code_seen('R'))
2749
             duplicate_extruder_temp_offset = code_value();
2751
             duplicate_extruder_temp_offset = code_value();
2750
-
2752
+            
2751
           SERIAL_ECHO_START;
2753
           SERIAL_ECHO_START;
2752
           SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
2754
           SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
2753
           SERIAL_ECHO(" ");
2755
           SERIAL_ECHO(" ");
2763
         {
2765
         {
2764
           dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
2766
           dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
2765
         }
2767
         }
2766
-
2768
+        
2767
         active_extruder_parked = false;
2769
         active_extruder_parked = false;
2768
         extruder_duplication_enabled = false;
2770
         extruder_duplication_enabled = false;
2769
         delayed_move_time = 0;
2771
         delayed_move_time = 0;
2770
     }
2772
     }
2771
     break;
2773
     break;
2772
-    #endif //DUAL_X_CARRIAGE
2774
+    #endif //DUAL_X_CARRIAGE         
2773
 
2775
 
2774
     case 907: // M907 Set digital trimpot motor current using axis codes.
2776
     case 907: // M907 Set digital trimpot motor current using axis codes.
2775
     {
2777
     {
2859
         // Save current position to return to after applying extruder offset
2861
         // Save current position to return to after applying extruder offset
2860
         memcpy(destination, current_position, sizeof(destination));
2862
         memcpy(destination, current_position, sizeof(destination));
2861
       #ifdef DUAL_X_CARRIAGE
2863
       #ifdef DUAL_X_CARRIAGE
2862
-        if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE && Stopped == false &&
2864
+        if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE && Stopped == false && 
2863
             (delayed_move_time != 0 || current_position[X_AXIS] != x_home_pos(active_extruder)))
2865
             (delayed_move_time != 0 || current_position[X_AXIS] != x_home_pos(active_extruder)))
2864
         {
2866
         {
2865
           // Park old head: 1) raise 2) move to park position 3) lower
2867
           // Park old head: 1) raise 2) move to park position 3) lower
2866
-          plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT,
2868
+          plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT, 
2867
                 current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
2869
                 current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
2868
-          plan_buffer_line(x_home_pos(active_extruder), current_position[Y_AXIS], current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT,
2870
+          plan_buffer_line(x_home_pos(active_extruder), current_position[Y_AXIS], current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT, 
2869
                 current_position[E_AXIS], max_feedrate[X_AXIS], active_extruder);
2871
                 current_position[E_AXIS], max_feedrate[X_AXIS], active_extruder);
2870
-          plan_buffer_line(x_home_pos(active_extruder), current_position[Y_AXIS], current_position[Z_AXIS],
2872
+          plan_buffer_line(x_home_pos(active_extruder), current_position[Y_AXIS], current_position[Z_AXIS], 
2871
                 current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
2873
                 current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
2872
           st_synchronize();
2874
           st_synchronize();
2873
         }
2875
         }
2874
-
2876
+        
2875
         // apply Y & Z extruder offset (x offset is already used in determining home pos)
2877
         // apply Y & Z extruder offset (x offset is already used in determining home pos)
2876
         current_position[Y_AXIS] = current_position[Y_AXIS] -
2878
         current_position[Y_AXIS] = current_position[Y_AXIS] -
2877
                      extruder_offset[Y_AXIS][active_extruder] +
2879
                      extruder_offset[Y_AXIS][active_extruder] +
2879
         current_position[Z_AXIS] = current_position[Z_AXIS] -
2881
         current_position[Z_AXIS] = current_position[Z_AXIS] -
2880
                      extruder_offset[Z_AXIS][active_extruder] +
2882
                      extruder_offset[Z_AXIS][active_extruder] +
2881
                      extruder_offset[Z_AXIS][tmp_extruder];
2883
                      extruder_offset[Z_AXIS][tmp_extruder];
2882
-
2884
+                     
2883
         active_extruder = tmp_extruder;
2885
         active_extruder = tmp_extruder;
2884
 
2886
 
2885
         // This function resets the max/min values - the current position may be overwritten below.
2887
         // This function resets the max/min values - the current position may be overwritten below.
2887
 
2889
 
2888
         if (dual_x_carriage_mode == DXC_FULL_CONTROL_MODE)
2890
         if (dual_x_carriage_mode == DXC_FULL_CONTROL_MODE)
2889
         {
2891
         {
2890
-          current_position[X_AXIS] = inactive_extruder_x_pos;
2892
+          current_position[X_AXIS] = inactive_extruder_x_pos; 
2891
           inactive_extruder_x_pos = destination[X_AXIS];
2893
           inactive_extruder_x_pos = destination[X_AXIS];
2892
         }
2894
         }
2893
         else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE)
2895
         else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE)
2894
         {
2896
         {
2895
           active_extruder_parked = (active_extruder == 0); // this triggers the second extruder to move into the duplication position
2897
           active_extruder_parked = (active_extruder == 0); // this triggers the second extruder to move into the duplication position
2896
           if (active_extruder == 0 || active_extruder_parked)
2898
           if (active_extruder == 0 || active_extruder_parked)
2897
-            current_position[X_AXIS] = inactive_extruder_x_pos;
2899
+            current_position[X_AXIS] = inactive_extruder_x_pos; 
2898
           else
2900
           else
2899
-            current_position[X_AXIS] = destination[X_AXIS] + duplicate_extruder_x_offset;
2901
+            current_position[X_AXIS] = destination[X_AXIS] + duplicate_extruder_x_offset; 
2900
           inactive_extruder_x_pos = destination[X_AXIS];
2902
           inactive_extruder_x_pos = destination[X_AXIS];
2901
-          extruder_duplication_enabled = false;
2903
+          extruder_duplication_enabled = false; 
2902
         }
2904
         }
2903
         else
2905
         else
2904
         {
2906
         {
2908
           active_extruder_parked = true;
2910
           active_extruder_parked = true;
2909
           delayed_move_time = 0;
2911
           delayed_move_time = 0;
2910
         }
2912
         }
2911
-      #else
2913
+      #else    
2912
         // Offset extruder (only by XY)
2914
         // Offset extruder (only by XY)
2913
         int i;
2915
         int i;
2914
         for(i = 0; i < 2; i++) {
2916
         for(i = 0; i < 2; i++) {
3121
     {
3123
     {
3122
       // move duplicate extruder into correct duplication position.
3124
       // move duplicate extruder into correct duplication position.
3123
       plan_set_position(inactive_extruder_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
3125
       plan_set_position(inactive_extruder_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
3124
-      plan_buffer_line(current_position[X_AXIS] + duplicate_extruder_x_offset, current_position[Y_AXIS], current_position[Z_AXIS],
3126
+      plan_buffer_line(current_position[X_AXIS] + duplicate_extruder_x_offset, current_position[Y_AXIS], current_position[Z_AXIS], 
3125
           current_position[E_AXIS], max_feedrate[X_AXIS], 1);
3127
           current_position[E_AXIS], max_feedrate[X_AXIS], 1);
3126
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
3128
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
3127
       st_synchronize();
3129
       st_synchronize();
3128
       extruder_duplication_enabled = true;
3130
       extruder_duplication_enabled = true;
3129
       active_extruder_parked = false;
3131
       active_extruder_parked = false;
3130
-    }
3132
+    }  
3131
     else if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE) // handle unparking of head
3133
     else if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE) // handle unparking of head
3132
     {
3134
     {
3133
       if (current_position[E_AXIS] == destination[E_AXIS])
3135
       if (current_position[E_AXIS] == destination[E_AXIS])
3136
         // be used as start of first non-travel move)
3138
         // be used as start of first non-travel move)
3137
         if (delayed_move_time != 0xFFFFFFFFUL)
3139
         if (delayed_move_time != 0xFFFFFFFFUL)
3138
         {
3140
         {
3139
-          memcpy(current_position, destination, sizeof(current_position));
3141
+          memcpy(current_position, destination, sizeof(current_position)); 
3140
           if (destination[Z_AXIS] > raised_parked_position[Z_AXIS])
3142
           if (destination[Z_AXIS] > raised_parked_position[Z_AXIS])
3141
             raised_parked_position[Z_AXIS] = destination[Z_AXIS];
3143
             raised_parked_position[Z_AXIS] = destination[Z_AXIS];
3142
           delayed_move_time = millis();
3144
           delayed_move_time = millis();
3146
       delayed_move_time = 0;
3148
       delayed_move_time = 0;
3147
       // unpark extruder: 1) raise, 2) move into starting XY position, 3) lower
3149
       // unpark extruder: 1) raise, 2) move into starting XY position, 3) lower
3148
       plan_buffer_line(raised_parked_position[X_AXIS], raised_parked_position[Y_AXIS], raised_parked_position[Z_AXIS],    current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
3150
       plan_buffer_line(raised_parked_position[X_AXIS], raised_parked_position[Y_AXIS], raised_parked_position[Z_AXIS],    current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
3149
-      plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], raised_parked_position[Z_AXIS],
3151
+      plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], raised_parked_position[Z_AXIS], 
3150
           current_position[E_AXIS], min(max_feedrate[X_AXIS],max_feedrate[Y_AXIS]), active_extruder);
3152
           current_position[E_AXIS], min(max_feedrate[X_AXIS],max_feedrate[Y_AXIS]), active_extruder);
3151
-      plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
3153
+      plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], 
3152
           current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
3154
           current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
3153
       active_extruder_parked = false;
3155
       active_extruder_parked = false;
3154
     }
3156
     }
3314
       // travel moves have been received so enact them
3316
       // travel moves have been received so enact them
3315
       delayed_move_time = 0xFFFFFFFFUL; // force moves to be done
3317
       delayed_move_time = 0xFFFFFFFFUL; // force moves to be done
3316
       memcpy(destination,current_position,sizeof(destination));
3318
       memcpy(destination,current_position,sizeof(destination));
3317
-      prepare_move();
3319
+      prepare_move(); 
3318
     }
3320
     }
3319
   #endif
3321
   #endif
3320
   #ifdef TEMP_STAT_LEDS
3322
   #ifdef TEMP_STAT_LEDS

+ 9
- 1
Marlin/language.h View File

138
 	#define MSG_CNG_SDCARD "Change SD-Card"
138
 	#define MSG_CNG_SDCARD "Change SD-Card"
139
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
139
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
140
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
140
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
141
-
141
+    #define MSG_ZPROBE_ZOFFSET "Z Offset"
142
 // Serial Console Messages
142
 // Serial Console Messages
143
 
143
 
144
 	#define MSG_Enqueing "enqueing \""
144
 	#define MSG_Enqueing "enqueing \""
305
 	#define MSG_CNG_SDCARD "Change SD-Card"
305
 	#define MSG_CNG_SDCARD "Change SD-Card"
306
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
306
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
307
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
307
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
308
+    #define MSG_ZPROBE_ZOFFSET "Z Offset"
308
 
309
 
309
 // Serial Console Messages
310
 // Serial Console Messages
310
 
311
 
471
 	#define MSG_CNG_SDCARD "Changer de carte SD"
472
 	#define MSG_CNG_SDCARD "Changer de carte SD"
472
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
473
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
473
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
474
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
475
+    #define MSG_ZPROBE_ZOFFSET "Z Offset"
474
 
476
 
475
 // Serial Console Messages
477
 // Serial Console Messages
476
 
478
 
640
 	#define MSG_CNG_SDCARD "Change SD-Card"
642
 	#define MSG_CNG_SDCARD "Change SD-Card"
641
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
643
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
642
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
644
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
645
+    #define MSG_ZPROBE_ZOFFSET "Z Offset"
643
 	
646
 	
644
 // Serial Console Messages
647
 // Serial Console Messages
645
 
648
 
813
 	#define MSG_STEPPER_RELEASED "Desacoplada."
816
 	#define MSG_STEPPER_RELEASED "Desacoplada."
814
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
817
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
815
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
818
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
819
+    #define MSG_ZPROBE_ZOFFSET "Z Offset"
816
 
820
 
817
 // Serial Console Messages
821
 // Serial Console Messages
818
 
822
 
976
 	#define MSG_CNG_SDCARD "Change SD-Card"
980
 	#define MSG_CNG_SDCARD "Change SD-Card"
977
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
981
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
978
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
982
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
983
+    #define MSG_ZPROBE_ZOFFSET "Z Offset"
979
 
984
 
980
 // Serial Console Messages
985
 // Serial Console Messages
981
 
986
 
1139
 	#define MSG_CNG_SDCARD           "Cambia SD-Card"
1144
 	#define MSG_CNG_SDCARD           "Cambia SD-Card"
1140
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
1145
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
1141
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
1146
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
1147
+    #define MSG_ZPROBE_ZOFFSET "Z Offset"
1142
 
1148
 
1143
 	// Serial Console Messages
1149
 	// Serial Console Messages
1144
 
1150
 
1311
 	#define MSG_CNG_SDCARD "Change SD-Card"
1317
 	#define MSG_CNG_SDCARD "Change SD-Card"
1312
     #define MSG_ZPROBE_OUT "Sonda fora da mesa"
1318
     #define MSG_ZPROBE_OUT "Sonda fora da mesa"
1313
     #define MSG_POSITION_UNKNOWN "Home X/Y antes de Z"
1319
     #define MSG_POSITION_UNKNOWN "Home X/Y antes de Z"
1320
+    #define MSG_ZPROBE_ZOFFSET "Z Offset"
1314
 
1321
 
1315
 // Serial Console Messages
1322
 // Serial Console Messages
1316
 
1323
 
1479
 	#define MSG_CNG_SDCARD "Change SD-Card"
1486
 	#define MSG_CNG_SDCARD "Change SD-Card"
1480
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
1487
     #define MSG_ZPROBE_OUT "ZProbe Outside Bed"
1481
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
1488
     #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
1489
+    #define MSG_ZPROBE_ZOFFSET "Z Offset"
1482
 
1490
 
1483
 // Serial Console Messages
1491
 // Serial Console Messages
1484
 
1492
 

+ 2
- 0
Marlin/ultralcd.cpp View File

19
 int absPreheatHPBTemp;
19
 int absPreheatHPBTemp;
20
 int absPreheatFanSpeed;
20
 int absPreheatFanSpeed;
21
 
21
 
22
+
22
 #ifdef ULTIPANEL
23
 #ifdef ULTIPANEL
23
 static float manual_feedrate[] = MANUAL_FEEDRATE;
24
 static float manual_feedrate[] = MANUAL_FEEDRATE;
24
 #endif // ULTIPANEL
25
 #endif // ULTIPANEL
705
 {
706
 {
706
     START_MENU();
707
     START_MENU();
707
     MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
708
     MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
709
+    MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, 0.5, 50);
708
     MENU_ITEM_EDIT(float5, MSG_ACC, &acceleration, 500, 99000);
710
     MENU_ITEM_EDIT(float5, MSG_ACC, &acceleration, 500, 99000);
709
     MENU_ITEM_EDIT(float3, MSG_VXY_JERK, &max_xy_jerk, 1, 990);
711
     MENU_ITEM_EDIT(float3, MSG_VXY_JERK, &max_xy_jerk, 1, 990);
710
     MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &max_z_jerk, 0.1, 990);
712
     MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &max_z_jerk, 0.1, 990);

Loading…
Cancel
Save