Skip to content

Commit 32f694b

Browse files
committed
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into X5SA-2E-Bugfix-2.0.x
2 parents ae3df4e + 911cdd4 commit 32f694b

11 files changed

Lines changed: 70 additions & 30 deletions

File tree

Marlin/src/gcode/config/M575.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,21 @@
3333
* B<baudrate> - Baud rate (bits per second)
3434
*/
3535
void GcodeSuite::M575() {
36-
const int32_t baud = parser.ulongval('B');
36+
int32_t baud = parser.ulongval('B');
37+
switch (baud) {
38+
case 24:
39+
case 96:
40+
case 192:
41+
case 384:
42+
case 576:
43+
case 1152: baud *= 100; break;
44+
case 250:
45+
case 500: baud *= 1000; break;
46+
case 19: baud = 19200; break;
47+
case 38: baud = 38400; break;
48+
case 57: baud = 57600; break;
49+
case 115: baud = 115200; break;
50+
}
3751
switch (baud) {
3852
case 2400: case 9600: case 19200: case 38400: case 57600:
3953
case 115200: case 250000: case 500000: case 1000000: {

Marlin/src/gcode/gcode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
896896
case 422: M422(); break; // M422: Set Z Stepper automatic alignment position using probe
897897
#endif
898898

899-
#if BOTH(HAS_SPI_FLASH, SDSUPPORT)
899+
#if ALL(HAS_SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE)
900900
case 993: M993(); break; // M993: Backup SPI Flash to SD
901901
case 994: M994(); break; // M994: Load a Backup from SD to SPI Flash
902902
#endif

Marlin/src/inc/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* version was tagged.
4343
*/
4444
#ifndef STRING_DISTRIBUTION_DATE
45-
#define STRING_DISTRIBUTION_DATE "2020-08-09"
45+
#define STRING_DISTRIBUTION_DATE "2020-08-10"
4646
#endif
4747

4848
/**

Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,16 +591,17 @@ void ST7920_Lite_Status_Screen::draw_fan_speed(const uint8_t value) {
591591
write_byte('%');
592592
}
593593

594-
void ST7920_Lite_Status_Screen::draw_print_time(const duration_t &elapsed) {
594+
void ST7920_Lite_Status_Screen::draw_print_time(const duration_t &elapsed, char suffix) {
595595
#if HOTENDS == 1
596596
set_ddram_address(DDRAM_LINE_3);
597597
#else
598598
set_ddram_address(DDRAM_LINE_3 + 5);
599599
#endif
600600
char str[7];
601-
str[elapsed.toDigital(str)] = ' ';
601+
int str_length = elapsed.toDigital(str);
602+
str[str_length++] = suffix;
602603
begin_data();
603-
write_str(str, 6);
604+
write_str(str, str_length);
604605
}
605606

606607
void ST7920_Lite_Status_Screen::draw_feedrate_percentage(const uint16_t percentage) {
@@ -714,6 +715,7 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
714715
if (forceUpdate || indicators_changed()) {
715716
const bool blink = ui.get_blink();
716717
const duration_t elapsed = print_job_timer.duration();
718+
duration_t remaining = TERN0(USE_M73_REMAINING_TIME, ui.get_remaining_time());
717719
const uint16_t feedrate_perc = feedrate_percentage;
718720
const int16_t extruder_1_temp = thermalManager.degHotend(0),
719721
extruder_1_target = thermalManager.degTargetHotend(0);
@@ -738,7 +740,19 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
738740
#endif
739741

740742
draw_fan_speed(thermalManager.fanPercent(spd));
741-
draw_print_time(elapsed);
743+
744+
// Draw elapsed/remaining time
745+
const bool show_remaining = ENABLED(SHOW_REMAINING_TIME) && (DISABLED(ROTATE_PROGRESS_DISPLAY) || blink);
746+
if (show_remaining && !remaining.second()) {
747+
const auto progress = ui.get_progress_percent();
748+
if (progress)
749+
remaining = elapsed.second() * (100 - progress) / progress;
750+
}
751+
if (show_remaining && remaining.second())
752+
draw_print_time(remaining, 'R');
753+
else
754+
draw_print_time(elapsed);
755+
742756
draw_feedrate_percentage(feedrate_perc);
743757

744758
// Update the fan and bed animations

Marlin/src/lcd/dogm/status_screen_lite_ST7920.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ class ST7920_Lite_Status_Screen {
8080
static void draw_fan_icon(const bool whichIcon);
8181
static void draw_heat_icon(const bool whichIcon, const bool heating);
8282
static void draw_temps(uint8_t line, const int16_t temp, const int16_t target, bool showTarget, bool targetStateChange);
83-
static void draw_extruder_1_temp(const int16_t temp, const int16_t target, bool forceUpdate = false);
84-
static void draw_extruder_2_temp(const int16_t temp, const int16_t target, bool forceUpdate = false);
85-
static void draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate = false);
83+
static void draw_extruder_1_temp(const int16_t temp, const int16_t target, bool forceUpdate=false);
84+
static void draw_extruder_2_temp(const int16_t temp, const int16_t target, bool forceUpdate=false);
85+
static void draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate=false);
8686
static void draw_fan_speed(const uint8_t value);
87-
static void draw_print_time(const duration_t &elapsed);
87+
static void draw_print_time(const duration_t &elapsed, char suffix=' ');
8888
static void draw_feedrate_percentage(const uint16_t percentage);
8989
static void draw_status_message();
90-
static void draw_position(const xyze_pos_t &pos, bool position_known = true);
90+
static void draw_position(const xyze_pos_t &pos, bool position_known=true);
9191

9292
static bool indicators_changed();
9393
static bool position_changed();

Marlin/src/module/planner.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ void Planner::recalculate() {
12811281
void Planner::check_axes_activity() {
12821282

12831283
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
1284-
xyze_bool_t axis_active = { true, true, true, true };
1284+
xyze_bool_t axis_active = { false };
12851285
#endif
12861286

12871287
#if HAS_FAN
@@ -1316,10 +1316,10 @@ void Planner::check_axes_activity() {
13161316
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
13171317
for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
13181318
block_t *block = &block_buffer[b];
1319-
if (ENABLED(DISABLE_X) && block->steps[X_AXIS]) axis_active[X_AXIS] = true;
1320-
if (ENABLED(DISABLE_Y) && block->steps[Y_AXIS]) axis_active[Y_AXIS] = true;
1321-
if (ENABLED(DISABLE_Z) && block->steps[Z_AXIS]) axis_active[Z_AXIS] = true;
1322-
if (ENABLED(DISABLE_E) && block->steps[E_AXIS]) axis_active[E_AXIS] = true;
1319+
if (ENABLED(DISABLE_X) && block->steps.x) axis_active.x = true;
1320+
if (ENABLED(DISABLE_Y) && block->steps.y) axis_active.y = true;
1321+
if (ENABLED(DISABLE_Z) && block->steps.z) axis_active.z = true;
1322+
if (ENABLED(DISABLE_E) && block->steps.e) axis_active.e = true;
13231323
}
13241324
#endif
13251325
}

Marlin/src/module/tool_change.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
11331133
if (toolchange_settings.enable_park) do_blocking_move_to_xy_z(destination, destination.z, MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE));
11341134
#else
11351135
do_blocking_move_to_xy(destination, planner.settings.max_feedrate_mm_s[X_AXIS]);
1136-
do_blocking_move_to_z(destination, planner.settings.max_feedrate_mm_s[Z_AXIS]);
1136+
do_blocking_move_to_z(destination.z, planner.settings.max_feedrate_mm_s[Z_AXIS]);
11371137
#endif
11381138

11391139
#endif

buildroot/bin/use_example_configs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
#!/usr/bin/env bash
22

33
IFS=: read -r PART1 PART2 <<< "$@"
4-
[ -n "${PART2}" ] && { REPO="$PART1" ; RDIR="$PART2" ; } \
5-
|| { REPO=bugfix-2.0.x ; RDIR="$PART1" ; }
4+
[ -n "${PART2}" ] && { REPO="$PART1" ; RDIR="${PART2// /%20}" ; } \
5+
|| { REPO=bugfix-2.0.x ; RDIR="${PART1// /%20}" ; }
66
EXAMPLES="https://raw.githubusercontent.com/MarlinFirmware/Configurations/$REPO/config/examples"
77

8+
which curl >/dev/null && TOOL='curl -L -s -S -f -o wgot'
9+
which wget >/dev/null && TOOL='wget -q -O wgot'
10+
811
restore_configs
912

1013
cd Marlin
1114

12-
wget -q "$EXAMPLES/$RDIR/Configuration.h" -O wgot && mv wgot Configuration.h
13-
wget -q "$EXAMPLES/$RDIR/Configuration_adv.h" -O wgot && mv wgot Configuration_adv.h
14-
wget -q "$EXAMPLES/$RDIR/_Bootscreen.h" -O wgot && mv wgot _Bootscreen.h
15-
wget -q "$EXAMPLES/$RDIR/_Statusscreen.h" -O wgot && mv wgot _Statusscreen.h
16-
rm -f wgot
15+
$TOOL "$EXAMPLES/$RDIR/Configuration.h" >/dev/null 2>&1 && mv wgot Configuration.h
16+
$TOOL "$EXAMPLES/$RDIR/Configuration_adv.h" >/dev/null 2>&1 && mv wgot Configuration.h
17+
$TOOL "$EXAMPLES/$RDIR/_Bootscreen.h" >/dev/null 2>&1 && mv wgot Configuration.h
18+
$TOOL "$EXAMPLES/$RDIR/_Statusscreen.h" >/dev/null 2>&1 && mv wgot Configuration.h
1719

20+
rm -f wgot
1821
cd - >/dev/null

buildroot/share/fonts/uxggenpages.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,14 @@ BEGIN {
139139
}
140140
EOF
141141

142+
which awk >/dev/null && AWK=awk
143+
which gawk >/dev/null && AWK=gawk
144+
142145
grep -Hrn _UxGT . | grep '"' \
143146
| sed 's/_UxGT("/\n&/g;s/[^\n]*\n_UxGT("\([^"]*\)[^\n]*/\1 /g;s/.$//' \
144147
| ${EXEC_GENPAGES} \
145148
| sort -k 1n -k 2n | uniq \
146-
| gawk -v EXEC_PREFIX=${DN_EXEC} -f "proc.awk" \
149+
| "$AWK" -v EXEC_PREFIX=${DN_EXEC} -f "proc.awk" \
147150
| while read PAGE BEGIN END UTF8BEGIN UTF8END; do \
148151
if [ ! -f ${DN_DATA}/fontpage_${PAGE}_${BEGIN}_${END}.h ]; then \
149152
${EXEC_BDF2U8G} -u ${PAGE} -b ${BEGIN} -e ${END} ${FN_FONT} fontpage_${PAGE}_${BEGIN}_${END} ${DN_DATA}/fontpage_${PAGE}_${BEGIN}_${END}.h > /dev/null 2>&1 ;

buildroot/share/git/ghtp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ case "$1" in
1313
-[Hh]) TYPE=HTTPS ; MATCH="git@" ; FORMULA="$GH_SSH/$GH_HTTPS" ;;
1414
-[Ss]) TYPE=SSH ; MATCH="https:" ; FORMULA="$GH_HTTPS/$GH_SSH" ;;
1515
*)
16-
echo "usage: `basename $0` -h | -s" 1>&2
16+
echo "Usage: `basename $0` -h | -s" 1>&2
1717
echo -e " \e[0;92m-h\e[0m to switch to HTTPS" 1>&2
1818
echo -e " \e[0;92m-s\e[0m to switch to SSH" 1>&2
1919
exit 1
2020
;;
2121
esac
2222

23-
REMOTES=$(git remote -v | egrep "\t$MATCH" | gawk '{print $1 " " $2}' | sort -u | sed "s/$FORMULA/")
23+
which awk >/dev/null && AWK=awk
24+
which gawk >/dev/null && AWK=gawk
25+
26+
REMOTES=$(git remote -v | egrep "\t$MATCH" | "$AWK" '{print $1 " " $2}' | sort -u | sed "s/$FORMULA/")
2427

2528
if [[ -z $REMOTES ]]; then
2629
echo "Nothing to do." ; exit
@@ -29,5 +32,5 @@ fi
2932
echo "$REMOTES" | xargs -n2 git remote set-url
3033

3134
echo -n "Remotes set to $TYPE: "
32-
echo "$REMOTES" | gawk '{printf "%s ", $1}'
35+
echo "$REMOTES" | "$AWK" '{printf "%s ", $1}'
3336
echo

0 commit comments

Comments
 (0)