Skip to content

Commit 0a226ee

Browse files
authored
Merge pull request #1462 from theor/homing_button
Homing button
2 parents 11fb1a8 + e0239db commit 0a226ee

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

FluidNC/src/Control.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Control::Control() {
1818
_pins.push_back(new ControlPin(&macro3Event, "macro3_pin", '3'));
1919
_pins.push_back(new ControlPin(&faultPinEvent, "fault_pin", 'F'));
2020
_pins.push_back(new ControlPin(&faultPinEvent, "estop_pin", 'E'));
21+
_pins.push_back(new ControlPin(&homingButtonEvent, "homing_button_pin", 'O'));
2122
}
2223

2324
void Control::init() {

FluidNC/src/Protocol.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,10 @@ static void protocol_run_startup_lines() {
392392
config->_macros->_startup_line1.run(&allChannels);
393393
}
394394

395+
static void protocol_do_start_homing(){
396+
Machine::Homing::run_cycles(Machine::Homing::AllCycles);
397+
}
398+
395399
static void protocol_do_soft_restart() {
396400
// Reset primary systems.
397401
system_reset();
@@ -1157,6 +1161,7 @@ const NoArgEvent startEvent { protocol_do_start };
11571161
const NoArgEvent restartEvent { protocol_do_soft_restart };
11581162
const NoArgEvent fullResetEvent { restart };
11591163
const NoArgEvent runStartupLinesEvent { protocol_run_startup_lines };
1164+
const NoArgEvent homingButtonEvent { protocol_do_start_homing };
11601165

11611166
const NoArgEvent rtResetEvent { protocol_do_rt_reset };
11621167

FluidNC/src/Protocol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ extern const NoArgEvent restartEvent;
110110
extern const NoArgEvent fullResetEvent;
111111

112112
extern const NoArgEvent runStartupLinesEvent;
113+
extern const NoArgEvent homingButtonEvent;
113114

114115
// extern const NoArgEvent statusReportEvent;
115116

0 commit comments

Comments
 (0)