Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MeatPack with per-serial-port instances #21306

Merged
merged 28 commits into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
42e1a45
Apply meatpack conditionally to the serial port themselves and not on…
X-Ryl669 Mar 10, 2021
428cacd
Fix bad type
X-Ryl669 Mar 10, 2021
fc49340
Make meatpack non static
X-Ryl669 Mar 10, 2021
34edff4
Merge branch 'bugfix-2.0.x' into fixMultiserial
X-Ryl669 Mar 10, 2021
cf96951
Let info method be static
X-Ryl669 Mar 10, 2021
d8ac4d2
Revert "Let info method be static"
thinkyhead Mar 10, 2021
884029d
Add missing configuration file
X-Ryl669 Mar 10, 2021
ab7e36a
cleanup
thinkyhead Mar 10, 2021
24428d9
updated test
thinkyhead Mar 10, 2021
22f6a7c
disregard unused serial
thinkyhead Mar 10, 2021
03c6048
test for BINARY_FILE_TRANSFER
rhapsodyv Mar 10, 2021
7cc95bc
fix test
thinkyhead Mar 10, 2021
8a15dd6
Merge branch 'fixMultiserial' of https://github.com/X-Ryl669/MarlinFo…
thinkyhead Mar 10, 2021
1316a5f
sp
thinkyhead Mar 10, 2021
f7223ad
ayw
thinkyhead Mar 10, 2021
ffbcfd5
Fix build issue
X-Ryl669 Mar 10, 2021
7e8d851
renumber
thinkyhead Mar 10, 2021
c090c67
you know it
thinkyhead Mar 10, 2021
a265b8d
forward type
thinkyhead Mar 10, 2021
006c8c8
Serial#Type
thinkyhead Mar 10, 2021
372ce41
more specific type
thinkyhead Mar 10, 2021
df8f20b
Add sanity check
X-Ryl669 Mar 10, 2021
c8b19fb
also
thinkyhead Mar 10, 2021
7f1dd2d
HAS_MEATPACK
thinkyhead Mar 10, 2021
49632f2
Number DefaultSerial from 1 too
thinkyhead Mar 10, 2021
41d8dd2
spel
thinkyhead Mar 10, 2021
ad944eb
Define MSerial0 directly
thinkyhead Mar 10, 2021
450a773
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/21306
thinkyhead Mar 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Marlin/src/core/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "../inc/MarlinConfig.h"
#include "serial_hook.h"

#if ENABLED(MEATPACK)
#if HAS_MEATPACK
#include "../feature/meatpack.h"
#endif

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/feature/meatpack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#include "../inc/MarlinConfig.h"

#if ENABLED(MEATPACK)
#if HAS_MEATPACK

#include "meatpack.h"
MeatPack meatpack;
Expand Down Expand Up @@ -215,4 +215,4 @@ uint8_t MeatPack::get_result_char(char* const __restrict out) {
return res;
}

#endif // MEATPACK
#endif // HAS_MEATPACK
2 changes: 1 addition & 1 deletion Marlin/src/gcode/host/M115.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void GcodeSuite::M115() {
cap_line(PSTR("COOLER_TEMPERATURE"), ENABLED(HAS_COOLER));

// MEATPACK Compresson
cap_line(PSTR("MEATPACK"), ENABLED(MEATPACK));
cap_line(PSTR("MEATPACK"), ENABLED(HAS_MEATPACK));

// Machine Geometry
#if ENABLED(M115_GEOMETRY_REPORT)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -2914,5 +2914,5 @@
#endif

#if ENABLED(MEATPACK_ON_SERIAL_PORT_1) || BOTH(HAS_MULTI_SERIAL, MEATPACK_ON_SERIAL_PORT_2)
#define MEATPACK 1
#define HAS_MEATPACK 1
#endif
15 changes: 5 additions & 10 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@
#error "UNKNOWN_Z_NO_RAISE is replaced by setting Z_IDLE_HEIGHT to Z_MAX_POS."
#elif defined(Z_AFTER_DEACTIVATE)
#error "Z_AFTER_DEACTIVATE is replaced by Z_IDLE_HEIGHT."
#elif defined(MEATPACK)
#error "MEATPACK is now enabled with MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2, etc."
#endif

/**
Expand Down Expand Up @@ -3338,17 +3340,10 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
#endif

/**
* MEATPACK checks
* Sanity Check for MEATPACK and BINARY_FILE_TRANSFER Features
*/
#if ENABLED(MEATPACK)
#if ENABLED(BINARY_FILE_TRANSFER)
#error "Either enable MEATPACK or enable BINARY_FILE_TRANSFER."
#elif NONE(MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2)
#error "MEATPACK is now enabled with MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2, etc."
#endif
#if ENABLED(MEATPACK_ON_SERIAL_PORT_2) && !DISABLED(SERIAL_PORT_2)
#error "MEATPACK_ON_SERIAL_PORT_2 is only valid when SERIAL_PORT_2 is defined"
thinkyhead marked this conversation as resolved.
Show resolved Hide resolved
#endif
#if BOTH(HAS_MEATPACK, BINARY_FILE_TRANSFER)
#error "Either enable MEATPACK or BINARY_FILE_TRANSFER, not both."
#endif

/**
Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ PCA9632 = src_filter=+<src/feature/leds/pca9632.cpp>
PRINTER_EVENT_LEDS = src_filter=+<src/feature/leds/printer_event_leds.cpp>
TEMP_STAT_LEDS = src_filter=+<src/feature/leds/tempstat.cpp>
MAX7219_DEBUG = src_filter=+<src/feature/max7219.cpp> +<src/gcode/feature/leds/M7219.cpp>
MEATPACK = src_filter=+<src/feature/meatpack.cpp>
HAS_MEATPACK = src_filter=+<src/feature/meatpack.cpp>
MIXING_EXTRUDER = src_filter=+<src/feature/mixing.cpp> +<src/gcode/feature/mixing/M163-M165.cpp>
HAS_PRUSA_MMU1 = src_filter=+<src/feature/mmu/mmu.cpp>
HAS_PRUSA_MMU2 = src_filter=+<src/feature/mmu/mmu2.cpp> +<src/gcode/feature/prusa_MMU2>
Expand Down