Unhate Sec by following the new global config framework
This commit is contained in:
parent
c95eb0844f
commit
91ed6e7ba2
|
@ -92,15 +92,15 @@ public:
|
||||||
pixmap.setPixel(1,1,(QColor(backlight,backlight,backlight).rgb()));
|
pixmap.setPixel(1,1,(QColor(backlight,backlight,backlight).rgb()));
|
||||||
pixmap.fill(pixmap.pixel(1,1));
|
pixmap.fill(pixmap.pixel(1,1));
|
||||||
|
|
||||||
|
const int pixelOn=GLOBAL(lcdinvert)?colorInvertedPixelOn:colorPixelOn;
|
||||||
|
const int pixelOff=GLOBAL(lcdinvert)?colorInvertedPixelOff:colorPixelOff;
|
||||||
|
|
||||||
// draw lcd array
|
// draw lcd array
|
||||||
for (int x = 0; x < dimx; ++x) {
|
for (int x = 0; x < dimx; ++x) {
|
||||||
for(int y=0; y<dimy; ++y) {
|
for(int y=0; y<dimy; ++y) {
|
||||||
int color;
|
int color;
|
||||||
if(globalconfig.lcdstate & LCD_INVERTED) {
|
color=lcdGetPixel((GLOBAL(lcdmirror) /* LCD_MIRRORX */ )?(RESX-x-1):x,( 1 /* LCD_MIRRORY */)?(RESY-y-1):y)?colorInvertedPixelOn:colorInvertedPixelOff;
|
||||||
color=lcdGetPixel((globalconfig.lcdstate & LCD_MIRRORX)?(RESX-x-1):x,(globalconfig.lcdstate & LCD_MIRRORY)?(RESY-y-1):y)?colorInvertedPixelOn:colorInvertedPixelOff;
|
|
||||||
} else {
|
|
||||||
color=lcdGetPixel((globalconfig.lcdstate & LCD_MIRRORX)?(RESX-x-1):x,(globalconfig.lcdstate & LCD_MIRRORY)?(RESY-y-1):y)?colorPixelOn:colorPixelOff;
|
|
||||||
}
|
|
||||||
for(int minix=0; minix<pixw; ++minix) {
|
for(int minix=0; minix<pixw; ++minix) {
|
||||||
for(int miniy=0; miniy<pixh; ++miniy) {
|
for(int miniy=0; miniy<pixh; ++miniy) {
|
||||||
pixmap.setPixel(x*rasterx+minix,ledsize+ledsep+y*rastery+miniy,color);
|
pixmap.setPixel(x*rasterx+minix,ledsize+ledsep+y*rastery+miniy,color);
|
||||||
|
|
|
@ -6,13 +6,12 @@
|
||||||
|
|
||||||
void simlcdDisplayUpdate() {
|
void simlcdDisplayUpdate() {
|
||||||
write(1,"\033[H",3);
|
write(1,"\033[H",3);
|
||||||
|
const char* symbolOff=GLOBAL(lcdinvert)?"_":"@";
|
||||||
|
const char* symbolOn=GLOBAL(lcdinvert)?"#":".";
|
||||||
|
|
||||||
for(int y=0; y<RESY; ++y) {
|
for(int y=0; y<RESY; ++y) {
|
||||||
for(int x=0; x<RESX; ++x) {
|
for(int x=0; x<RESX; ++x) {
|
||||||
if(globalconfig.lcdstate & LCD_INVERTED) {
|
write(1,(lcdGetPixel((GLOBAL(lcdmirror) /* LCD_MIRRORX */ )?(RESX-x-1):x,(1 /* & LCD_MIRRORY */)?(RESY-y-1):y)?symbolOn:symbolOff),1);
|
||||||
write(1,(lcdGetPixel((globalconfig.lcdstate & LCD_MIRRORX)?(RESX-x-1):x,(globalconfig.lcdstate & LCD_MIRRORY)?(RESY-y-1):y)?"#":"_"),1);
|
|
||||||
} else {
|
|
||||||
write(1,(lcdGetPixel((globalconfig.lcdstate & LCD_MIRRORX)?(RESX-x-1):x,(globalconfig.lcdstate & LCD_MIRRORY)?(RESY-y-1):y)?".":"@"),1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
write(1,("\n"),1);
|
write(1,("\n"),1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue