diff --git a/firmware/axl-stepper/src/main.cpp b/firmware/axl-stepper/src/main.cpp index abb8c0897bf2ae42e78f9e1ff6ba523484825718..a35c8e1d22ae8701653b0cd1bf2d5f9ca5e5f4ce 100644 --- a/firmware/axl-stepper/src/main.cpp +++ b/firmware/axl-stepper/src/main.cpp @@ -12,7 +12,7 @@ #include "osape_arduino/vp_arduinoSerial.h" #include "osape_ucbus/vb_ucBusDrop.h" -OSAP osap("axl-stepper_y"); +OSAP osap("axl-stepper_x"); VPort_ArduinoSerial vpUSBSerial(&osap, "arduinoUSBSerial", &Serial); @@ -83,8 +83,12 @@ void updateStatesEP(void){ // -------------------------------------------------------- 3: Halt +uint32_t haltLightOnTime = 0; + EP_ONDATA_RESPONSES onHaltData(uint8_t* data, uint16_t len){ axl_halt(); + ERRLIGHT_ON; + haltLightOnTime = millis(); return EP_ONDATA_REJECT; } @@ -222,6 +226,9 @@ void loop() { updateStatesEP(); //axl_printHomeState(); } + if(haltLightOnTime + 250 < millis()){ + ERRLIGHT_OFF; + } } // -------------------------------------------------------- Small-Time Ops