Skip to content

Commit

Permalink
Prepairing for 3.3.0 Rel
Browse files Browse the repository at this point in the history
Correct readme, changelog and added changes for double cutter #210

Variants added to do two builds
  • Loading branch information
Rob committed Sep 19, 2021
1 parent d2c2000 commit 1510964
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 11 deletions.
10 changes: 10 additions & 0 deletions .build/pre_build_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import os
import shutil
Import("env")

my_flags = env.ParseFlags(env['BUILD_FLAGS'])
defines = {k: v for (k, v) in my_flags.get("CPPDEFINES")}

shutil.copyfile(os.path.join(os.getcwd(), "src/variants/{0}.h".format(defines.get('CONFIG'))), os.path.join(os.getcwd(), 'src/config_tzb.h')),

env.Replace(PROGNAME="TZB-{0}-{1}-BN{2}".format(defines.get('CONFIG'), defines.get('VERSION'), defines.get('BN')))
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
/.vs/MM-control-01/v14/.suo
/main.cpp~RFdf1346e.TMP
/__vm/.MM-control-01.vsarduino.h
/src/config_tzb.h
Doc
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Changelog of MMU2S Firmware
=============================
# v3.3.0 RMM
* Pulled Printer Code upstream to 3.10.0
* Implemented BLTouch support for MK3S
* Updated custom variant of MMU2S code for @gizzburn(and others) on issue #210 - double selector blades
* Fixed issue Error on failure recovery #205
* Updated readme to reflect new printer FW build environment changes

# v3.2.0 RMM
* Pulled Printer Code upstream to 3.9.3
* MMU2S Cutter implemented and tested with stock blade location #187
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ This is configured to work directly with **MMU2S** with matching **MK3S** FW at
https://github.com/TheZeroBeast/TZB-MK3S-Firmware
### PlatformIO
Download, open in PlatformIO
Follow these steps to install EINSY board
https://community.platformio.org/t/error-when-building-latest-3d-printer-firmware/9506/2
Build.
The HEX which is placed within the .pio root folder still requires the addition of the **; device = mm-control** line as bellow.

### Arduino
Expand Down
27 changes: 21 additions & 6 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
[platformio]
src_dir = .
lib_dir = .piolib
libdeps_dir = .piolibdeps
[common_env_data]
build_flags =
-D BN=373
-D VERSION=3.3.0

[env:mmu]
[env:MMU2S]
platform = atmelavr
extra_scripts = pre:.build/pre_build_script.py
board = prusa_mm_control
framework = arduino
board = leonardo
src_filter = +<*> -<variants>
build_flags = ${common_env_data.build_flags}
-D CONFIG=MMU2S

[env:MMU2S-DoubleCutter]
platform = atmelavr
extra_scripts = pre:.build/pre_build_script.py
board = prusa_mm_control
framework = arduino
src_filter = +<*> -<variants>
build_flags = ${common_env_data.build_flags}
-D CONFIG=MMU2S-DoubleCutter


5 changes: 3 additions & 2 deletions src/config.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// config.h - main configuration file

#include "config_tzb.h"

#define FW_VERSION 320 // example: 103 means version 1.0.3
#define FW_BUILDNR 372 // number of commits in 'master'
#define FW_VERSION 330 // example: 103 means version 1.0.3
#define FW_BUILDNR 373 // number of commits in 'master'

#define WAKE_TIMER 300000 // 5m

Expand Down
4 changes: 4 additions & 0 deletions src/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ int filament_lookup_table[9][3] =
const uint8_t IDLER_PARKING_STEPS = (355 / 2) + 40; // 217
const uint16_t EJECT_PULLEY_STEPS = 2000;

#ifdef doublecutter
const int selectorStepPositionsFromHome[EXTRUDERS+2] = {-3178, -2479, -1782, -1085, -387, -27, 0} ;
#else
const int selectorStepPositionsFromHome[EXTRUDERS+2] = {-3700, -3002, -2305, -1607, -910, -100, 0};
#endif // doublecutter
const int idlerStepPositionsFromHome[EXTRUDERS+1] = {-130, -485, -840, -1195, -1550, 0};

uint8_t selSGFailCount = 0;
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/variants/MMU2S-DoubleCutter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define doublecutter
1 change: 1 addition & 0 deletions src/variants/MMU2S.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define cutter

0 comments on commit 1510964

Please sign in to comment.