nornagon / saxi

Tools & library for driving the AxiDraw pen plotter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Couldn't acquire wake lock" message on Pi

andypiper opened this issue · comments

Raspberry Pi 4B
OS: Raspbian GNU/Linux 11
Node: 20.4.0
AxiDraw firmware version: 2.8.1

Server listening on http://[::]:9080
Found EBB at /dev/ttyACM0
Received plan of estimated duration 9m31s
Beginning plot...
Couldn't acquire wake lock. Ensure your machine does not sleep during plotting
Plot took 1m34s
Received plan of estimated duration 8m53s
Beginning plot...
Couldn't acquire wake lock. Ensure your machine does not sleep during plotting
Plot took 9m1s

I'm also seeing the same issues with the firmware check as described in #150

commented

I'm also seeing the same issues with the firmware check as described in #150

@andypiper Does the code here work for you? #176

yes, thanks @alexrudd2 that fixes the CLI firmware message / gets back the version and outputs an expected TODO error message. No change on the wake lock that I can see, but that's not unexpected.

Since the wake-lock module is macOS-only, it may be worth wrapping the call to WakeLock() in src/server.ts with an os-check, to avoid this warning - until I looked at both the saxi and wake-lock module code, I didn't know that this was not something I needed to worry about on a Pi.

@andypiper Can you try either of the linked PRs and see if this works for you? (one's here, one's a fork). @jedahan did exactly as you suggested with an OS check wrapper.