Browse Source

Revert 06f767d..cba5692

This rolls back to commit 06f767d608.
Chris Roadfeldt 10 years ago
parent
commit
e08f8eed05

+ 1
- 0
Marlin/Marlin.h View File

229
 extern float homing_feedrate[];
229
 extern float homing_feedrate[];
230
 extern bool axis_relative_modes[];
230
 extern bool axis_relative_modes[];
231
 extern int feedmultiply;
231
 extern int feedmultiply;
232
+extern int extrudemultiply; // Sets extrude multiply factor (in percent) for all extruders
232
 extern bool volumetric_enabled;
233
 extern bool volumetric_enabled;
233
 extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
234
 extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
234
 extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
235
 extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.

+ 358
- 513
Marlin/Marlin_main.cpp
File diff suppressed because it is too large
View File


+ 1
- 1
Marlin/dogm_lcd_implementation.h View File

369
       lcd_printPGM(PSTR("dia:"));
369
       lcd_printPGM(PSTR("dia:"));
370
       lcd_print(ftostr12ns(filament_width_meas));
370
       lcd_print(ftostr12ns(filament_width_meas));
371
       lcd_printPGM(PSTR(" factor:"));
371
       lcd_printPGM(PSTR(" factor:"));
372
-      lcd_print(itostr3(volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]));
372
+      lcd_print(itostr3(extrudemultiply));
373
       lcd_print('%');
373
       lcd_print('%');
374
     }
374
     }
375
   #endif
375
   #endif

+ 2
- 2
Marlin/planner.cpp View File

545
   block->steps[Z_AXIS] = labs(dz);
545
   block->steps[Z_AXIS] = labs(dz);
546
   block->steps[E_AXIS] = labs(de);
546
   block->steps[E_AXIS] = labs(de);
547
   block->steps[E_AXIS] *= volumetric_multiplier[active_extruder];
547
   block->steps[E_AXIS] *= volumetric_multiplier[active_extruder];
548
-  block->steps[E_AXIS] *= extruder_multiply[active_extruder];
548
+  block->steps[E_AXIS] *= extrudemultiply;
549
   block->steps[E_AXIS] /= 100;
549
   block->steps[E_AXIS] /= 100;
550
   block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS])));
550
   block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS])));
551
 
551
 
679
     delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
679
     delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
680
   #endif
680
   #endif
681
   delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
681
   delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
682
-  delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[active_extruder] * extruder_multiply[active_extruder] / 100.0;
682
+  delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[active_extruder] * extrudemultiply / 100.0;
683
 
683
 
684
   if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) {
684
   if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) {
685
     block->millimeters = fabs(delta_mm[E_AXIS]);
685
     block->millimeters = fabs(delta_mm[E_AXIS]);

+ 39
- 76
Marlin/stepper.cpp View File

515
     }
515
     }
516
 
516
 
