ソースを参照

Added HOME_POS. This adds the posibility to make the center 0

Updated the Xsteps ... settings via the LCD menu
Erik van der Zalm 13年前
コミット
ae3e7586c6
5個のファイルの変更58行の追加34行の削除
  1. 6
    1
      Marlin/Configuration.h
  2. 3
    3
      Marlin/Marlin.pde
  3. 21
    1
      Marlin/language.h
  4. 3
    3
      Marlin/planner.cpp
  5. 25
    26
      Marlin/ultralcd.pde

+ 6
- 1
Marlin/Configuration.h ファイルの表示

146
 #define Y_MAX_LENGTH 185
146
 #define Y_MAX_LENGTH 185
147
 #define Z_MAX_LENGTH 90
147
 #define Z_MAX_LENGTH 90
148
 
148
 
149
+// The position of the homing switches. Use MAX_LENGTH * -0.5 if the center should be 0, 0, 0
150
+#define X_HOME_POS 0
151
+#define Y_HOME_POS 0
152
+#define Z_HOME_POS 0
153
+
149
 //// MOVEMENT SETTINGS
154
 //// MOVEMENT SETTINGS
150
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
155
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
151
 #define HOMING_FEEDRATE {1500, 1500, 80, 0} // {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
156
 #define HOMING_FEEDRATE {1500, 1500, 80, 0} // {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
182
 //#define ULTRA_LCD  //general lcd support, also 16x2
187
 //#define ULTRA_LCD  //general lcd support, also 16x2
183
 #define SDSUPPORT // Enable SD Card Support in Hardware Console
188
 #define SDSUPPORT // Enable SD Card Support in Hardware Console
184
 
189
 
185
-//#define ULTIPANEL
190
+#define ULTIPANEL
186
 #ifdef ULTIPANEL
191
 #ifdef ULTIPANEL
187
   #define NEWPANEL  //enable this if you have a click-encoder panel
192
   #define NEWPANEL  //enable this if you have a click-encoder panel
188
   #define SDSUPPORT
193
   #define SDSUPPORT

+ 3
- 3
Marlin/Marlin.pde ファイルの表示

