smoothie port to mbed online compiler (smoothieware.org)
For documentation, license, ..., please check http://smoothieware.org/
This version has been tested with a 3 axis machine
libs/Pauser.cpp
- Committer:
- scachat
- Date:
- 2012-07-31
- Revision:
- 0:31e91bb0ef3c
File content as of revision 0:31e91bb0ef3c:
#include "libs/Kernel.h" #include "Pauser.h" #include "libs/nuts_bolts.h" #include "libs/utils.h" #include <string> using namespace std; Pauser::Pauser(){} void Pauser::on_module_loaded(){ this->counter = 0; } void Pauser::take(){ this->counter++; if( this->counter == 1 ){ this->kernel->call_event(ON_PAUSE, &this->counter); } } void Pauser::release(){ this->counter--; if( this->counter == 0 ){ this->kernel->call_event(ON_PLAY, &this->counter); } }