Jelajahi Sumber

Fix few issues
Create MMU2 SDcards
MMU2 only for MK3/S

3d-gussner 3 tahun lalu
induk
melakukan
3ad669889e
2 mengubah file dengan 14 tambahan dan 14 penghapusan
  1. 5 3
      MK404-build.sh
  2. 9 11
      PF-build.sh

+ 5 - 3
MK404-build.sh

@@ -98,17 +98,17 @@ fi
 #### End Check MK404 dependencies
 
 #### Set build environment 
-SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
+MK404_SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
 MK404_URL="https://github.com/vintagepc/MK404.git"
 MK404_owner="vintagepc"
 MK404_project="MK404"
-MK404_PATH="$SCRIPT_PATH/../MK404/master"
+MK404_PATH="$MK404_SCRIPT_PATH/../MK404/master"
 MK404_BUILD_PATH="$MK404_PATH/build"
 
 
 # List few useful data
 echo
-echo "Script path :" $SCRIPT_PATH
+echo "Script path :" $MK404_SCRIPT_PATH
 echo "OS          :" $OS
 echo "OS type     :" $TARGET_OS
 echo ""
@@ -145,6 +145,8 @@ if [[ ! -f "$MK404_BUILD_PATH/Prusa_MK3S_SDcard.bin" || "$force_flag" == "1" ]];
     cmake --build $MK404_BUILD_PATH --config Release --target Prusa_MK3_SDcard.bin
     cmake --build $MK404_BUILD_PATH --config Release --target Prusa_MK25_13_SDcard.bin
     cmake --build $MK404_BUILD_PATH --config Release --target Prusa_MK25S_13_SDcard.bin
+    cmake --build $MK404_BUILD_PATH --config Release --target Prusa_MK3SMMU2_SDcard.bin
+    cmake --build $MK404_BUILD_PATH --config Release --target Prusa_MK3MMU2_SDcard.bin
 fi
 
 # Check for updates ... WIP

+ 9 - 11
PF-build.sh

@@ -467,7 +467,7 @@ while getopts v:l:d:b:o:c:p:n:m:g:?h flag
             p) prusa_flag=${OPTARG};;
             n) new_build_flag=${OPTARG};;
             m) mk404_flag=${OPTARG};;
-            g) grafics_flag=${OPTARG};;
+            g) graphics_flag=${OPTARG};;
             ?) help_flag=1;;
             h) help_flag=1;;
         esac
@@ -977,23 +977,21 @@ echo "more information how to flash firmware https://www.prusa3d.com/drivers/ $(
 if [ ! -z "$mk404_flag" ]; then
 ./MK404-build.sh
 
-# Check if MMU2 is selected
-if [ "$mk404_flag" == "2" ]; then
-    PRINTER="${PRINTER}MMU2"
-fi
-
-# For Prusa MK2, MK2.5 and MK2.5S
+# For Prusa MK2, MK2.5/S
 if [ "$MOTHERBOARD" == "BOARD_RAMBO_MINI_1_3" ]; then
     PRINTER="${PRINTER}_mR13"
+elif [ "$mk404_flag" == "2" ]; then # Check if MMU2 is selected only for MK3/S
+    PRINTER="${PRINTER}MMU2"
 fi
 
+
 # Run MK404 with grafics
-if [ ! -z "$grafics_flag" ]; then
+if [ ! -z "$graphics_flag" ]; then
     MK404_options="--colour-extrusion --extrusion Quad_HR -g "
-    if [ "$grafics_flag" == "1" ]; then
-        options="${MK404_options}lite"
+    if [ "$graphics_flag" == "1" ]; then
+        MK404_options="${MK404_options}lite"
     else
-        options="${MK404_options}fancy"
+        MK404_options="${MK404_options}fancy"
     fi
 
 fi