mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 22:58:04 +03:00
Tidy ups and makefile update
This commit is contained in:
19
ui/welcome.c
19
ui/welcome.c
@ -24,13 +24,15 @@
|
||||
#include "misc.h"
|
||||
#include "ui/helper.h"
|
||||
#include "ui/welcome.h"
|
||||
#include "ui/status.h"
|
||||
#include "version.h"
|
||||
|
||||
void UI_DisplayWelcome(void)
|
||||
{
|
||||
char WelcomeString0[16];
|
||||
char WelcomeString1[16];
|
||||
|
||||
char WelcomeString2[16];
|
||||
|
||||
memset(gStatusLine, 0, sizeof(gStatusLine));
|
||||
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
|
||||
|
||||
@ -42,6 +44,7 @@ void UI_DisplayWelcome(void)
|
||||
{
|
||||
memset(WelcomeString0, 0, sizeof(WelcomeString0));
|
||||
memset(WelcomeString1, 0, sizeof(WelcomeString1));
|
||||
memset(WelcomeString2, 0, sizeof(WelcomeString2));
|
||||
|
||||
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_VOLTAGE)
|
||||
{
|
||||
@ -54,6 +57,10 @@ void UI_DisplayWelcome(void)
|
||||
gBatteryVoltageAverage / 100,
|
||||
gBatteryVoltageAverage % 100,
|
||||
(100 * (volts - gMin_bat_v)) / (gMax_bat_v - gMin_bat_v));
|
||||
|
||||
#if 0
|
||||
sprintf(WelcomeString2, "Current %u", gBatteryCurrent); // needs scaling into mA
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -63,9 +70,17 @@ void UI_DisplayWelcome(void)
|
||||
|
||||
UI_PrintString(WelcomeString0, 0, 127, 0, 10);
|
||||
UI_PrintString(WelcomeString1, 0, 127, 2, 10);
|
||||
#if 0
|
||||
UI_PrintStringSmall(WelcomeString2, 0, 127, 4);
|
||||
#endif
|
||||
UI_PrintString(Version, 0, 127, 5, 10);
|
||||
|
||||
ST7565_BlitStatusLine();
|
||||
#if 1
|
||||
ST7565_BlitStatusLine(); // blank status line
|
||||
#else
|
||||
UI_DisplayStatus(true); // show all status line symbols (test)
|
||||
#endif
|
||||
|
||||
ST7565_BlitFullScreen();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user