Bsongis/horus flash external device (#4446)

* CMake options changed to UNEXPECTED_SHUTDOWN=YES/NO and  PWR_BUTTON=PRESS/SWITCH

* [X12S / X10] Flash an external device is now OK
This commit is contained in:
Bertrand Songis
2017-02-12 21:04:46 +01:00
committed by Andre Bernet
parent 808d7749c7
commit b9bb831b7f
25 changed files with 107 additions and 158 deletions
+6 -8
View File
@@ -232,22 +232,20 @@ void drawStatusLine()
}
#endif
void drawProgressBar(const char * label)
void drawProgressBar(const char * label, int num, int den)
{
lcdDrawTextAlignedLeft(4*FH, label);
lcdClear();
if (label) {
lcdDrawTextAlignedLeft(4*FH, label);
}
lcdDrawRect(4, 6*FH+4, LCD_W-8, 7);
lcdRefresh();
}
void updateProgressBar(int num, int den)
{
if (num > 0 && den > 0) {
int width = ((LCD_W-12)*num)/den;
lcdDrawSolidHorizontalLine(6, 6*FH+6, width, FORCE);
lcdDrawSolidHorizontalLine(6, 6*FH+7, width, FORCE);
lcdDrawSolidHorizontalLine(6, 6*FH+8, width, FORCE);
lcdRefresh();
}
lcdRefresh();
}
#if defined(CPUARM) || defined(CPUM2560)