517
     if (TEST(out_bits, Z_AXIS)) {   // -direction
517
     if (TEST(out_bits, Z_AXIS)) {   // -direction
518
-
519
       Z_APPLY_DIR(INVERT_Z_DIR,0);
518
       Z_APPLY_DIR(INVERT_Z_DIR,0);
520
       count_direction[Z_AXIS] = -1;
519
       count_direction[Z_AXIS] = -1;
521
-
522
-      if (check_endstops) {
523
-
524
-        #if defined(Z_MIN_PIN) && Z_MIN_PIN >= 0
525
-
526
-          #ifdef Z_DUAL_ENDSTOPS
527
-
528
-            bool z_min_endstop = READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING,
529
-                z2_min_endstop =
530
-                  #if defined(Z2_MIN_PIN) && Z2_MIN_PIN >= 0
531
-                    READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING
532
-                  #else
533
-                    z_min_endstop
534
-                  #endif
535
-                ;
536
-
537
-            bool z_min_both = z_min_endstop && old_z_min_endstop,
538
-                z2_min_both = z2_min_endstop && old_z2_min_endstop;
539
-            if ((z_min_both || z2_min_both) && current_block->steps[Z_AXIS] > 0) {
520
+      if (check_endstops) 
521
+      {
522
+        #if defined(Z_MIN_PIN) && Z_MIN_PIN > -1
523
+          #ifndef Z_DUAL_ENDSTOPS
524
+            UPDATE_ENDSTOP(z, Z, min, MIN);
525
+          #else
526
+            bool z_min_endstop=(READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
527
+            #if defined(Z2_MIN_PIN) && Z2_MIN_PIN > -1
528
+              bool z2_min_endstop=(READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING);
529
+            #else
530
+              bool z2_min_endstop=z_min_endstop;
531
+            #endif
532
+            if(((z_min_endstop && old_z_min_endstop) || (z2_min_endstop && old_z2_min_endstop)) && (current_block->steps[Z_AXIS] > 0))
533
+            {
540
               endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
534
               endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
541
-              endstop_z_hit = true;
542
-              if (!performing_homing || (performing_homing && z_min_both && z2_min_both)) //if not performing home or if both endstops were trigged during homing...
535
+              endstop_z_hit=true;
536
+              if (!(performing_homing) || ((performing_homing)&&(z_min_endstop && old_z_min_endstop)&&(z2_min_endstop && old_z2_min_endstop))) //if not performing home or if both endstops were trigged during homing...
537
+              {
543
                 step_events_completed = current_block->step_event_count;
538
                 step_events_completed = current_block->step_event_count;
539
+              } 
544
             }
540
             }
545
             old_z_min_endstop = z_min_endstop;
541
             old_z_min_endstop = z_min_endstop;
546
             old_z2_min_endstop = z2_min_endstop;
542
             old_z2_min_endstop = z2_min_endstop;
547
-<<<<<<< HEAD
548
           #endif
543
           #endif
549
         #endif
544
         #endif
550
 
545
 
561
           old_z_probe_endstop = z_probe_endstop;
556
           old_z_probe_endstop = z_probe_endstop;
562
         #endif
557
         #endif
563
       }
558
       }
564
-=======
565
-
566
-          #else // !Z_DUAL_ENDSTOPS
567
-
568
-            UPDATE_ENDSTOP(z, Z, min, MIN);
569
-
570
-          #endif // !Z_DUAL_ENDSTOPS
571
-
572
-        #endif // Z_MIN_PIN
573
-
574
-      } // check_endstops
575
-
576
->>>>>>> MarlinFirmware/Development
577
     }
559
     }
578
     else { // +direction
560
     else { // +direction
579
-
580
       Z_APPLY_DIR(!INVERT_Z_DIR,0);
561
       Z_APPLY_DIR(!INVERT_Z_DIR,0);
581
       count_direction[Z_AXIS] = 1;
562
       count_direction[Z_AXIS] = 1;
582
-
583
       if (check_endstops) {
563
       if (check_endstops) {
584
-
585
         #if defined(Z_MAX_PIN) && Z_MAX_PIN >= 0
564
         #if defined(Z_MAX_PIN) && Z_MAX_PIN >= 0
586
-
587
-          #ifdef Z_DUAL_ENDSTOPS
588
-
589
-            bool z_max_endstop = READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING,
590
-                z2_max_endstop =
591
-                  #if defined(Z2_MAX_PIN) && Z2_MAX_PIN >= 0
592
-                    READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING
593
-                  #else
594
-                    z_max_endstop
595
-                  #endif
596
-                ;
597
-
598
-            bool z_max_both = z_max_endstop && old_z_max_endstop,
599
-                z2_max_both = z2_max_endstop && old_z2_max_endstop;
600
-            if ((z_max_both || z2_max_both) && current_block->steps[Z_AXIS] > 0) {
565
+          #ifndef Z_DUAL_ENDSTOPS
566
+            UPDATE_ENDSTOP(z, Z, max, MAX);
567
+          #else
568
+            bool z_max_endstop=(READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING);
569
+            #if defined(Z2_MAX_PIN) && Z2_MAX_PIN > -1
570
+              bool z2_max_endstop=(READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING);
571
+            #else
572
+              bool z2_max_endstop=z_max_endstop;
573
+            #endif
574
+            if(((z_max_endstop && old_z_max_endstop) || (z2_max_endstop && old_z2_max_endstop)) && (current_block->steps[Z_AXIS] > 0))
575
+            {
601
               endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
576
               endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
602
-              endstop_z_hit = true;
577
+              endstop_z_hit=true;
603
 
578
 
604
-             // if (z_max_both) SERIAL_ECHOLN("z_max_endstop = true");
605
-             // if (z2_max_both) SERIAL_ECHOLN("z2_max_endstop = true");
579
+//              if (z_max_endstop && old_z_max_endstop) SERIAL_ECHOLN("z_max_endstop = true");
580
+//              if (z2_max_endstop && old_z2_max_endstop) SERIAL_ECHOLN("z2_max_endstop = true");
606
 
581
 
607
-              if (!performing_homing || (performing_homing && z_max_both && z2_max_both)) //if not performing home or if both endstops were trigged during homing...
582
+            
583
+              if (!(performing_homing) || ((performing_homing)&&(z_max_endstop && old_z_max_endstop)&&(z2_max_endstop && old_z2_max_endstop))) //if not performing home or if both endstops were trigged during homing...
584
+              {
608
                 step_events_completed = current_block->step_event_count;
585
                 step_events_completed = current_block->step_event_count;
586
+              } 
609
             }
587
             }
610
             old_z_max_endstop = z_max_endstop;
588
             old_z_max_endstop = z_max_endstop;
611
             old_z2_max_endstop = z2_max_endstop;
589
             old_z2_max_endstop = z2_max_endstop;
612
-<<<<<<< HEAD
613
           #endif
590
           #endif
614
         #endif
591
         #endif
615
 
592
 
626
         #endif
603
         #endif
627
       }
604
       }
628
     }
605
     }
