Skip to content

Commit

Permalink
🐛 Fix AnyCubic Trigorilla
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Nov 9, 2022
1 parent 23d944a commit 922b1d6
Show file tree
Hide file tree
Showing 8 changed files with 590 additions and 540 deletions.
3 changes: 3 additions & 0 deletions Marlin/src/feature/powerloss.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ class PrintJobRecovery {
static void prepare();

static void setup() {
#if PIN_EXISTS(OUTAGECON)
OUT_WRITE(OUTAGECON_PIN, HIGH);
#endif
#if PIN_EXISTS(POWER_LOSS)
#if ENABLED(POWER_LOSS_PULLUP)
SET_INPUT_PULLUP(POWER_LOSS_PIN);
Expand Down
11 changes: 9 additions & 2 deletions Marlin/src/gcode/config/M43.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,16 @@ void GcodeSuite::M43() {

// 'P' Get the range of pins to test or watch
uint8_t first_pin = PARSED_PIN_INDEX('P', 0),
last_pin = parser.seenval('P') ? first_pin : (NUMBER_PINS_TOTAL) - 1;
last_pin = parser.seenval('L') ? PARSED_PIN_INDEX('L', 0) : parser.seenval('P') ? first_pin : (NUMBER_PINS_TOTAL) - 1;

if (first_pin > last_pin) return;
NOMORE(first_pin, (NUMBER_PINS_TOTAL) - 1);
NOMORE(last_pin, (NUMBER_PINS_TOTAL) - 1);

if (first_pin > last_pin) {
const uint8_t f = first_pin;
first_pin = last_pin;
last_pin = f;
}

// 'I' to ignore protected pins
const bool ignore_protection = parser.boolval('I');
Expand Down
Loading

0 comments on commit 922b1d6

Please sign in to comment.