mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 23:09:26 -05:00
Hide the seconds at the beginning
This commit is contained in:
parent
004fddf4de
commit
8251cf7dbb
@ -418,7 +418,16 @@ void LiveDateTime::on_tick_second() {
|
|||||||
text = text + to_string_dec_uint(datetime.hour(), 2, '0') + ":" + to_string_dec_uint(datetime.minute(), 2, '0');
|
text = text + to_string_dec_uint(datetime.hour(), 2, '0') + ":" + to_string_dec_uint(datetime.minute(), 2, '0');
|
||||||
|
|
||||||
if(seconds_enabled){
|
if(seconds_enabled){
|
||||||
text = text + ":" + to_string_dec_uint(datetime.second(), 2, '0');
|
text += ":";
|
||||||
|
|
||||||
|
if(init_delay==0)
|
||||||
|
text += to_string_dec_uint(datetime.second(), 2, '0');
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Placeholder while the seconds are not updated
|
||||||
|
text += "XX";
|
||||||
|
init_delay--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
set_dirty();
|
set_dirty();
|
||||||
}
|
}
|
||||||
@ -640,7 +649,8 @@ void Console::write(std::string message) {
|
|||||||
|
|
||||||
void Console::writeln(std::string message) {
|
void Console::writeln(std::string message) {
|
||||||
write(message);
|
write(message);
|
||||||
crlf();
|
//crlf();
|
||||||
|
write("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Console::paint(Painter&) {
|
void Console::paint(Painter&) {
|
||||||
|
@ -254,6 +254,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
void on_tick_second();
|
void on_tick_second();
|
||||||
|
|
||||||
|
uint16_t init_delay = 4;
|
||||||
bool date_enabled = true;
|
bool date_enabled = true;
|
||||||
bool seconds_enabled = false;
|
bool seconds_enabled = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user