m5stack / M5-ProductExampleCodes

All example codes of products supplied by M5Stack have been collected in this reposity.
MIT License
339 stars 485 forks source link

graphical error in M5StickC slot machine demo #20

Closed richard42 closed 3 years ago

richard42 commented 4 years ago

There is a bug in the slot machine demo which causes affects the shadowing effect that is composited on the top and bottom of the spinning slot machine wheels. This bug causes the line on the very first and last row of the screen (which should be the darkest) to be full brightness.

In the file Slot.cpp (inside of the ZIP archive in App/M5StickC_Slot/), line 154 should look like this:

for (int i = 0; i < shadowHeight; i++) {

Currently this for loop starts with "int i = 1", which causes the darkest line of the shadow to have an undefined brightness value.

Gitshaoxiang commented 3 years ago

thank you feedback. now it fixed.

https://github.com/m5stack/M5-ProductExampleCodes/tree/master/App/M5StickC_Slot