Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #849; Respect the OctoPrint axis invert flags #856

Merged
merged 5 commits into from
Jul 30, 2020
Merged

Fix issue #849; Respect the OctoPrint axis invert flags #856

merged 5 commits into from
Jul 30, 2020

Conversation

pfemiani
Copy link
Contributor

@pfemiani pfemiani commented Jul 29, 2020

I went ahead and took a stab at fixing the issue where the OctoPrint axis inversion setting was not being respected in the in the printer control view.

  • Created PrinterProfileService
  • Implemented getDefaultPrinterProfile()
  • When Control view loads it gets the default printer profile, and subsequent axis moves take the "inverted" setting into account

Fixes #849.

Copy link
Owner

@UnchartedBull UnchartedBull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great contribution. Thank You! Just two minor things, but otherwise this is ready to be merged :)

src/app/printerprofile.service.ts Outdated Show resolved Hide resolved
src/app/printerprofile.service.ts Outdated Show resolved Hide resolved
pfemiani and others added 2 commits July 29, 2020 11:16
Simplifying code based on @UnchartedBull feedback

Co-authored-by: Timon G. <timon.gaebelein@icloud.com>
@UnchartedBull
Copy link
Owner

Thank you. Will be released with the next version :)

@UnchartedBull UnchartedBull merged commit e9377bd into UnchartedBull:master Jul 30, 2020
@pfemiani
Copy link
Contributor Author

pfemiani commented Aug 3, 2020

@UnchartedBull ... I have no idea how I missed this while testing, probably because I was mostly looking at inputs/outputs, and visually testing primarily with Z axis... but the Y axis controls in OctoDash seem to actually be sending the wrong direction. If you click the up arrow, it is configured for a "-" direction, and down arrow configured for "+". However, in OctoPrint if you click the up arrow it moves Y in positive direction (assuming axis inversion is not enabled). I debugged/stepped through and verified X and Z axis both move in correct direction, and all 3 axis correctly respect the inversion setting, just the Y axis controls are backward. Let me know if you would like me to create an issue or another PR to fix this, or if its easier for you to just knock it out since it should simply be switching the "-" and "+" for the Y axis in control.component.html.

Thanks in advance! I'm really loving OctoDash!

@UnchartedBull
Copy link
Owner

I'll have a look at it once I'm back :)

kantlivelong pushed a commit to kantlivelong/OctoDash that referenced this pull request May 5, 2021
…nchartedBull#856)

* Fix UnchartedBull#849 ; Respect the OctoPrint axis invert flags

* Fix UnchartedBull#849 ; Fix NRE and clean up code a bit

* PR Changes for issue UnchartedBull#849 based on CodeFactor requirements

* Update src/app/printerprofile.service.ts

Simplifying code based on @UnchartedBull feedback

Co-authored-by: Timon G. <timon.gaebelein@icloud.com>

* Update Promise handling based on @UnchartedBull feedback

Co-authored-by: Peter Femiani <peter.femiani@match.com>
Co-authored-by: Timon G. <timon.gaebelein@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Axis controls don't match OctoPrint (ie: inverted setting)
3 participants