浏览代码

LIGHTWEIGHT_UI: Allow feedrate % to exceed 255% (#11656)

- Changed type of integer used for feedrate percentage from uint8_t to uint16_t.
Marcio Teixeira 6 年前
父节点
当前提交
0f14977b5d

+ 3
- 3
Marlin/src/lcd/dogm/status_screen_lite_ST7920.h 查看文件

@@ -601,7 +601,7 @@ void ST7920_Lite_Status_Screen::draw_print_time(const duration_t &elapsed) {
601 601
   write_str(str, 6);
602 602
 }
603 603
 
604
-void ST7920_Lite_Status_Screen::draw_feedrate_percentage(const uint8_t percentage) {
604
+void ST7920_Lite_Status_Screen::draw_feedrate_percentage(const uint16_t percentage) {
605 605
   // We only have enough room for the feedrate when
606 606
   // we have one extruder
607 607
   #if EXTRUDERS == 1
@@ -709,7 +709,7 @@ bool ST7920_Lite_Status_Screen::indicators_changed() {
709 709
   // because the actual temps fluctuate so by updating
710 710
   // them only during blinks we gain a bit of stability.
711 711
   const bool       blink             = lcd_blink();
712
-  const uint8_t    feedrate_perc     = feedrate_percentage;
712
+  const uint16_t   feedrate_perc     = feedrate_percentage;
713 713
   const uint8_t    fan_speed         = ((fanSpeeds[0] + 1) * 100) / 256;
714 714
   const int16_t    extruder_1_target = thermalManager.degTargetHotend(0);
715 715
   #if EXTRUDERS == 2
@@ -736,7 +736,7 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
736 736
   if (forceUpdate || indicators_changed()) {
737 737
     const bool       blink             = lcd_blink();
738 738
     const duration_t elapsed           = print_job_timer.duration();
739
-    const uint8_t    feedrate_perc     = feedrate_percentage;
739
+    const uint16_t   feedrate_perc     = feedrate_percentage;
740 740
     const uint8_t    fan_speed         = ((fanSpeeds[0] + 1) * 100) / 256;
741 741
     const int16_t    extruder_1_temp   = thermalManager.degHotend(0),
742 742
                      extruder_1_target = thermalManager.degTargetHotend(0);

+ 1
- 1
Marlin/src/lcd/dogm/status_screen_lite_ST7920_class.h 查看文件

@@ -87,7 +87,7 @@ class ST7920_Lite_Status_Screen {
87 87
     static void draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate = false);
88 88
     static void draw_fan_speed(const uint8_t value);
89 89
     static void draw_print_time(const duration_t &elapsed);
90
-    static void draw_feedrate_percentage(const uint8_t percentage);
90
+    static void draw_feedrate_percentage(const uint16_t percentage);
91 91
     static void draw_status_message(const char *str);
92 92
     static void draw_position(const float x, const float y, const float z, bool position_known = true);
93 93
 

正在加载...
取消
保存