|
@@ -419,7 +419,7 @@ void ST7920_Lite_Status_Screen::draw_static_elements() {
|
419
|
419
|
|
420
|
420
|
// Draw the static icons in GDRAM
|
421
|
421
|
draw_gdram_icon(1, 1, nozzle_icon);
|
422
|
|
- #if EXTRUDERS == 2
|
|
422
|
+ #if HOTENDS > 1
|
423
|
423
|
draw_gdram_icon(1,2,nozzle_icon);
|
424
|
424
|
draw_gdram_icon(1,3,bed_icon);
|
425
|
425
|
#else
|
|
@@ -440,7 +440,7 @@ void ST7920_Lite_Status_Screen::draw_static_elements() {
|
440
|
440
|
* text data (the percentage).
|
441
|
441
|
*/
|
442
|
442
|
void ST7920_Lite_Status_Screen::draw_progress_bar(const uint8_t value) {
|
443
|
|
- #if EXTRUDERS == 1
|
|
443
|
+ #if HOTENDS == 1
|
444
|
444
|
// If we have only one extruder, draw a long progress bar on the third line
|
445
|
445
|
const uint8_t top = 1, // Top in pixels
|
446
|
446
|
bottom = 13, // Bottom in pixels
|
|
@@ -477,7 +477,7 @@ void ST7920_Lite_Status_Screen::draw_progress_bar(const uint8_t value) {
|
477
|
477
|
}
|
478
|
478
|
|
479
|
479
|
// Draw the percentage as text in DDRAM
|
480
|
|
- #if EXTRUDERS == 1
|
|
480
|
+ #if HOTENDS == 1
|
481
|
481
|
set_ddram_address(DDRAM_LINE_3 + 4);
|
482
|
482
|
begin_data();
|
483
|
483
|
write_byte(' ');
|
|
@@ -505,7 +505,7 @@ void ST7920_Lite_Status_Screen::draw_fan_icon(const bool whichIcon) {
|
505
|
505
|
|
506
|
506
|
void ST7920_Lite_Status_Screen::draw_heat_icon(const bool whichIcon, const bool heating) {
|
507
|
507
|
set_ddram_address(
|
508
|
|
- #if EXTRUDERS == 1
|
|
508
|
+ #if HOTENDS == 1
|
509
|
509
|
DDRAM_LINE_2
|
510
|
510
|
#else
|
511
|
511
|
DDRAM_LINE_3
|
|
@@ -573,7 +573,7 @@ void ST7920_Lite_Status_Screen::draw_extruder_2_temp(const int16_t temp, const i
|
573
|
573
|
void ST7920_Lite_Status_Screen::draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate) {
|
574
|
574
|
const bool show_target = target && FAR(temp, target);
|
575
|
575
|
draw_temps(2
|
576
|
|
- #if EXTRUDERS > 1
|
|
576
|
+ #if HOTENDS > 1
|
577
|
577
|
+ 1
|
578
|
578
|
#endif
|
579
|
579
|
, temp, target, show_target, display_state.bed_show_target != show_target || forceUpdate
|
|
@@ -590,7 +590,7 @@ void ST7920_Lite_Status_Screen::draw_fan_speed(const uint8_t value) {
|
590
|
590
|
}
|
591
|
591
|
|
592
|
592
|
void ST7920_Lite_Status_Screen::draw_print_time(const duration_t &elapsed) {
|
593
|
|
- #if EXTRUDERS == 1
|
|
593
|
+ #if HOTENDS == 1
|
594
|
594
|
set_ddram_address(DDRAM_LINE_3);
|
595
|
595
|
#else
|
596
|
596
|
set_ddram_address(DDRAM_LINE_3 + 5);
|
|
@@ -604,7 +604,7 @@ void ST7920_Lite_Status_Screen::draw_print_time(const duration_t &elapsed) {
|
604
|
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
|
|
- #if EXTRUDERS == 1
|
|
607
|
+ #if HOTENDS == 1
|
608
|
608
|
set_ddram_address(DDRAM_LINE_2 + 6);
|
609
|
609
|
begin_data();
|
610
|
610
|
write_number(percentage, 3);
|
|
@@ -712,7 +712,7 @@ bool ST7920_Lite_Status_Screen::indicators_changed() {
|
712
|
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
|
|
- #if EXTRUDERS == 2
|
|
715
|
+ #if HOTENDS > 1
|
716
|
716
|
const int16_t extruder_2_target = thermalManager.degTargetHotend(1);
|
717
|
717
|
#endif
|
718
|
718
|
#if HAS_HEATED_BED
|
|
@@ -720,7 +720,7 @@ bool ST7920_Lite_Status_Screen::indicators_changed() {
|
720
|
720
|
#endif
|
721
|
721
|
static uint16_t last_checksum = 0;
|
722
|
722
|
const uint16_t checksum = blink ^ feedrate_perc ^ fan_speed ^ extruder_1_target
|
723
|
|
- #if EXTRUDERS == 2
|
|
723
|
+ #if HOTENDS > 1
|
724
|
724
|
^ extruder_2_target
|
725
|
725
|
#endif
|
726
|
726
|
#if HAS_HEATED_BED
|
|
@@ -740,7 +740,7 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
|
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);
|
743
|
|
- #if EXTRUDERS == 2
|
|
743
|
+ #if HOTENDS > 1
|
744
|
744
|
const int16_t extruder_2_temp = thermalManager.degHotend(1),
|
745
|
745
|
extruder_2_target = thermalManager.degTargetHotend(1);
|
746
|
746
|
#endif
|
|
@@ -750,7 +750,7 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
|
750
|
750
|
#endif
|
751
|
751
|
|
752
|
752
|
draw_extruder_1_temp(extruder_1_temp, extruder_1_target, forceUpdate);
|
753
|
|
- #if EXTRUDERS == 2
|
|
753
|
+ #if HOTENDS > 1
|
754
|
754
|
draw_extruder_2_temp(extruder_2_temp, extruder_2_target, forceUpdate);
|
755
|
755
|
#endif
|
756
|
756
|
#if HAS_HEATED_BED
|