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:
jonny_ji7
2022-09-17 11:42:38 +02:00
parent 824bad930e
commit 992d852189
7 changed files with 67 additions and 33 deletions

View File

@@ -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 ---------
//---------------------------