Browse Source

overworked lcd+eeprom to have only mm/sec and PID including pid_dt

Bernhard 13 years ago
parent
commit
235051253a
2 changed files with 23 additions and 23 deletions
  1. 11
    11
      Marlin/EEPROMwrite.h
  2. 12
    12
      Marlin/ultralcd.pde

+ 11
- 11
Marlin/EEPROMwrite.h View File

@@ -136,10 +136,10 @@ inline void RetrieveSettings(bool def=false)
136 136
     SERIAL_ECHO_START;
137 137
       SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
138 138
       SERIAL_ECHO_START;
139
-      SERIAL_ECHOPAIR("  M203 X",max_feedrate[0]/60);
140
-      SERIAL_ECHOPAIR(" Y",max_feedrate[1]/60 ); 
141
-      SERIAL_ECHOPAIR(" Z", max_feedrate[2]/60 ); 
142
-      SERIAL_ECHOPAIR(" E", max_feedrate[3]/60);
139
+      SERIAL_ECHOPAIR("  M203 X",max_feedrate[0]);
140
+      SERIAL_ECHOPAIR(" Y",max_feedrate[1] ); 
141
+      SERIAL_ECHOPAIR(" Z", max_feedrate[2] ); 
142
+      SERIAL_ECHOPAIR(" E", max_feedrate[3]);
143 143
       SERIAL_ECHOLN("");
144 144
     SERIAL_ECHO_START;
145 145
       SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
@@ -158,19 +158,19 @@ inline void RetrieveSettings(bool def=false)
158 158
     SERIAL_ECHO_START;
159 159
       SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum xY jerk (mm/s),  Z=maximum Z jerk (mm/s)");
160 160
       SERIAL_ECHO_START;
161
-      SERIAL_ECHOPAIR("  M205 S",minimumfeedrate/60 ); 
162
-      SERIAL_ECHOPAIR(" T" ,mintravelfeedrate/60 ); 
161
+      SERIAL_ECHOPAIR("  M205 S",minimumfeedrate ); 
162
+      SERIAL_ECHOPAIR(" T" ,mintravelfeedrate ); 
163 163
       SERIAL_ECHOPAIR(" B" ,minsegmenttime ); 
164
-      SERIAL_ECHOPAIR(" X" ,max_xy_jerk/60 ); 
165
-      SERIAL_ECHOPAIR(" Z" ,max_z_jerk/60);
164
+      SERIAL_ECHOPAIR(" X" ,max_xy_jerk ); 
165
+      SERIAL_ECHOPAIR(" Z" ,max_z_jerk);
166 166
       SERIAL_ECHOLN(""); 
167 167
     #ifdef PIDTEMP
168 168
       SERIAL_ECHO_START;
169 169
       SERIAL_ECHOLNPGM("PID settings:");
170 170
       SERIAL_ECHO_START;
171
-      SERIAL_ECHOPAIR("   M301 P",Kp ); 
172
-      SERIAL_ECHOPAIR(" I" ,Ki ); 
173
-      SERIAL_ECHOPAIR(" D" ,Kd);
171
+      SERIAL_ECHOPAIR("   M301 P",Kp); 
172
+      SERIAL_ECHOPAIR(" I" ,Ki/PID_dT); 
173
+      SERIAL_ECHOPAIR(" D" ,Kd*PID_dT);
174 174
       SERIAL_ECHOLN(""); 
175 175
     #endif
176 176
   #endif

+ 12
- 12
Marlin/ultralcd.pde View File

@@ -758,11 +758,11 @@ void MainMenu::showControlTemp()
758 758
             linechanging=!linechanging;
759 759
             if(linechanging)
760 760
             {
761
-               encoderpos=(int)Kp/5;
761
+               encoderpos=(int)Kp;
762 762
             }
763 763
             else
764 764
             {
765
-              Kp= encoderpos*5;
765
+              Kp= encoderpos;
766 766
               encoderpos=activeline*lcdslow;
767 767
                 
768 768
             }
@@ -772,8 +772,8 @@ void MainMenu::showControlTemp()
772 772
           if(linechanging)
773 773
           {
774 774
             if(encoderpos<1) encoderpos=1;
775
-            if(encoderpos>9990/5) encoderpos=9990/5;
776
-            lcd.setCursor(13,line);lcd.print(itostr4(encoderpos*5));
775
+            if(encoderpos>9990) encoderpos=9990;
776
+            lcd.setCursor(13,line);lcd.print(itostr4(encoderpos));
777 777
           }
778 778
         }
779 779
       }break;
@@ -782,7 +782,7 @@ void MainMenu::showControlTemp()
782 782
       if(force_lcd_update)
783 783
         {
784 784
           lcd.setCursor(0,line);lcdprintPGM(" PID-I: ");
785
-          lcd.setCursor(13,line);lcd.print(ftostr51(Ki));
785
+          lcd.setCursor(13,line);lcd.print(ftostr51(Ki/PID_dT));
786 786
         }
787 787
         
788 788
         if((activeline==line) )
@@ -792,11 +792,11 @@ void MainMenu::showControlTemp()
792 792
             linechanging=!linechanging;
793 793
             if(linechanging)
794 794
             {
795
-               encoderpos=(int)(Ki*10);
795
+               encoderpos=(int)(Ki*10/PID_dT);
796 796
             }
797 797
             else
798 798
             {
799
-              Ki= encoderpos/10.;
799
+              Ki= encoderpos/10.*PID_dT;
800 800
               encoderpos=activeline*lcdslow;
801 801
                 
802 802
             }
@@ -816,7 +816,7 @@ void MainMenu::showControlTemp()
816 816
       if(force_lcd_update)
817 817
         {
818 818
           lcd.setCursor(0,line);lcdprintPGM(" PID-D: ");
819
-          lcd.setCursor(13,line);lcd.print(itostr4(Kd));
819
+          lcd.setCursor(13,line);lcd.print(itostr4(Kd*PID_dT));
820 820
         }
821 821
         
822 822
         if((activeline==line) )
@@ -826,11 +826,11 @@ void MainMenu::showControlTemp()
826 826
             linechanging=!linechanging;
827 827
             if(linechanging)
828 828
             {
829
-               encoderpos=(int)Kd/5;
829
+               encoderpos=(int)(Kd/5./PID_dT);
830 830
             }
831 831
             else
832 832
             {
833
-              Kd= encoderpos*5;
833
+              Kd= encoderpos;
834 834
               encoderpos=activeline*lcdslow;
835 835
                 
836 836
             }
@@ -840,8 +840,8 @@ void MainMenu::showControlTemp()
840 840
           if(linechanging)
841 841
           {
842 842
             if(encoderpos<0) encoderpos=0;
843
-            if(encoderpos>9990/5) encoderpos=9990/5;
844
-            lcd.setCursor(13,line);lcd.print(itostr4(encoderpos*5));
843
+            if(encoderpos>9990) encoderpos=9990;
844
+            lcd.setCursor(13,line);lcd.print(itostr4(encoderpos));
845 845
           }
846 846
         }
847 847
       }break;   

Loading…
Cancel
Save