missionpinball / mpf

Mission Pinball Framework: Open source software to run a real pinball machine.
http://missionpinball.org
MIT License
216 stars 142 forks source link

Fix fast exp hex decode #1796

Closed bosh closed 3 months ago

bosh commented 3 months ago

I branched this off the last green 0.80.x, so it should be all green still

-first commit adds a failing test (not even any assertions -- just defining a FAST EXP LED using "previous" is enough to trigger lower-case-hex behavior if it's on a board with id such as "B4". -second commit adds hex normalization and passes tests again. Not sure if I picked the best hex massaging function from Util, but it was better than just .upcase() in the callsite :)

bosh commented 3 months ago

Sure I can add assertions - as far as I could tell a few of the lights in the file just existed to test for crashes rather than getting asserted on directly, but I'll think of something for mine.

Re 0.57 backporting - .... I wrote something here but I was wrong. For some reason I thought the "previous" handling was new to 0.80.x but I checked again and it's in 57- so yeah lemme rebase this for the older versions

bosh commented 3 months ago

Alright I did the things :)