Fix whitespace errors introduced by voltage merge
This commit is contained in:
parent
60390f1f28
commit
5a880d840a
|
@ -15,7 +15,7 @@
|
||||||
// Added graphical battery.
|
// Added graphical battery.
|
||||||
|
|
||||||
// hLine and vLine code from Juna, nougad and fu86
|
// hLine and vLine code from Juna, nougad and fu86
|
||||||
// (camp 2011, CTHN Village)
|
// (camp 2011, CTHN Village)
|
||||||
void hLine(int y, int x1, int x2, bool pixel);
|
void hLine(int y, int x1, int x2, bool pixel);
|
||||||
void vLine(int x, int y1, int y2, bool pixel);
|
void vLine(int x, int y1, int y2, bool pixel);
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ void ram(void) {
|
||||||
do{
|
do{
|
||||||
c = gpioGetValue(RB_PWR_CHRG);
|
c = gpioGetValue(RB_PWR_CHRG);
|
||||||
mv = GetVoltage();
|
mv = GetVoltage();
|
||||||
|
|
||||||
// Print state and draw battery (only if state changed).
|
// Print state and draw battery (only if state changed).
|
||||||
if(!c && old_state != 0){
|
if(!c && old_state != 0){
|
||||||
drawCommonThings(c);
|
drawCommonThings(c);
|
||||||
|
@ -83,7 +83,7 @@ void drawCommonThings(int c) {
|
||||||
lcdClear();
|
lcdClear();
|
||||||
// Print header.
|
// Print header.
|
||||||
lcdPrintln("Battery status:");
|
lcdPrintln("Battery status:");
|
||||||
|
|
||||||
// Draw battery frame.
|
// Draw battery frame.
|
||||||
hLine(23, 14, 72, true);
|
hLine(23, 14, 72, true);
|
||||||
hLine(43, 14, 72, true);
|
hLine(43, 14, 72, true);
|
||||||
|
@ -93,7 +93,7 @@ void drawCommonThings(int c) {
|
||||||
hLine(28, 72, 78, true);
|
hLine(28, 72, 78, true);
|
||||||
hLine(38, 72, 78, true);
|
hLine(38, 72, 78, true);
|
||||||
vLine(78, 28, 38, true);
|
vLine(78, 28, 38, true);
|
||||||
|
|
||||||
// Print if not charging.
|
// Print if not charging.
|
||||||
lcdSetCrsr(0, 60);
|
lcdSetCrsr(0, 60);
|
||||||
if(c){
|
if(c){
|
||||||
|
@ -116,6 +116,6 @@ void vLine(int x, int y1, int y2, bool pixel) {
|
||||||
|
|
||||||
void rectFill(int x, int y, int width, int heigth, bool pixel) {
|
void rectFill(int x, int y, int width, int heigth, bool pixel) {
|
||||||
for (int i=y; i<=y+heigth; ++i) {
|
for (int i=y; i<=y+heigth; ++i) {
|
||||||
hLine(i, x, x+width, pixel);
|
hLine(i, x, x+width, pixel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue