Prusa MINI Firmware overview
TemporaryGlobalEndstopsState Class Reference

#include <endstops.h>

Public Member Functions

 TemporaryGlobalEndstopsState (const bool enable)
 
 ~TemporaryGlobalEndstopsState ()
 

Detailed Description

A class to save and change the endstop state, then restore it when it goes out of scope.

Constructor & Destructor Documentation

◆ TemporaryGlobalEndstopsState()

TemporaryGlobalEndstopsState::TemporaryGlobalEndstopsState ( const bool  enable)
188  : saved(endstops.global_enabled()) {
189  endstops.enable_globally(enable);
190  }
Here is the call graph for this function:

◆ ~TemporaryGlobalEndstopsState()

TemporaryGlobalEndstopsState::~TemporaryGlobalEndstopsState ( )
191 { endstops.enable_globally(saved); }
Here is the call graph for this function:
Endstops::enable_globally
static void enable_globally(const bool onoff=true)
Definition: endstops.cpp:285
Endstops::global_enabled
static bool global_enabled()
Definition: endstops.h:89
endstops
Endstops endstops
Definition: endstops.cpp:51