Skip to content
Merged
Changes from 1 commit
Commits
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
10 changes: 8 additions & 2 deletions Grbl_Esp32/src/CoolantControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@
#include "Grbl.h"

void coolant_init() {
static bool init_pins = true; // used to show message only once.
if (init_pins) {
#ifdef COOLANT_FLOOD_PIN
pinMode(COOLANT_FLOOD_PIN, OUTPUT);
pinMode(COOLANT_FLOOD_PIN, OUTPUT);
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Flood coolant on pin %s", pinName(COOLANT_FLOOD_PIN).c_str());
#endif
#ifdef COOLANT_MIST_PIN
pinMode(COOLANT_MIST_PIN, OUTPUT);
pinMode(COOLANT_MIST_PIN, OUTPUT);
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Mist coolant on pin %s", pinName(COOLANT_MIST_PIN).c_str());
#endif
init_pins = false;
}
coolant_stop();
}

Expand Down