Pause button behavior is not ideal, and I can't figure out how to customize it (partly solved)


#1

Is there a way to have the machine extruder go to a specific X and Y coordinate? Rather than going straight to 0,0?

Edit: Asking for some clarification:

If there isn’t… what exactly is the set of commands that astroprint sends to the printer when you hit the pause button? And what exactly is the set of commands transmitted when the unpause button is pressed?

Edit: Result from my own investigation:

I think I found the command that’s sent to the printer. After looking at a download from github, I found what I believe to be the relevant line on row 993 of src/astriprint/printer/marlin/comm.py

self.sendCommand(“G1 F9000 X0 Y0 Z%.4f E%.4f” % (self._positionWhenPaused[2] + 15, self._positionWhenPaused[3] - 5))

How non-trivial would it end up being to change the “X0” to “X100” and “Y0” to “Y100” on my rpi3?

Another edit… How do I build the astrobox software from source code, so I can have this change in behavior?

Another edit…

I’ve gotten the pi to run from source, and got success at my initial issue (changing the “X0 Y0” to “X100 Y100” makes it all work how I want), but have come to another couple of issues.

The first one is an inability to look at my local pi in a web browser.

Console output up to the error:

getattr(filter, type)(data, out, **kwargs_final)
File “/usr/local/lib/python2.7/dist-packages/webassets/filter/sass.py”, line 196, in input self._apply_sass(_in, out, os.path.dirname(source_path))
File “/usr/local/lib/python2.7/dist-packages/webassets/filter/sass.py”, line 190, in _apply_sass return self.subprocess(args, out, _in)
File “/usr/local/lib/python2.7/dist-packages/webassets/filter/init.py”, line 523, in subprocess proc.returncode, stdout, stderr))
FilterError: scss: subprocess returned a non-success result code: 65, stdout=, stderr=Error: File to import not found or unreadable: fonts.
Load path: /home/pi/tools/etc/AstroBox on line 4 of standard input
Use --trace for backtrace.

The other issue is, I haven’t figured out how to run from source as a service, and have it run that by default. Also, I think I messed up my install altogether, so I’m going to flash a memory card and try again.

Yet another edit:

I’ve fixed all my problems. 3d printer-related, anyway.

The last issue, with the fun little errors above, was fixed by flashing the card again. Here’s the steps I had to take for this…

  1. Flash the SD card.
  2. Enable SSH for the Rpi according to these instructions.
  3. Run the install commands outlined in the AstroBox github. (Make sure you navigate to a folder in your home directory to store the source files).
  4. Change the /etc/astrobox/application.cfg file to say “True” for both variables. Details found here.
  5. Make your changes to your source files.
  6. Test your source files, directions on the github page linked above.
  7. Copy your changed files from your source directory to the regular top-level /Astrobox directory. You’ll need to change file permissions.
  8. Print as normal.

Can’t say if it works for anyone or even most, but it worked out for me this time.

Felt like an awful lot of for my tiny little brain to figure out to make the gantry not fly around when pause was hit. I believe the pause should be user-configurable.