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 for visible turtle location #48

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

FoamyGuy
Copy link
Contributor

@FoamyGuy FoamyGuy commented Dec 9, 2024

@ladyada
Resolves: #46

In #45 the lines setting self._x and self._y were removed from inside of goto(). That fixed the truncating decimal problem by not setting those values to their integer truncated versions. However, _drawturtle() was relying on those values in order to update the visible location of the turtle on the display, and as a result now the visible location of the turtle is "behind" by 1 move, it gets placed at the start of the most recently drawn line rather than the end. It also doesn't animate during the drawing of the line like it did before.

Solved by adding new variables to track the integer location that the turtle should be at and setting them to the appropriate values inside of goto() and use them from inside of _drawturtle()

@FoamyGuy FoamyGuy merged commit 63a6ffb into adafruit:main Dec 9, 2024
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 10, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_AD569x to 2.0.5 from 2.0.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_AD569x#5 from adafruit/reset_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_BMP3XX to 1.3.21 from 1.3.20:
  > Merge pull request adafruit/Adafruit_CircuitPython_BMP3XX#25 from jposada202020/adding_displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO08X_RVC to 1.0.18 from 1.0.17:
  > Merge pull request adafruit/Adafruit_CircuitPython_BNO08x_RVC#9 from caternuson/iss8

Updating https://github.com/adafruit/Adafruit_CircuitPython_EPD to 2.13.1 from 2.13.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_EPD#84 from mikeysklar/1680z-alignment

Updating https://github.com/adafruit/Adafruit_CircuitPython_VCNL4010 to 0.11.12 from 0.11.11:
  > Merge pull request adafruit/Adafruit_CircuitPython_VCNL4010#26 from jposada202020/adding_displayIO_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_VEML6070 to 3.1.21 from 3.1.20:
  > Merge pull request adafruit/Adafruit_CircuitPython_VEML6070#26 from jposada202020/adding_displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_datetime to 1.3.0 from 1.2.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_datetime#27 from FoamyGuy/isoformat_Z_parse

Updating https://github.com/adafruit/Adafruit_CircuitPython_FancyLED to 1.4.21 from 1.4.20:
  > Merge pull request adafruit/Adafruit_CircuitPython_FancyLED#31 from FoamyGuy/use_ruff

Updating https://github.com/adafruit/Adafruit_CircuitPython_PIOASM to 1.3.0 from 1.2.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_PIOASM#73 from adafruit/side-set-pindirs-directive

Updating https://github.com/adafruit/Adafruit_CircuitPython_turtle to 3.1.2 from 3.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_turtle#48 from FoamyGuy/visible_turtle_loc_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
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.

last line drawn has the turtle at the wrong end
2 participants