fix display of power light

This commit is contained in:
Christopher Mosher 2013-12-19 21:59:48 -05:00
parent de4c188c1a
commit eb2cc561d6

View File

@ -251,7 +251,7 @@ void ScreenImage::displayHz(int hz) {
void ScreenImage::drawPower(bool on) { void ScreenImage::drawPower(bool on) {
unsigned int* pn = this->pixels; unsigned int* pn = this->pixels;
pn += (HEIGHT + 5)*(this->screen_pitch / 4) + 5; pn += (HEIGHT + 5)*SCRW + 5;
for (int r = 0; r < POWERD; ++r) { for (int r = 0; r < POWERD; ++r) {
if (r < LABEL_Y || LABEL_Y + 7 <= r) { if (r < LABEL_Y || LABEL_Y + 7 <= r) {
for (int c = 0; c < POWERD; ++c) { for (int c = 0; c < POWERD; ++c) {
@ -276,7 +276,7 @@ void ScreenImage::drawPower(bool on) {
} }
} }
pn -= POWERD; pn -= POWERD;
pn += this->screen_pitch / 4; pn += SCRW;
} }
notifyObservers(); notifyObservers();
} }