badgeteam / ESP32-platform-firmware

Universal badge platform for ESP32 based devices! Runs on the event badges from SHA2017, HackerHotel 2019, Disobey 2019, CampZone 2019, Disobey 2020 and more!
https://badge.team
39 stars 41 forks source link

Fix implementation of Python framebuffer module function drawRaw #221

Closed renzenicolai closed 4 years ago

renzenicolai commented 4 years ago

This patch fixes the argument and buffer handling for drawRaw so that it properly accepts buffers with 3 bytes per pixel (rgb24) data for both situations in which the function can be used (with a window and without).

MaxWinsemius commented 4 years ago

On line 162, the first 8 bits are not assigned to 32-bit variable value. Wouldn't this cause issues with the alpha-value when you have a 32BPP badge?

renzenicolai commented 4 years ago

Nah, alpha values are not used at the moment and the only reason we have an 32-bit color depth is because of the "weird" way the cz19 driver works (I didn't want to rewrite the compositor thing that the cz19 badge has so I instead made a bit of a compatibility thing in the framebuffer driver instead).