Skip to content

Commit

Permalink
Fix for #1175
Browse files Browse the repository at this point in the history
Renames firmware-{date}-{time}.bin for SKR
Changes Prusa/Superslicer script to allow to use JPG thumbnail format
  • Loading branch information
mriscoc committed Dec 18, 2023
1 parent a7af648 commit 5a478f4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions Marlin/src/lcd/e3v2/proui/menus.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ struct MenuItem_t {
OnClickItem onClick = nullptr;
void* value;
};
extern int8_t menuItemCount;

constexpr uint8_t menu_max_items = MENU_MAX_ITEMS;

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/e3v2/proui/toolbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void drawToolBar() {
if (TBItem->icon) MENU_ITEM_F(TBItem->icon, TBItem->caption, onDrawTBItem, TBItem->onClick);
}
toolBar.onExit = &exitToolBar;
toolBar.count = TBMaxOpt;
toolBar.count = menuItemCount;
currentMenu = &toolBar;
}
toolBar.draw();
Expand Down
1 change: 1 addition & 0 deletions ini/stm32f1.ini
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ extends = stm32_variant
board = genericSTM32F103RE
board_build.variant = MARLIN_F103Rx
board_build.offset = 0x7000
board_build.rename = firmware-{date}-{time}.bin
board_upload.offset_address = 0x08007000
build_flags = ${stm32_variant.build_flags}
-DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED
Expand Down
1 change: 1 addition & 0 deletions ini/stm32g0.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ platform = ststm32@~14.1.0
platform_packages = framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32/archive/2.6.0.zip
toolchain-gccarmnoneeabi@1.100301.220327
board = marlin_STM32G0B1RE
board_build.rename = firmware-{date}-{time}.bin
board_build.offset = 0x2000
board_upload.offset_address = 0x08002000
build_flags = ${stm32_variant.build_flags}
Expand Down
Binary file modified screenshots/cura-scripts-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions slicer scripts/prusa-superslicer/professionalfirmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# Orca / Prusa / Super Slicer post-processor script for the Professional Firmware
# URL: https://github.com/mriscoc/Ender3V2S1
# Miguel A. Risco-Castillo
# version: 2.1
# date: 2023/09/17
# version: 2.2
# date: 2023/12/10
#
# Contains code from the jpg re-encoder thumbnail post processor script:
# github.com/alexqzd/Marlin/blob/Gcode-preview/Display%20firmware/gcode_thumb_to_jpg.py
Expand Down Expand Up @@ -66,6 +66,9 @@ def encodedStringToGcodeComment(encodedString):
new_size = size_match.replace(size[0], str(len(encodedjpg)))
lines = lines.replace(size_match, new_size)

#If the thumbnail was already a JPG, reformat block start
lines = lines.replace("thumbnail_JPG", "thumbnail")

#Prepare header values
ph = re.search('; generated by (.*)\n', lines)
if ph is not None : lines = lines.replace(ph[0], "")
Expand Down

0 comments on commit 5a478f4

Please sign in to comment.