Add auto-cut functionality: diagram, switches, new state
control.cpp:
- Add new systemState CUTTING
- change systemState_t from enum to enum class (conflicting with
cutter enum)
- Add CUTTING functionality to CUT switch and auto cut after target
reached if enabled
cutter.cpp:
- Add function cutter_isRunning()
config:
- Add GPIO_LAMP macro to config
This commit is contained in:
@@ -55,6 +55,20 @@ cutter_state_t cutter_getState(){
|
||||
|
||||
|
||||
|
||||
//============================
|
||||
//===== cutter_isRunning =====
|
||||
//============================
|
||||
bool cutter_isRunning(){
|
||||
if (cutter_state == cutter_state_t::START
|
||||
|| cutter_state == cutter_state_t::CUTTING) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//---------------------------
|
||||
//-------- setState ---------
|
||||
//---------------------------
|
||||
|
||||
Reference in New Issue
Block a user