AllYarnsAreBeautiful/ayab-desktop

[BUG] When Knit Side Image is checked, the image on the knit side should be the same as the saved image.

Closed this issue · 4 comments

Environment
AYAB software version: 0.99 RC2
Computer/OS: Windows 7
Knitting machine: KH910
AYAB hardware: Shield or interface

Companion to #613, when Knit Side Image is checked, the image should be displayed backwards in both screen images, and knit backwards as you see it as you knit, so that it is the right way round on the knit side.

Steps to reproduce the behavior:

  1. AYAB 1.0 RC2 (with the firmware reflashed and the correct machine set in the Prefs)
  2. Open the test image uC3, and bring needles L15 - R15 into work.
  3. Leave all the settings at default, except do check Knit Side Image.
  4. Start AYAB as usual, waiting for the beep after crossing the left turn mark.
  5. Observe which way round the image appears on the actual knitting, which side does the tail of the mu character appear?

Expected behavior:
The UI as shown in the screenshot is partially correct for the Knit Side Image box checked. Both images are flipped, that is correct, but two changes:

  • the tail of the mu character should appear on the right, the green side, to match the images as displayed, but it currently appears on the left.
  • the orange and green bars should not be reversed, leave them at their usual setting.

Mirroring 2

The UI is good now, (0.99.0-rc4, which installs fw rc3) but the actual knitting is still wrong. For this case the tail of the mu character should appear on the green/right needles, which matches the UI, and so that the text will be the right way round on the knit side.

Same at rc6. Companion to #613, the UI is good, just needs the actual knitting flipped to match. All settings at default except Knit Side Image is checked. The image flips correctly on the screen - the actual knitting should flip too.

Edit: my logging code was built on a faulty assumption, see my next comment.

I don't have hardware yet to confirm in a real setting, but I added logging to monitor the bytes written to the line data in simulation. Running the current state of 1.0.0-dev (5037932) here are the cnfLine packets written out when knitting the µC3 pattern with all default settings:

nr=0 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=1 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=2 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=3 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111110000011111100011111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=4 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001110011100000110000100100001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=5 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100001100001100000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=6 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100001100011000000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=7 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100001100011000000000000001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=8 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100001100011000000000001111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=9 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100001100011000000000000001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=10 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100001100011000000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=11 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=12 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000100100001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=13 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111100011111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=14 color=0 flags=0x1	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

And here's what is written out when Knit Side Image (side note: shouldn't this be spelled Knit-side Image? The current spelling always makes me think that it's going to knit some "side image"; but I'm not a native speaker so feel free to disregard):

nr=0 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=1 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=2 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=3 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111000111111000001111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=4 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000100100001100000111001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=5 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000110000110000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=6 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000011000110000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=7 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001110000000000000011000110000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=8 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000111110000000000011000110000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=9 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001110000000000000011000110000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=10 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000011000110000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=11 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=12 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000001110000100100001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=13 color=0 flags=0x0	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111000111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
nr=14 color=0 flags=0x1	line_data=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Based on this output, I believe the knitting would be correctly reversed on a real machine, so I'd consider this issue fixed. There's just one snag, which is that I checked out the code for 0.99.0-rc4, added the same serial logging and I got the exact (presumably correct) output above, which does not match @Adrienne200 's report . I guess I won't be sure until I get some hardware installed.

Update: I foolishly assumed that the default case ("Knit Side Image" unchecked) would generate a correctly-oriented output, and based my logging code on that assumption. When in fact it seems now clear to me that #613 is precisely requesting that the output be horizontally flipped from its current state, in the default case. Apologies for the confusion.