Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion DMDFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,18 @@ void DMDFrame::setPixel(unsigned int x, unsigned int y, DMDGraphicsMode mode)
{
if(x >= width || y >= height)
return;

//karo flip begin
if((height/PANEL_HEIGHT > 1) && boolFlipPanels){
bool boolpar = ((height/PANEL_HEIGHT) % 2 == 0) ? true:false;
int delY = y/PANEL_HEIGHT;
int zvi = y % PANEL_HEIGHT;
if ((delY % 2 == 0)&& boolpar || (delY % 2 != 0)&& !boolpar ){
zvi = PANEL_HEIGHT-1 - zvi;
y = (PANEL_HEIGHT*delY)+zvi;
x = width-1 - x;
}
}
//karo flip end
int byte_idx = pixelToBitmapIndex(x,y);
uint8_t bit = pixelToBitmask(x);
switch(mode) {
Expand Down