509
     feedrate = homing_feedrate[LETTER##_AXIS]/2 ;  \
509
     feedrate = homing_feedrate[LETTER##_AXIS]/2 ;  \
510
     plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \
510
     plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \
511
     \
511
     \
512
-    current_position[LETTER##_AXIS] = (LETTER##_HOME_DIR == -1) ? 0 : LETTER##_MAX_LENGTH;\
512
+    current_position[LETTER##_AXIS] = (LETTER##_HOME_DIR == -1) ? LETTER##_HOME_POS : LETTER##_MAX_LENGTH;\
513
     destination[LETTER##_AXIS] = current_position[LETTER##_AXIS];\
513
     destination[LETTER##_AXIS] = current_position[LETTER##_AXIS];\
514
     feedrate = 0.0;\
514
     feedrate = 0.0;\
515
     st_synchronize();\
515
     st_synchronize();\
577
           feedrate =homing_feedrate[Y_AXIS]; 
577
           feedrate =homing_feedrate[Y_AXIS]; 
578
         prepare_move(); 
578
         prepare_move(); 
579
     
579
     
580
-        current_position[X_AXIS] = (X_HOME_DIR == -1) ? 0 : X_MAX_LENGTH;
581
-        current_position[Y_AXIS] = (Y_HOME_DIR == -1) ? 0 : Y_MAX_LENGTH;
580
+        current_position[X_AXIS] = (X_HOME_DIR == -1) ? X_HOME_POS : X_MAX_LENGTH;
581
+        current_position[Y_AXIS] = (Y_HOME_DIR == -1) ? Y_HOME_POS : Y_MAX_LENGTH;
582
         plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
582
         plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
583
         destination[X_AXIS] = current_position[X_AXIS];
583
         destination[X_AXIS] = current_position[X_AXIS];
584
         destination[Y_AXIS] = current_position[Y_AXIS];
584
         destination[Y_AXIS] = current_position[Y_AXIS];

+ 21
- 1
Marlin/language.h ファイルの表示

25
 	#define MSG_PREHEAT " Preheat"
25
 	#define MSG_PREHEAT " Preheat"
26
 	#define MSG_COOLDOWN " Cooldown"
26
 	#define MSG_COOLDOWN " Cooldown"
27
 	#define MSG_EXTRUDE " Extrude"
27
 	#define MSG_EXTRUDE " Extrude"
28
+        #define MSG_MOVE_AXIS " Move Axis      \x7E"
28
 	#define MSG_SPEED " Speed:"
29
 	#define MSG_SPEED " Speed:"
29
 	#define MSG_NOZZLE " \002Nozzle:"
30
 	#define MSG_NOZZLE " \002Nozzle:"
30
 	#define MSG_BED " \002Bed:"
31
 	#define MSG_BED " \002Bed:"
52
 	#define MSG_VTRAV_MIN " VTrav min:"
53
 	#define MSG_VTRAV_MIN " VTrav min:"
53
 	#define MSG_AMAX " Amax "
54
 	#define MSG_AMAX " Amax "
54
 	#define MSG_A_RETRACT " A-retract:"
55
 	#define MSG_A_RETRACT " A-retract:"
56
+	#define MSG_XSTEPS " Xsteps/mm:"
57
+	#define MSG_YSTEPS " Ysteps/mm:"
58
+	#define MSG_ZSTEPS " Zsteps/mm:"
55
 	#define MSG_ESTEPS " Esteps/mm:"
59
 	#define MSG_ESTEPS " Esteps/mm:"
56
 	#define MSG_MAIN_WIDE " Main        \003"
60
 	#define MSG_MAIN_WIDE " Main        \003"
57
 	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
61
 	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
86
 	#define MSG_PREHEAT " Preheat"
90
 	#define MSG_PREHEAT " Preheat"
87
 	#define MSG_COOLDOWN " Cooldown"
91
 	#define MSG_COOLDOWN " Cooldown"
88
 	#define MSG_EXTRUDE " Extrude"
92
 	#define MSG_EXTRUDE " Extrude"
93
+        #define MSG_MOVE_AXIS " Move Axis      \x7E"
89
 	#define MSG_SPEED " Speed:"
94
 	#define MSG_SPEED " Speed:"
90
 	#define MSG_NOZZLE " \002Nozzle:"
95
 	#define MSG_NOZZLE " \002Nozzle:"
91
 	#define MSG_BED " \002Bed:"
96
 	#define MSG_BED " \002Bed:"
113
 	#define MSG_VTRAV_MIN " VTrav min:"
118
 	#define MSG_VTRAV_MIN " VTrav min:"
114
 	#define MSG_AMAX " Amax "
119
 	#define MSG_AMAX " Amax "
115
 	#define MSG_A_RETRACT " A-retract:"
120
 	#define MSG_A_RETRACT " A-retract:"
121
+	#define MSG_XSTEPS " Xsteps/mm:"
122
+	#define MSG_YSTEPS " Ysteps/mm:"
123
+	#define MSG_ZSTEPS " Zsteps/mm:"
116
 	#define MSG_ESTEPS " Esteps/mm:"
124
 	#define MSG_ESTEPS " Esteps/mm:"
117
 	#define MSG_MAIN_WIDE " Main        \003"
125
 	#define MSG_MAIN_WIDE " Main        \003"
118
 	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
126
 	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
147
 	#define MSG_PREHEAT " Preheat"
155
 	#define MSG_PREHEAT " Preheat"
148
 	#define MSG_COOLDOWN " Cooldown"
156
 	#define MSG_COOLDOWN " Cooldown"
149
 	#define MSG_EXTRUDE " Extrude"
157
 	#define MSG_EXTRUDE " Extrude"
158
+        #define MSG_MOVE_AXIS " Move Axis      \x7E"
150
 	#define MSG_SPEED " Speed:"
159
 	#define MSG_SPEED " Speed:"
151
 	#define MSG_NOZZLE " \002Nozzle:"
160
 	#define MSG_NOZZLE " \002Nozzle:"
152
 	#define MSG_BED " \002Bed:"
161
 	#define MSG_BED " \002Bed:"
174
 	#define MSG_VTRAV_MIN " VTrav min:"
183
 	#define MSG_VTRAV_MIN " VTrav min:"
175
 	#define MSG_AMAX " Amax "
184
 	#define MSG_AMAX " Amax "
176
 	#define MSG_A_RETRACT " A-retract:"
185
 	#define MSG_A_RETRACT " A-retract:"
186
+	#define MSG_XSTEPS " Xsteps/mm:"
187
+	#define MSG_YSTEPS " Ysteps/mm:"
188
+	#define MSG_ZSTEPS " Zsteps/mm:"
177
 	#define MSG_ESTEPS " Esteps/mm:"
189
 	#define MSG_ESTEPS " Esteps/mm:"
178
 	#define MSG_MAIN_WIDE " Main        \003"
190
 	#define MSG_MAIN_WIDE " Main        \003"
179
 	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
191
 	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
208
 	#define MSG_PREHEAT " Preheat"
220
 	#define MSG_PREHEAT " Preheat"
209
 	#define MSG_COOLDOWN " Cooldown"
221
 	#define MSG_COOLDOWN " Cooldown"
210
 	#define MSG_EXTRUDE " Extrude"
222
 	#define MSG_EXTRUDE " Extrude"
223
+        #define MSG_MOVE_AXIS " Move Axis      \x7E"
211
 	#define MSG_SPEED " Speed:"
224
 	#define MSG_SPEED " Speed:"
212
 	#define MSG_NOZZLE " \002Nozzle:"
225
 	#define MSG_NOZZLE " \002Nozzle:"
213
 	#define MSG_BED " \002Bed:"
226
 	#define MSG_BED " \002Bed:"
235
 	#define MSG_VTRAV_MIN " VTrav min:"
248
 	#define MSG_VTRAV_MIN " VTrav min:"
236
 	#define MSG_AMAX " Amax "
249
 	#define MSG_AMAX " Amax "
237
 	#define MSG_A_RETRACT " A-retract:"
250
 	#define MSG_A_RETRACT " A-retract:"
251
+	#define MSG_XSTEPS " Xsteps/mm:"
252
+	#define MSG_YSTEPS " Ysteps/mm:"
253
+	#define MSG_ZSTEPS " Zsteps/mm:"
238
 	#define MSG_ESTEPS " Esteps/mm:"
254
 	#define MSG_ESTEPS " Esteps/mm:"
239
 	#define MSG_MAIN_WIDE " Main        \003"
255
 	#define MSG_MAIN_WIDE " Main        \003"
240
 	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
256
 	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
269
 	#define MSG_PREHEAT " Preheat"
285
 	#define MSG_PREHEAT " Preheat"
270
 	#define MSG_COOLDOWN " Cooldown"
286
 	#define MSG_COOLDOWN " Cooldown"
271
 	#define MSG_EXTRUDE " Extrude"
287
 	#define MSG_EXTRUDE " Extrude"
288
+        #define MSG_MOVE_AXIS " Move Axis      \x7E"
272
 	#define MSG_SPEED " Speed:"
289
 	#define MSG_SPEED " Speed:"
273
 	#define MSG_NOZZLE " \002Nozzle:"
290
 	#define MSG_NOZZLE " \002Nozzle:"
274
 	#define MSG_BED " \002Bed:"
291
 	#define MSG_BED " \002Bed:"
296
 	#define MSG_VTRAV_MIN " VTrav min:"
313
 	#define MSG_VTRAV_MIN " VTrav min:"
297
 	#define MSG_AMAX " Amax "
314
 	#define MSG_AMAX " Amax "
298
 	#define MSG_A_RETRACT " A-retract:"
315
 	#define MSG_A_RETRACT " A-retract:"
316
+	#define MSG_XSTEPS " Xsteps/mm:"
317
+	#define MSG_YSTEPS " Ysteps/mm:"
318
+	#define MSG_ZSTEPS " Zsteps/mm:"
299
 	#define MSG_ESTEPS " Esteps/mm:"
319
 	#define MSG_ESTEPS " Esteps/mm:"
300
 	#define MSG_MAIN_WIDE " Main        \003"
320
 	#define MSG_MAIN_WIDE " Main        \003"
301
 	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
321
 	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
315
 
335
 
316
 #endif
336
 #endif
317
 
337
 
318
-#endif // ifndef LANGUAGE_H
338
+#endif // ifndef LANGUAGE_H

+ 3
- 3
Marlin/planner.cpp ファイルの表示

446
 
446
 
447
   
447
   
448
   if (min_software_endstops) {
448
   if (min_software_endstops) {
449
-    if (x < 0) x = 0;
450
-    if (y < 0) y = 0;
451
-    if (z < 0) z = 0;
449
+    if (x < X_HOME_POS) x = X_HOME_POS;
450
+    if (y < Y_HOME_POS) y = Y_HOME_POS;
451
+    if (z < Z_HOME_POS) z = Z_HOME_POS;
452
   }
452
   }
453
 
453
 
454
   if (max_software_endstops) {
454
   if (max_software_endstops) {

+ 25
- 26
Marlin/ultralcd.pde ファイルの表示

372
   if((currentz!=oldzpos)||force_lcd_update)
372
   if((currentz!=oldzpos)||force_lcd_update)
373
   {
373
   {
374
     lcd.setCursor(10,1);
374
     lcd.setCursor(10,1);
375
-    lcdprintPGM("Z:");lcd.print(ftostr32(current_position[2]));
375
+    lcdprintPGM("Z:");lcd.print(ftostr52(current_position[2]));
376
     oldzpos=currentz;
376
     oldzpos=currentz;
377
   }
377
   }
378
   static int oldfeedmultiply=0;
378
   static int oldfeedmultiply=0;
411
      lcd.setCursor(7,2);
411
      lcd.setCursor(7,2);
412
     lcd.print(itostr3((int)percent));
412
     lcd.print(itostr3((int)percent));
413
     lcdprintPGM("%SD");
413
     lcdprintPGM("%SD");
414
-    
415
   }
414
   }
416
   
415
   
417
 #else //smaller LCDS----------------------------------
416
 #else //smaller LCDS----------------------------------
485
       MENUITEM(  lcdprintPGM(MSG_DISABLE_STEPPERS)  ,  BLOCK;enquecommand("M84");beepshort(); ) ;
484
       MENUITEM(  lcdprintPGM(MSG_DISABLE_STEPPERS)  ,  BLOCK;enquecommand("M84");beepshort(); ) ;
486
       break;
485
       break;
487
     case ItemP_home:
486
     case ItemP_home:
488
-      MENUITEM(  lcdprintPGM(MSG_AUTO_HOME)  ,  BLOCK;enquecommand("G28 X0 Y0 Z0");beepshort(); ) ;
487
+      MENUITEM(  lcdprintPGM(MSG_AUTO_HOME)  ,  BLOCK;enquecommand("G28");beepshort(); ) ;
489
       break;
488
       break;
490
     case ItemP_origin:
489
     case ItemP_origin:
491
       MENUITEM(  lcdprintPGM(MSG_SET_ORIGIN)  ,  BLOCK;enquecommand("G92 X0 Y0 Z0");beepshort(); ) ;
490
       MENUITEM(  lcdprintPGM(MSG_SET_ORIGIN)  ,  BLOCK;enquecommand("G92 X0 Y0 Z0");beepshort(); ) ;
500
   //    MENUITEM(  lcdprintPGM(" Extrude")  ,  BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
499
   //    MENUITEM(  lcdprintPGM(" Extrude")  ,  BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
501
     //  break;
500
     //  break;
502
     case ItemP_move:
501
     case ItemP_move:
503
-      MENUITEM(  lcdprintPGM(" Move Axis      \x7E") , BLOCK;status=Sub_PrepareMove;beepshort(); );
502
+      MENUITEM(  lcdprintPGM(MSG_MOVE_AXIS) , BLOCK;status=Sub_PrepareMove;beepshort(); );
504
       break;
503
       break;
505
         default:   
504
         default:   
506
       break;
505
       break;
664
           }
663
           }
665
           break;
664
           break;
666
           case ItemAM_E:
665
           case ItemAM_E:
667
-          MENUITEM(  lcdprintPGM(" Extrude")  ,  BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E5");beepshort(); ) ;
666
+          MENUITEM(  lcdprintPGM(MSG_EXTRUDE)  ,  BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E5");beepshort(); ) ;
668
           break;
667
           break;
669
           default:
668
           default:
670
           break;
669
           break;
703
       if((activeline!=line) )
702
       if((activeline!=line) )
704
         break;
703
         break;
705
       
704
       
706
-      if(CLICKED) //nalogWrite(FAN_PIN,  fanpwm);
705
+      if(CLICKED) //AnalogWrite(FAN_PIN,  fanpwm);
707
       {
706
       {
708
         linechanging=!linechanging;
707
         linechanging=!linechanging;
709
         if(linechanging)
708
         if(linechanging)
1597
          {
1596
          {
1598
       if(force_lcd_update)
1597
       if(force_lcd_update)
1599
         {
1598
         {
1600
-          lcd.setCursor(0,line);lcdprintPGM(" X steps/mm:");
1599
+          lcd.setCursor(0,line);lcdprintPGM(MSG_XSTEPS);
1601
           lcd.setCursor(11,line);lcd.print(ftostr52(axis_steps_per_unit[0]));
1600
           lcd.setCursor(11,line);lcd.print(ftostr52(axis_steps_per_unit[0]));
1602
         }
1601
         }
1603
         
1602
         
1609
           linechanging=!linechanging;
1608
           linechanging=!linechanging;
1610
           if(linechanging)
1609
           if(linechanging)
1611
           {
1610
           {
1612
-              encoderpos=(int)axis_steps_per_unit[0];
1611
+              encoderpos=(int)(axis_steps_per_unit[0]*100.0);
1613
           }
1612
           }
1614
           else
1613
           else
1615
           {
1614
           {
1616
-            float factor=float(encoderpos)/100/float(axis_steps_per_unit[0]);
1615
+            float factor=float(encoderpos)/100.0/float(axis_steps_per_unit[0]);
1617
             position[X_AXIS]=lround(position[X_AXIS]*factor);
1616
             position[X_AXIS]=lround(position[X_AXIS]*factor);
1618
             //current_position[3]*=factor;
1617
             //current_position[3]*=factor;
1619
             axis_steps_per_unit[X_AXIS]= encoderpos/100.0;
1618
             axis_steps_per_unit[X_AXIS]= encoderpos/100.0;
1634
          {
1633
          {
1635
       if(force_lcd_update)
1634
       if(force_lcd_update)
1636
         {
1635
         {
1637
-          lcd.setCursor(0,line);lcdprintPGM(" Y steps/mm:");
1638
-          lcd.setCursor(13,line);lcd.print(itostr4(axis_steps_per_unit[1]));
1636
+          lcd.setCursor(0,line);lcdprintPGM(MSG_YSTEPS);
1637
+          lcd.setCursor(11,line);lcd.print(ftostr52(axis_steps_per_unit[1]));
1639
         }
1638
         }
1640
         
1639
         
1641
         if((activeline!=line) )
1640
         if((activeline!=line) )
1646
           linechanging=!linechanging;
1645
           linechanging=!linechanging;
1647
           if(linechanging)
1646
           if(linechanging)
1648
           {
1647
           {
1649
-              encoderpos=(int)axis_steps_per_unit[1];
1648
+              encoderpos=(int)(axis_steps_per_unit[1]*100.0);
1650
           }
1649
           }
1651
           else
1650
           else
1652
           {
1651
           {
1653
-            float factor=float(encoderpos)/float(axis_steps_per_unit[1]);
1652
+            float factor=float(encoderpos)/100.0/float(axis_steps_per_unit[1]);
1654
             position[Y_AXIS]=lround(position[Y_AXIS]*factor);
1653
             position[Y_AXIS]=lround(position[Y_AXIS]*factor);
1655
             //current_position[3]*=factor;
1654
             //current_position[3]*=factor;
1656
-            axis_steps_per_unit[Y_AXIS]= encoderpos;
1655
+            axis_steps_per_unit[Y_AXIS]= encoderpos/100.0;
1657
             encoderpos=activeline*lcdslow;
1656
             encoderpos=activeline*lcdslow;
1658
               
1657
               
1659
           }
1658
           }
1664
         {
1663
         {
1665
           if(encoderpos<5) encoderpos=5;
1664
           if(encoderpos<5) encoderpos=5;
1666
           if(encoderpos>9999) encoderpos=9999;
1665
           if(encoderpos>9999) encoderpos=9999;
1667
-          lcd.setCursor(13,line);lcd.print(itostr4(encoderpos));
1666
+          lcd.setCursor(11,line);lcd.print(ftostr52(encoderpos/100.0));
1668
         }
1667
         }
1669
         
1668
         
1670
       }break;
1669
       }break;
1672
          {
1671
          {
1673
       if(force_lcd_update)
1672
       if(force_lcd_update)
1674
         {
1673
         {
1675
-          lcd.setCursor(0,line);lcdprintPGM(" Z steps/mm:");
1676
-          lcd.setCursor(13,line);lcd.print(itostr4(axis_steps_per_unit[2]));
1674
+          lcd.setCursor(0,line);lcdprintPGM(MSG_ZSTEPS);
1675
+          lcd.setCursor(11,line);lcd.print(ftostr52(axis_steps_per_unit[2]));
1677
         }
1676
         }
1678
         
1677
         
1679
         if((activeline!=line) )
1678
         if((activeline!=line) )
1684
           linechanging=!linechanging;
1683
           linechanging=!linechanging;
1685
           if(linechanging)
1684
           if(linechanging)
1686
           {
1685
           {
1687
-              encoderpos=(int)axis_steps_per_unit[2];
1686
+              encoderpos=(int)(axis_steps_per_unit[2]*100.0);
1688
           }
1687
           }
1689
           else
1688
           else
1690
           {
1689
           {
1691
-            float factor=float(encoderpos)/float(axis_steps_per_unit[2]);
1690
+            float factor=float(encoderpos)/100.0/float(axis_steps_per_unit[2]);
1692
             position[Z_AXIS]=lround(position[Z_AXIS]*factor);
1691
             position[Z_AXIS]=lround(position[Z_AXIS]*factor);
1693
             //current_position[3]*=factor;
1692
             //current_position[3]*=factor;
1694
-            axis_steps_per_unit[Z_AXIS]= encoderpos;
1693
+            axis_steps_per_unit[Z_AXIS]= encoderpos/100.0;
1695
             encoderpos=activeline*lcdslow;
1694
             encoderpos=activeline*lcdslow;
1696
               
1695
               
1697
           }
1696
           }
1702
         {
1701
         {
1703
           if(encoderpos<5) encoderpos=5;
1702
           if(encoderpos<5) encoderpos=5;
1704
           if(encoderpos>9999) encoderpos=9999;
1703
           if(encoderpos>9999) encoderpos=9999;
1705
-          lcd.setCursor(13,line);lcd.print(itostr4(encoderpos));
1704
+          lcd.setCursor(11,line);lcd.print(ftostr52(encoderpos/100.0));
1706
         }
1705
         }
1707
         
1706
         
1708
       }break;
1707
       }break;
1712
       if(force_lcd_update)
1711
       if(force_lcd_update)
1713
         {
1712
         {
1714
           lcd.setCursor(0,line);lcdprintPGM(MSG_ESTEPS);
1713
           lcd.setCursor(0,line);lcdprintPGM(MSG_ESTEPS);
1715
-          lcd.setCursor(13,line);lcd.print(itostr4(axis_steps_per_unit[3]));
1714
+          lcd.setCursor(11,line);lcd.print(ftostr52(axis_steps_per_unit[3]));
1716
         }
1715
         }
1717
         
1716
         
1718
         if((activeline!=line) )
1717
         if((activeline!=line) )
1723
           linechanging=!linechanging;
1722
           linechanging=!linechanging;
1724
           if(linechanging)
1723
           if(linechanging)
1725
           {
1724
           {
1726
-              encoderpos=(int)axis_steps_per_unit[3];
1725
+              encoderpos=(int)(axis_steps_per_unit[3]*100.0);
1727
           }
1726
           }
1728
           else
1727
           else
1729
           {
1728
           {
1730
-            float factor=float(encoderpos)/float(axis_steps_per_unit[3]);
1729
+            float factor=float(encoderpos)/100.0/float(axis_steps_per_unit[3]);
1731
             position[E_AXIS]=lround(position[E_AXIS]*factor);
1730
             position[E_AXIS]=lround(position[E_AXIS]*factor);
1732
             //current_position[3]*=factor;
1731
             //current_position[3]*=factor;
1733
-            axis_steps_per_unit[E_AXIS]= encoderpos;
1732
+            axis_steps_per_unit[E_AXIS]= encoderpos/100.0;
1734
             encoderpos=activeline*lcdslow;
1733
             encoderpos=activeline*lcdslow;
1735
               
1734
               
1736
           }
1735
           }
1741
         {
1740
         {
1742
           if(encoderpos<5) encoderpos=5;
1741
           if(encoderpos<5) encoderpos=5;
1743
           if(encoderpos>9999) encoderpos=9999;
1742
           if(encoderpos>9999) encoderpos=9999;
1744
-          lcd.setCursor(13,line);lcd.print(itostr4(encoderpos));
1743
+          lcd.setCursor(11,line);lcd.print(ftostr52(encoderpos/100.0));
1745
         }
1744
         }
1746
         
1745
         
1747
       }break; 
1746
       }break; 

読み込み中…
キャンセル
保存