mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-11 00:59:28 +00:00
stopwatch opt (#2578)
* stopwatch opt * comments * format * fxi ms display when user tune display level
This commit is contained in:
committed by
GitHub
parent
4ecc9d04fe
commit
0ce6ea8318
+17
-6
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright 2025 Mark Thompson
|
||||
* copyleft Mr. Robot of F.Society
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
@@ -39,25 +40,35 @@ class StopwatchView : public View {
|
||||
void stop();
|
||||
void reset();
|
||||
void lap();
|
||||
void cover_display_area_with_0();
|
||||
void refresh_painting();
|
||||
void resume_last();
|
||||
void clean_ms_display(uint8_t level = 0);
|
||||
|
||||
bool running{false};
|
||||
bool paused{false};
|
||||
long long start_time{0};
|
||||
long long end_time{0};
|
||||
long long lap_time{0};
|
||||
long long previously_elapsed{0};
|
||||
uint8_t last_displayed[7] = {0, 0, 0, 0, 0, 0, 0};
|
||||
/* m m s s ms ms ms*/
|
||||
uint8_t lap_last_displayed[7] = {0, 0, 0, 0, 0, 0, 0};
|
||||
/* m m s s ms ms ms*/
|
||||
|
||||
Labels labels{
|
||||
{{0 * 8, 1 * 16}, "TOTAL:", Theme::getInstance()->fg_light->foreground},
|
||||
{{0 * 8, 7 * 16}, "LAP:", Theme::getInstance()->fg_light->foreground},
|
||||
};
|
||||
|
||||
BigFrequency big_display{
|
||||
{4, 2 * 16 + 4, 28 * 8, 52},
|
||||
0};
|
||||
OptionsField options_ms_display_level{
|
||||
{4 * 8 * 4 + 7 * 8 + 4, 2 * 16},
|
||||
5,
|
||||
{{"& - -", 0},
|
||||
{"& & -", 1},
|
||||
{"& & &", 2}}};
|
||||
|
||||
BigFrequency lap_display{
|
||||
{4, 8 * 16 + 4, 28 * 8, 52},
|
||||
0};
|
||||
Painter painter;
|
||||
|
||||
Button button_run_stop{
|
||||
{72, 210, 96, 24},
|
||||
|
||||
Reference in New Issue
Block a user