Skip to content

Commit

Permalink
Some changes merged manually from pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebazzz committed Nov 1, 2020
1 parent 90c9ab8 commit 8d5ddd2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) {
// Handle UI input / draw events
TERN(DWIN_CREALITY_LCD, DWIN_Update(), ui.update());

#if ENABLED(FIX_MOUNTED_PROBE)
#if PIN_EXISTS(OPTO_SWITCH)
static bool optoSwitch;
if (optoSwitch != READ(OPTO_SWITCH_PIN)) {
optoSwitch = READ(OPTO_SWITCH_PIN);
Expand All @@ -761,8 +761,6 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) {
bool is_in_probing_zone = READ(OPTO_SWITCH_PIN) == 0;
endstops.enable_z_probe(is_in_probing_zone);
}


#endif

// Run i2c Position Encoders
Expand Down Expand Up @@ -1104,9 +1102,13 @@ void setup() {
SETUP_RUN(ui.reset_status()); // Load welcome message early. (Retained if no errors exist.)
#endif

#ifdef FIX_MOUNTED_PROBE
SERIAL_ECHOLN("Initializing COM PIN");
#ifdef PIN_EXISTS(COM)
SERIAL_ECHOLN("Init COM_PIN");
OUT_WRITE(COM_PIN, HIGH);
#endif

#if PIN_EXISTS(OPTO_SWITCH)
SETUP_LOG("Init OPTO_SWITCH_PIN");
SET_INPUT(OPTO_SWITCH_PIN);
#endif

Expand Down

0 comments on commit 8d5ddd2

Please sign in to comment.