cosmetics

This commit is contained in:
Raphael Coeffic
2019-08-17 10:37:06 +02:00
parent 83efad8f43
commit 5de3632ea1
5 changed files with 22 additions and 10 deletions
+4 -2
View File
@@ -30,7 +30,8 @@ const unsigned char bmp_sleep[] = {
void drawStartupAnimation(uint32_t duration, uint32_t totalDuration)
{
if (totalDuration == 0) return;
if (totalDuration == 0)
return;
uint8_t index = limit<uint8_t>(0, duration / (totalDuration / 5), 4);
@@ -49,7 +50,8 @@ void drawStartupAnimation(uint32_t duration, uint32_t totalDuration)
void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char * message)
{
if (totalDuration == 0) return;
if (totalDuration == 0)
return;
uint8_t index = limit<uint8_t>(0, duration / (totalDuration / 5), 4);
+2 -2
View File
@@ -471,13 +471,13 @@ void menuRadioSetup(event_t event)
#endif
#if defined(PWR_BUTTON_PRESS)
case ITEM_RADIO_SETUP_PWR_ON_SPEED:
case ITEM_RADIO_SETUP_PWR_ON_SPEED:
lcdDrawTextAlignedLeft(y, STR_PWR_ON_SPEED);
lcdDrawNumber(RADIO_SETUP_2ND_COLUMN, y, g_eeGeneral.pwrOnSpeed + 1, attr|LEFT);
if (attr) CHECK_INCDEC_GENVAR(event, g_eeGeneral.pwrOnSpeed, -1, 2);
break;
case ITEM_RADIO_SETUP_PWR_OFF_SPEED:
case ITEM_RADIO_SETUP_PWR_OFF_SPEED:
lcdDrawTextAlignedLeft(y, STR_PWR_OFF_SPEED);
lcdDrawNumber(RADIO_SETUP_2ND_COLUMN, y, g_eeGeneral.pwrOffSpeed + 1, attr|LEFT);
if (attr) CHECK_INCDEC_GENVAR(event, g_eeGeneral.pwrOffSpeed, -1, 2);
+4 -2
View File
@@ -42,7 +42,8 @@ const unsigned char bmp_sleep[] = {
void drawStartupAnimation(uint32_t duration, uint32_t totalDuration)
{
if (totalDuration == 0) return;
if (totalDuration == 0)
return;
uint8_t index = limit<uint8_t>(0, duration / (totalDuration / 5), 4);
@@ -59,7 +60,8 @@ void drawStartupAnimation(uint32_t duration, uint32_t totalDuration)
void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char * message)
{
if (totalDuration == 0) return;
if (totalDuration == 0)
return;
uint8_t index = limit<uint8_t>(0, duration / (totalDuration / 4), 3);
+2 -1
View File
@@ -393,7 +393,8 @@ void drawSleepBitmap()
#define SHUTDOWN_CIRCLE_DIAMETER 150
void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char * message)
{
if (totalDuration == 0) return;
if (totalDuration == 0)
return;
static uint32_t lastDuration = 0xffffffff;
static const BitmapBuffer * shutdown = BitmapBuffer::load(getThemePath("shutdown.bmp"));