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,6 +229,7 @@ void refresh_cmd_timeout(void);
229 229
 extern float homing_feedrate[];
230 230
 extern bool axis_relative_modes[];
231 231
 extern int feedmultiply;
232
+extern int extrudemultiply; // Sets extrude multiply factor (in percent) for all extruders
232 233
 extern bool volumetric_enabled;
233 234
 extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
234 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,7 +369,7 @@ static void lcd_implementation_status_screen() {
369 369
       lcd_printPGM(PSTR("dia:"));
370 370
       lcd_print(ftostr12ns(filament_width_meas));
371 371
       lcd_printPGM(PSTR(" factor:"));
372
-      lcd_print(itostr3(volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]));
372
+      lcd_print(itostr3(extrudemultiply));
373 373
       lcd_print('%');
374 374
     }
375 375
   #endif

+ 2
- 2
Marlin/planner.cpp View File

@@ -545,7 +545,7 @@ float junction_deviation = 0.1;
545 545
   block->steps[Z_AXIS] = labs(dz);
546 546
   block->steps[E_AXIS] = labs(de);
547 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 549
   block->steps[E_AXIS] /= 100;
550 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,7 +679,7 @@ float junction_deviation = 0.1;
679 679
     delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
680 680
   #endif
681 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 684
   if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) {
685 685
     block->millimeters = fabs(delta_mm[E_AXIS]);

+ 39
- 76
Marlin/stepper.cpp View File

@@ -515,36 +515,31 @@ ISR(TIMER1_COMPA_vect) {
515 515
     }
516 516
 
517 517
     if (TEST(out_bits, Z_AXIS)) {   // -direction
518
-
519 518
       Z_APPLY_DIR(INVERT_Z_DIR,0);
520 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 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 538
                 step_events_completed = current_block->step_event_count;
539
+              } 
544 540
             }
545 541
             old_z_min_endstop = z_min_endstop;
546 542
             old_z2_min_endstop = z2_min_endstop;
547
-<<<<<<< HEAD
548 543
           #endif
549 544
         #endif
550 545
 
@@ -561,55 +556,37 @@ ISR(TIMER1_COMPA_vect) {
561 556
           old_z_probe_endstop = z_probe_endstop;
562 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 560
     else { // +direction
579
-
580 561
       Z_APPLY_DIR(!INVERT_Z_DIR,0);
581 562
       count_direction[Z_AXIS] = 1;
582
-
583 563
       if (check_endstops) {
584
-
585 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 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 585
                 step_events_completed = current_block->step_event_count;
586
+              } 
609 587
             }
610 588
             old_z_max_endstop = z_max_endstop;
611 589
             old_z2_max_endstop = z2_max_endstop;
612
-<<<<<<< HEAD
613 590
           #endif
614 591
         #endif
615 592
 
@@ -626,34 +603,20 @@ ISR(TIMER1_COMPA_vect) {
626 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 607
     #ifndef ADVANCE
645 608
       if (TEST(out_bits, E_AXIS)) {  // -direction
646 609
         REV_E_DIR();
647
-        count_direction[E_AXIS] = -1;
610
+        count_direction[E_AXIS]=-1;
648 611
       }
649 612
       else { // +direction
650 613
         NORM_E_DIR();
651
-        count_direction[E_AXIS] = 1;
614
+        count_direction[E_AXIS]=1;
652 615
       }
653 616
     #endif //!ADVANCE
654 617
 
655 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 620
       #ifndef AT90USB
658 621
         MSerial.checkRx(); // Check for serial chars.
659 622
       #endif

+ 1
- 1
Marlin/ultralcd.cpp View File

@@ -485,7 +485,7 @@ static void lcd_tune_menu() {
485 485
     MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
486 486
   #endif
487 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 489
   MENU_ITEM_EDIT(int3, MSG_FLOW MSG_F0, &extruder_multiply[0], 10, 999);
490 490
   #if TEMP_SENSOR_1 != 0
491 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,7 +624,7 @@ static void lcd_implementation_status_screen()
624 624
 
625 625
 static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) {
626 626
   char c;
627
-  uint8_t n = LCD_WIDTH - 2;
627
+  uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2);
628 628
   lcd.setCursor(0, row);
629 629
   lcd.print(sel ? pre_char : ' ');
630 630
   while ((c = pgm_read_byte(pstr)) && n > 0) {
@@ -633,11 +633,12 @@ static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const cha
633 633
   }
634 634
   while(n--) lcd.print(' ');
635 635
   lcd.print(post_char);
636
+  lcd.print(' ');
636 637
 }
637 638
 
638 639
 static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char* data) {
639 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 642
   lcd.setCursor(0, row);
642 643
   lcd.print(sel ? pre_char : ' ');
643 644
   while ((c = pgm_read_byte(pstr)) && n > 0) {
@@ -650,7 +651,7 @@ static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t r
650 651
 }
651 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 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 655
   lcd.setCursor(0, row);
655 656
   lcd.print(sel ? pre_char : ' ');
656 657
   while ((c = pgm_read_byte(pstr)) && n > 0) {
@@ -687,11 +688,11 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
687 688
   lcd.setCursor(1, 1);
688 689
   lcd_printPGM(pstr);
689 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 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 696
   char c;
696 697
   uint8_t n = LCD_WIDTH - concat;
697 698
   lcd.setCursor(0, row);
@@ -705,15 +706,14 @@ static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* ps
705 706
     filename++;
706 707
   }
707 708
   while (n--) lcd.print(' ');
708
-  lcd.print(post_char);
709 709
 }
710 710
 
711 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 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 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