Skip to content

Commit

Permalink
Invert screen shot saved on radio for OLED screens.
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz committed Apr 28, 2024
1 parent e3b56b7 commit 3723a59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions radio/src/gui/screenshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ const char * writeScreenshot()
for (int y=LCD_H-1; y>=0; y-=1) {
for (int x=0; x<8*((LCD_W+7)/8); x+=2) {
pixel_t byte = getPixel(x+1, y) + (getPixel(x, y) << 4);
#if defined(OLED_SCREEN)
byte ^= 0xFF;
#endif
if (f_write(&bmpFile, &byte, 1, &written) != FR_OK || written != 1) {
f_close(&bmpFile);
return SDCARD_ERROR(result);
Expand Down

0 comments on commit 3723a59

Please sign in to comment.