629
-=======
630
-
631
-          #else // !Z_DUAL_ENDSTOPS
632
-
633
-            UPDATE_ENDSTOP(z, Z, max, MAX);
634
-
635
-          #endif // !Z_DUAL_ENDSTOPS
636
-
637
-        #endif // Z_MAX_PIN
638
-
639
-      } // check_endstops
640
-
641
-    } // +direction
642
->>>>>>> MarlinFirmware/Development
643
 
606
 
644
     #ifndef ADVANCE
607
     #ifndef ADVANCE
645
       if (TEST(out_bits, E_AXIS)) {  // -direction
608
       if (TEST(out_bits, E_AXIS)) {  // -direction
646
         REV_E_DIR();
609
         REV_E_DIR();
647
-        count_direction[E_AXIS] = -1;
610
+        count_direction[E_AXIS]=-1;
648
       }
611
       }
649
       else { // +direction
612
       else { // +direction
650
         NORM_E_DIR();
613
         NORM_E_DIR();
651
-        count_direction[E_AXIS] = 1;
614
+        count_direction[E_AXIS]=1;
652
       }
615
       }
653
     #endif //!ADVANCE
616
     #endif //!ADVANCE
654
 
617
 
655
     // Take multiple steps per interrupt (For high speed moves)
618
     // Take multiple steps per interrupt (For high speed moves)
