Welcome! Log In Create A New Profile


Marlin - BLACKOUT (Power Failure) sensor

Posted by P3T3 
Marlin - BLACKOUT (Power Failure) sensor
December 20, 2017 03:06AM

I am working on implementation of BLACKOUT (Power Failure) sensor for Marlin firmware. My current state is:

1) I have working pin detection with connected sensor #define BLACKOUT_SENSOR
2) BLACKOUT_PIN is configurable with pin number, invert state and with or without pullup
3) interrupt works and inform running process about blackout at time
4) I can save current job filename to RECOVERY.G on SD card

What I need to do:

1) kill all current gcodes in the buffer
2) lift extruder and move it to X zero position
3) add other important informations in RECOVERY.G file
4) implement detection ov RECOVERY.G file on SD during Firmware boot and offer Restart aborted print

My problem is how to clear buffer because clear_command_queue(); does not work and kill all running gcodes...

Any help or suggestion?

Regards Petr

Průša i3 -> Rebel 2 s modifikovaným X vozíkem -> KRYAL Cube
repraper.cz & 3dexpo & KRYAL Cube
Sorry, only registered users may post in this forum.

Click here to login