Closed Adrienne200 closed 4 months ago
Thanks for this.
One supplementary question: what do we want "align left" and "align right" to mean?
In the current version of the software (Jan 2, commit 8bdb8a6), with the "knit side" box unchecked, looking at the purl side:
I'm not sure what the original Brother software does, but the current behaviour seems wrong. If "align left" means "align on the LHS of the screen", then that should happen whether or not the "knit side image" checkbox is checked. If "align left" means "align in the LHS of the finished garment", then that is the reverse of what is happening at the moment.
The behavior is still the same in 0.99.0-rc4 (Mac)
(The Alignment feature is separate. This is about the basic behavior with the default center alignment.)
@Adrienne200 I believe my observed issue (below) is the same as this one, but I would appreciate your eyes / brain on this. If my issue is something else, I can raise a new one.
AYAB software version: 0.99 RC4 Computer/OS: Apple (M1) Ventura 13.4 Knitting machine: KH965 AYAB hardware: Interface
Steps:
Expected result: My knitting will read "AYAB 1.0" when viewed from the knit side. Actual result: My knitting reads backwards from the knit side.
Still backwards in release build rc6. The UI is the way I want it, but I want the actual knitting to exactly match the screen. With all settings at default, the image that I'm looking at on the right side of the screen should appear on the right side of the knitting machine, the green side of the image should be on the green needles. The purl side matches the screen.
I've traced through the code trying to see where the image was reversed. In the default case we definitely want (well, since it was decided to get rid of the confusing default flipping) the leftmost pixel to drive the leftmost needle, so no flipping should be necessary.
I think I found the culprit here:
When preparing the pattern from the image, we do need to flip the image vertically, as the comment indicates, but here we have a 180 degree rotation instead, which ends up also flipping the image horizontally.
Changing this ROTATE_180
to FLIP_TOP_BOTTOM
is all that's needed to avoid that unnecessary transformation. In my simulation-only testing I believe the generated serial output is now correct.
However, this visually flips the "knit progress" panel, which currently reverses the bits from the sent pattern:
Removing the above line results in a correct progress display.
I'll try to make a proper PR for these minimal changes by tomorrow unless someone beats me to it.
I'll note that in my testing, left/right alignment options appeared to be reversed (selecting right alignment does move the image visually to the right but knits it to the left), and it is quite easy to break the progress panel by playing with these options. But that's another set of issues, which the proposed changes above do not impact, ang which will need looking into separately.
AYAB software version: 0.99 RC2 Computer/OS: Windows 7 Knitting machine: KH910 AYAB hardware: Shield or interface
Following from the conversation in #604, I'm looking at the simplest case, all default settings, open an asymmetrical image, what should it look like? On the screen, and which needles should knit? I think this should be the WYSIWYG case, open the image so it looks exactly as you saved it, and knit it out so that the image as you see it appears on the side facing you as you knit, the purl side.
Steps to reproduce the behavior:
Expected behavior: The UI as shown in the screenshot is, I believe, correct as it stands for the non-KSI case, but I want it to finish the job by having the actual knitting also match the image as you look at it, so the tail of the mu character should appear on the left, the yellow side, but it currently appears on the right.