cosmetics
This commit is contained in:
@@ -30,7 +30,8 @@ const unsigned char bmp_sleep[] = {
|
|||||||
|
|
||||||
void drawStartupAnimation(uint32_t duration, uint32_t totalDuration)
|
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);
|
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)
|
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);
|
uint8_t index = limit<uint8_t>(0, duration / (totalDuration / 5), 4);
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ const unsigned char bmp_sleep[] = {
|
|||||||
|
|
||||||
void drawStartupAnimation(uint32_t duration, uint32_t totalDuration)
|
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);
|
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)
|
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);
|
uint8_t index = limit<uint8_t>(0, duration / (totalDuration / 4), 3);
|
||||||
|
|
||||||
|
|||||||
@@ -393,7 +393,8 @@ void drawSleepBitmap()
|
|||||||
#define SHUTDOWN_CIRCLE_DIAMETER 150
|
#define SHUTDOWN_CIRCLE_DIAMETER 150
|
||||||
void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char * message)
|
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 uint32_t lastDuration = 0xffffffff;
|
||||||
static const BitmapBuffer * shutdown = BitmapBuffer::load(getThemePath("shutdown.bmp"));
|
static const BitmapBuffer * shutdown = BitmapBuffer::load(getThemePath("shutdown.bmp"));
|
||||||
|
|||||||
+10
-3
@@ -1731,8 +1731,12 @@ void copyTrimsToOffset(uint8_t ch)
|
|||||||
|
|
||||||
#if defined(STARTUP_ANIMATION)
|
#if defined(STARTUP_ANIMATION)
|
||||||
|
|
||||||
#define PWR_PRESS_DURATION_MIN() (2 - g_eeGeneral.pwrOnSpeed)
|
inline uint32_t PWR_PRESS_DURATION_MIN()
|
||||||
#define PWR_PRESS_DURATION_MAX 500 // 5s
|
{
|
||||||
|
return 2 - g_eeGeneral.pwrOnSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr uint32_t PWR_PRESS_DURATION_MAX = 500; // 5s
|
||||||
|
|
||||||
void runStartupAnimation()
|
void runStartupAnimation()
|
||||||
{
|
{
|
||||||
@@ -2028,7 +2032,10 @@ int main()
|
|||||||
#if !defined(SIMU)
|
#if !defined(SIMU)
|
||||||
#if defined(PWR_BUTTON_PRESS)
|
#if defined(PWR_BUTTON_PRESS)
|
||||||
|
|
||||||
#define PWR_PRESS_SHUTDOWN_DELAY() (2 - g_eeGeneral.pwrOffSpeed)
|
inline uint32_t PWR_PRESS_SHUTDOWN_DELAY()
|
||||||
|
{
|
||||||
|
return 2 - g_eeGeneral.pwrOffSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t pwr_press_time = 0;
|
uint32_t pwr_press_time = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user