ScottSturdivant / rpi_metar

METAR LED Display for a Raspberry Pi
MIT License
26 stars 16 forks source link

Legend index 0 problem #16

Closed efc3 closed 4 years ago

efc3 commented 4 years ago

If LED index 0 is in the legend it doesn't turn on. This is due to a conditional error in core.py's set_legend() function: https://github.com/ScottSturdivant/rpi_metar/blob/944cbeb645127784d13083f2b53bae6c8f4ec8c7/rpi_metar/core.py#L314

The conditional should be comparing index with 'None' instead so the line should be: if index is not None:

Seems to work for me with that change in place.