From c90db080e50edf505d2eb39e29d67e533024b8ff Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Tue, 22 Aug 2023 16:11:10 +0200 Subject: [PATCH] Update to MMU3 --- CMakeLists.txt | 4 ++-- Doxyfile | 2 +- README.md | 2 +- src/config/config.h | 6 +++--- src/main.dox | 2 +- src/modules/permanent_storage.cpp | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd049c8..4efd932 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -183,7 +183,7 @@ if(CMAKE_CROSSCOMPILING) COMMAND ${CMAKE_OBJCOPY} firmware -O binary --gap-fill 0xFF --pad-to 0x00007000 firmware.bin COMMAND ${CMAKE_COMMAND} -E cat firmware.bin bootloader.bin > fw_bootloader.bin COMMAND ${CMAKE_OBJCOPY} -I binary -O ihex fw_bootloader.bin - "MMU2SR_${PROJECT_VERSION}${PROJECT_VERSION_SUFFIX_SHORT}_bootloader.hex" + "MMU3_${PROJECT_VERSION}${PROJECT_VERSION_SUFFIX_SHORT}_bootloader.hex" BYPRODUCTS bootloader.bin firmware.bin fw_bootloader.bin ) @@ -212,7 +212,7 @@ if(CMAKE_CROSSCOMPILING) POST_BUILD COMMAND ${CMAKE_COMMAND} -D WORK_DIR=${CMAKE_BINARY_DIR} -D - HEX_NAME="MMU2SR_${PROJECT_VERSION}${PROJECT_VERSION_SUFFIX_SHORT}.hex" -P + HEX_NAME="MMU3_${PROJECT_VERSION}${PROJECT_VERSION_SUFFIX_SHORT}.hex" -P ${CMAKE_SOURCE_DIR}/cmake/HexConcat.cmake DEPENDS firmware.hex ) diff --git a/Doxyfile b/Doxyfile index f221f58..022a2dc 100644 --- a/Doxyfile +++ b/Doxyfile @@ -44,7 +44,7 @@ PROJECT_NUMBER = # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = PrusaMultiMaterialUpgradev2firmwareforMK4 +PROJECT_BRIEF = PrusaMultiMaterialUpgradev3firmwareforMK3SMK4 # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 diff --git a/README.md b/README.md index d97018b..29ac5c1 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,4 @@ cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/AvrGcc.cmake ninja ``` -It will produce a `MMU2SR_.hex` file. +It will produce a `MMU3_.hex` file. diff --git a/src/config/config.h b/src/config/config.h index b0d8bab..313d641 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -85,11 +85,11 @@ static constexpr U_mm pulleyToCuttingEdge = 33.0_mm; /// 33.0_mm /// Pulley to c static constexpr U_mm filamentMinLoadedToMMU = 20.0_mm; /// Limit of retraction. static constexpr U_mm ejectFromCuttingEdge = 40.0_mm; /// Eject should ignore FilamentMinLoadedToMMU and retract static constexpr U_mm cuttingEdgeRetract = 5.0_mm; /// Cutting retraction distance (filament should be flush with outlet) -static constexpr U_mm cuttingEdgeToFinda = 18.5_mm; /// Cutting edge to FINDA MMU2 side -1mm tolerance should be ~18.5. FINDA shouldn't trigger here. +static constexpr U_mm cuttingEdgeToFinda = 18.5_mm; /// Cutting edge to FINDA MMU side -1mm tolerance should be ~18.5. FINDA shouldn't trigger here. static constexpr U_mm findaTriggerDistance = 4.5_mm; /// FINDA trigger distance +1.0_mm tolerance. static constexpr U_mm cuttingEdgeToFindaMidpoint = 22.85_mm; /// Cutting edge to Midpoint of FINDA should be 22.85_mm. static constexpr U_mm findaToCoupler = 12.0_mm; /// FINDA Coupler side to coupler screw. -static constexpr U_mm couplerToBowden = 3.5_mm; /// FINDA Coupler screw to bowden mmu2s side (in coupling). +static constexpr U_mm couplerToBowden = 3.5_mm; /// FINDA Coupler screw to bowden mmu side (in coupling). // Min, max and default bowden length setup static constexpr U_mm defaultBowdenLength = 360.0_mm; /// ~360.0_mm - Default Bowden length. @@ -157,7 +157,7 @@ static constexpr U_mm SelectorOffsetFromMax = 1.0_mm; /// Selector offset from h static constexpr U_mm SelectorOffsetFromMin = 75.5_mm; /// Selector offset from home min to slot 0 /// slots 0-4 are the real ones, the 5th is the farthest parking positions -/// selector.dirOn = true = Home at max: selector hits left side of the MMU2S body +/// selector.dirOn = true = Home at max: selector hits left side of the MMU body /// selector.dirOn = false = Home at min: selector POM nut hit the selector motor static constexpr U_mm selectorSlotPositions[toolCount + 1] = { diff --git a/src/main.dox b/src/main.dox index ee29803..a89e984 100644 --- a/src/main.dox +++ b/src/main.dox @@ -1,4 +1,4 @@ -///@mainpage Prusa Multi Material Unit for the MK4 +///@mainpage Prusa Multi Material Unit for the MKS3 and MK4 ///@section intro_sec Introduction /// /// This is the new firmware for the Multi Material Unit (MMU). diff --git a/src/modules/permanent_storage.cpp b/src/modules/permanent_storage.cpp index b069152..9c5fb0a 100644 --- a/src/modules/permanent_storage.cpp +++ b/src/modules/permanent_storage.cpp @@ -20,8 +20,8 @@ namespace permanent_storage { /// Last byte in EEPROM is reserved for layoutVersion. If some field is repurposed, layoutVersion /// needs to be changed to force an EEPROM erase. struct eeprom_t { - uint8_t eepromLengthCorrection; ///< pre-MMU2 Legacy bowden length correction - not used - uint16_t eepromBowdenLen[config::toolCount]; ///< MMU2 Bowden length for each filament - not used + uint8_t eepromLengthCorrection; ///< pre-MMU Legacy bowden length correction - not used + uint16_t eepromBowdenLen[config::toolCount]; ///< MMU Bowden length for each filament - not used uint8_t eepromFilamentStatus[3]; ///< Majority vote status of eepromFilament wear leveling uint8_t eepromFilament[800]; ///< Top nibble status, bottom nibble last filament loaded uint8_t eepromDriveErrorCountH;