evil-mad / axidraw

Software for the AxiDraw drawing machine
GNU General Public License v2.0
430 stars 130 forks source link

Prevent computer sleep while plotting #148

Open reidab opened 1 year ago

reidab commented 1 year ago

I hit an issue the other night where a plot stopped with the pen down and bled a bit of ink out when my computer went to sleep. While it's easy enough to just turn off sleep on the computer driving the plotter, it would be nice to have the driver hold a wake lock while plotting is active.

This seems possible from python using https://github.com/np-8/wakepy, or by making similar calls directly.

oskay commented 1 year ago

Interesting; I haven't seen that before.

EmbeddedMan commented 1 year ago

If it's a Windows PC, I've used Caffeine before (https://zhornsoftware.co.uk/caffeine/) which works great. Just run it and it will make little keypresses to keys that don't exist (configurable) to keep your computer awake indefinitely. We use it at work when we need to run 3 day long tests and the IT departments forces a 30 minute sleep timeout.