656
-    for (int8_t i = 0; i < step_loops; i++) {
619
+    for (int8_t i=0; i < step_loops; i++) {
657
       #ifndef AT90USB
620
       #ifndef AT90USB
658
         MSerial.checkRx(); // Check for serial chars.
621
         MSerial.checkRx(); // Check for serial chars.
659
       #endif
622
       #endif

+ 1
- 1
Marlin/ultralcd.cpp View File

485
     MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
485
     MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
486
   #endif
486
   #endif
487
   MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
487
   MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
488
-  MENU_ITEM_EDIT(int3, MSG_FLOW, &extruder_multiply[active_extruder], 10, 999);
488
+  MENU_ITEM_EDIT(int3, MSG_FLOW, &extrudemultiply, 10, 999);
489
   MENU_ITEM_EDIT(int3, MSG_FLOW MSG_F0, &extruder_multiply[0], 10, 999);
489
   MENU_ITEM_EDIT(int3, MSG_FLOW MSG_F0, &extruder_multiply[0], 10, 999);
490
   #if TEMP_SENSOR_1 != 0
490
   #if TEMP_SENSOR_1 != 0
491
     MENU_ITEM_EDIT(int3, MSG_FLOW MSG_F1, &extruder_multiply[1], 10, 999);
491
     MENU_ITEM_EDIT(int3, MSG_FLOW MSG_F1, &extruder_multiply[1], 10, 999);

+ 8
- 8
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

624
 
624
 
625
 static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) {
625
 static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) {
626
   char c;
626
   char c;
627
-  uint8_t n = LCD_WIDTH - 2;
627
+  uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2);
628
   lcd.setCursor(0, row);
628
   lcd.setCursor(0, row);
629
   lcd.print(sel ? pre_char : ' ');
629
   lcd.print(sel ? pre_char : ' ');
630
   while ((c = pgm_read_byte(pstr)) && n > 0) {
630
   while ((c = pgm_read_byte(pstr)) && n > 0) {
633
   }
633
   }
634
   while(n--) lcd.print(' ');
634
   while(n--) lcd.print(' ');
635
   lcd.print(post_char);
635
   lcd.print(post_char);
636
+  lcd.print(' ');
636
 }
637
 }
637
 
638
 
638
 static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char* data) {
639
 static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char* data) {
639
   char c;
640
   char c;
640
-  uint8_t n = LCD_WIDTH - 2 - lcd_strlen(data);
641
+  uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2) - lcd_strlen(data);
641
   lcd.setCursor(0, row);
642
   lcd.setCursor(0, row);
642
   lcd.print(sel ? pre_char : ' ');
643
   lcd.print(sel ? pre_char : ' ');
643
   while ((c = pgm_read_byte(pstr)) && n > 0) {
644
   while ((c = pgm_read_byte(pstr)) && n > 0) {
650
 }
651
 }
651
 static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t row, const char* pstr, char pre_char, const char* data) {
652
 static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t row, const char* pstr, char pre_char, const char* data) {
652
   char c;
653
   char c;
653
-  uint8_t n = LCD_WIDTH - 2 - lcd_strlen_P(data);
654
+  uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2) - lcd_strlen_P(data);
654
   lcd.setCursor(0, row);
655
   lcd.setCursor(0, row);
655
   lcd.print(sel ? pre_char : ' ');
656
   lcd.print(sel ? pre_char : ' ');
656
   while ((c = pgm_read_byte(pstr)) && n > 0) {
657
   while ((c = pgm_read_byte(pstr)) && n > 0) {
687
   lcd.setCursor(1, 1);
688
   lcd.setCursor(1, 1);
688
   lcd_printPGM(pstr);
689
   lcd_printPGM(pstr);
689
   lcd.print(':');
690
   lcd.print(':');
690
-  lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
691
+  lcd.setCursor(LCD_WIDTH - (LCD_WIDTH < 20 ? 0 : 1) - lcd_strlen(value), 1);
691
   lcd_print(value);
692
   lcd_print(value);
692
 }
693
 }
693
 
694
 
694
-static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename, uint8_t concat, char post_char) {
695
+static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename, uint8_t concat) {
695
   char c;
696
   char c;
696
   uint8_t n = LCD_WIDTH - concat;
697
   uint8_t n = LCD_WIDTH - concat;
697
   lcd.setCursor(0, row);
698
   lcd.setCursor(0, row);
705
     filename++;
706
     filename++;
706
   }
707
   }
707
   while (n--) lcd.print(' ');
708
   while (n--) lcd.print(' ');
708
-  lcd.print(post_char);
709
 }
709
 }
710
 
710
 
711
 static void lcd_implementation_drawmenu_sdfile(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
711
 static void lcd_implementation_drawmenu_sdfile(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
712
-  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2, ' ');
712
+  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 1);
713
 }
713
 }
714
 
714
 
715
 static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
715
 static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
716
-  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2, LCD_STR_FOLDER[0]);
716
+  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2);
717
 }
717
 }
718
 
718
 
719
 #define lcd_implementation_drawmenu_back(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])
719
 #define lcd_implementation_drawmenu_back(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])

Loading…
Cancel
Save