adafruit / Adafruit_Learning_System_Guides

Programs and scripts to display "inline" in Adafruit Learning System guides

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hi / Lo times are NOT being displayed expected in the "MagTag Tides Viewer" tutorial

wavesailor opened this issue · comments

I found a bug in the following code: https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/MagTag_Tides/code.py

Currently the Hi / Lo times are NOT being displayed expected - They are just missing. Everything else works.

I'm using the latest library and Circuit Python for MagTag

adafruit-circuitpython-adafruit_magtag_2.9_grayscale-en_US-7.0.0.uf2
adafruit-circuitpython-bundle-7.x-mpy-20211210.zip

I found the solution.

this line of code hilo_times[i].hidden = False needs to be added to the end of this function def show_hilo():

Then it works as it should.

great! wanna do a PR? :)

I spoke with this user on Discord as well. I can PR the fix for this and one other minor issue they reported this afternoon.

Weird. Wonder how this ever worked? Maybe somehow got away with it in 6.x?

@wavesailor Thanks for finding this.

@FoamyGuy Thanks for PR. I'd suggest adding the visible setting here along with the icon:

# make it visible
hilo_icons[i].hidden = False