Closed markmizu closed 2 years ago
To fix the positions change all the / to // to get integer division on Python3.
@nophead Thanks. Yes replacing the / for // corrected that issue for me. Switched end of that line to ...* ( i // row_count))
Any ideas on this one @sandyjmacdonald - looks like you did some porting to Python 3 with fixes here https://github.com/pimoroni/enviroplus-python/commit/20442c9a53edb05b925faa07eb8360bd46442978 but the code mentioned above hasn't changed insofar as I can tell.
Tested locally. Seems to be working.
In the display_everything() function - xrange is deprecated in python 3 also there is a creep in the x position of each successive text element so they display in a stepped line going off the right side of the screen. The y positions are fine, just the x positions are wrong.
I fixed as follows - A: changed both xrange() statements to range() B: changed end of x= statement from (i / row_count)) to (i % column_count))