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

[FEATURE] PINDA Image implementation #284

Open
vintagepc opened this issue Nov 12, 2020 · 1 comment
Open

[FEATURE] PINDA Image implementation #284

vintagepc opened this issue Nov 12, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@vintagepc
Copy link
Owner

Is your feature request related to a problem? Please describe.
Add support for the simulated PINDA to replicate an "image" as output by a MK3S over serial.

@vintagepc vintagepc added the enhancement New feature or request label Nov 12, 2020
@vintagepc
Copy link
Owner Author

vintagepc commented Nov 12, 2020

@DRracer - Just pushed up a preliminary implementation.
https://github.com/vintagepc/MK404/tree/PINDA-image-option

It's not complete/not quite right, but that is more to do with understanding the search algorithm and correcting the "magic numbers" that make it work than anything functional; That is something I expect would be far more expedient for someone familiar with the algorithm as opposed to my reverse engineering it. It's also entirely possible my issues are due to using an "image" from the simulated PINDA so it doesn't look quite enough like the real thing; it's very sensitive to Z height and this is the bit where I am "stuck" with a magic number. 

In any case, the core is there so you can paste in a text string "image" and it is parsed into a 32x32 array which is then used to determine the trigger height over a range that is +/-1024 steps from the defined center of the calibration point - the math happens in the CheckTriggerNoSheet function in PINDA.cpp.

Old behaviour can be restored by undefining ENABLE_PINDA_IMAGE in PINDA.h.

Note that because the image is used based on PINDA position, it should be the "corrected" one with alternate lines flipped to correct for travel direction.

Let me know if you can work with this or if you'd prefer I dig in more first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant