v2.6.1: Fix "highest flight today" layout collision on Statistics screen
The v2.6.0 addition was drawn as a single line that could overflow and collide with the "Reset logbook data" button. It now uses the same two-line drawStatRow() layout (label + value) as the other stats, with all row Y positions shifted up slightly to make room, and the i18n strings dropped their now-redundant ": " suffix since drawStatRow() renders label and value on separate lines. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -117,7 +117,7 @@ static const char* const I18N_DE[] = {
|
|||||||
"Nochmal tippen zum Bestätigen!",
|
"Nochmal tippen zum Bestätigen!",
|
||||||
"Flugbuch-Daten zurückgesetzt.",
|
"Flugbuch-Daten zurückgesetzt.",
|
||||||
"Laufzeit: ",
|
"Laufzeit: ",
|
||||||
"Höchster Flug heute: ",
|
"Höchster Flug heute",
|
||||||
"Verlauf (letzte 7 Tage)",
|
"Verlauf (letzte 7 Tage)",
|
||||||
"Noch keine Flugbuch-Einträge.",
|
"Noch keine Flugbuch-Einträge.",
|
||||||
"Wie der Verlauf funktioniert",
|
"Wie der Verlauf funktioniert",
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ static const char* const I18N_EN[] = {
|
|||||||
"Tap again to confirm!",
|
"Tap again to confirm!",
|
||||||
"Logbook data reset.",
|
"Logbook data reset.",
|
||||||
"Uptime: ",
|
"Uptime: ",
|
||||||
"Highest flight today: ",
|
"Highest flight today",
|
||||||
"History (last 7 days)",
|
"History (last 7 days)",
|
||||||
"No logbook entries yet.",
|
"No logbook entries yet.",
|
||||||
"How the history chart works",
|
"How the history chart works",
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ static const char* const I18N_ES[] = {
|
|||||||
"¡Toque de nuevo para confirmar!",
|
"¡Toque de nuevo para confirmar!",
|
||||||
"Registro reiniciado.",
|
"Registro reiniciado.",
|
||||||
"Tiempo activo: ",
|
"Tiempo activo: ",
|
||||||
"Vuelo más alto hoy: ",
|
"Vuelo más alto hoy",
|
||||||
"Historial (últimos 7 días)",
|
"Historial (últimos 7 días)",
|
||||||
"Aún no hay registros.",
|
"Aún no hay registros.",
|
||||||
"Cómo funciona el historial",
|
"Cómo funciona el historial",
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ static const char* const I18N_FR[] = {
|
|||||||
"Retouchez pour confirmer !",
|
"Retouchez pour confirmer !",
|
||||||
"Journal réinitialisé.",
|
"Journal réinitialisé.",
|
||||||
"Durée de fonctionnement : ",
|
"Durée de fonctionnement : ",
|
||||||
"Vol le plus haut aujourd'hui : ",
|
"Vol le plus haut aujourd'hui",
|
||||||
"Historique (7 derniers jours)",
|
"Historique (7 derniers jours)",
|
||||||
"Aucune entrée pour le moment.",
|
"Aucune entrée pour le moment.",
|
||||||
"Comment fonctionne l'historique",
|
"Comment fonctionne l'historique",
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ static const char* const I18N_IT[] = {
|
|||||||
"Tocca di nuovo per confermare!",
|
"Tocca di nuovo per confermare!",
|
||||||
"Registro reimpostato.",
|
"Registro reimpostato.",
|
||||||
"Tempo di attività: ",
|
"Tempo di attività: ",
|
||||||
"Volo più alto oggi: ",
|
"Volo più alto oggi",
|
||||||
"Cronologia (ultimi 7 giorni)",
|
"Cronologia (ultimi 7 giorni)",
|
||||||
"Ancora nessun dato.",
|
"Ancora nessun dato.",
|
||||||
"Come funziona la cronologia",
|
"Come funziona la cronologia",
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ static const char* const I18N_TR[] = {
|
|||||||
"Onaylamak için tekrar dokunun!",
|
"Onaylamak için tekrar dokunun!",
|
||||||
"Kayıt defteri sıfırlandı.",
|
"Kayıt defteri sıfırlandı.",
|
||||||
"Çalışma süresi: ",
|
"Çalışma süresi: ",
|
||||||
"Bugünkü en yüksek uçuş: ",
|
"Bugünkü en yüksek uçuş",
|
||||||
"Geçmiş (son 7 gün)",
|
"Geçmiş (son 7 gün)",
|
||||||
"Henüz kayıt yok.",
|
"Henüz kayıt yok.",
|
||||||
"Geçmiş grafiği nasıl çalışır",
|
"Geçmiş grafiği nasıl çalışır",
|
||||||
|
|||||||
@@ -36,12 +36,12 @@ namespace {
|
|||||||
|
|
||||||
constexpr uint32_t CONFIRM_WINDOW_MS = 4000;
|
constexpr uint32_t CONFIRM_WINDOW_MS = 4000;
|
||||||
|
|
||||||
constexpr int16_t ROW1_Y = 40;
|
constexpr int16_t ROW1_Y = 38;
|
||||||
constexpr int16_t ROW2_Y = 76;
|
constexpr int16_t ROW2_Y = 72;
|
||||||
constexpr int16_t ROW3_Y = 112;
|
constexpr int16_t ROW3_Y = 106;
|
||||||
constexpr int16_t ROW4_Y = 148;
|
constexpr int16_t ROW4_Y = 140;
|
||||||
constexpr int16_t UPTIME_Y = 184;
|
constexpr int16_t UPTIME_Y = 174;
|
||||||
constexpr int16_t TOP_ALT_Y = 204; // "Hoechster Flug heute" - einzeilig, daher naeher an UPTIME als die anderen Rows
|
constexpr int16_t TOP_ALT_Y = 194; // zweizeilig wie drawStatRow (Label + Wert)
|
||||||
}
|
}
|
||||||
|
|
||||||
void run(TFT_eSPI& tft) {
|
void run(TFT_eSPI& tft) {
|
||||||
@@ -100,8 +100,7 @@ void run(TFT_eSPI& tft) {
|
|||||||
String csign = topAlt.callsign[0] ? String(topAlt.callsign) : "?";
|
String csign = topAlt.callsign[0] ? String(topAlt.callsign) : "?";
|
||||||
char altBuf[24];
|
char altBuf[24];
|
||||||
snprintf(altBuf, sizeof(altBuf), "%s (%ld ft)", csign.c_str(), (long)topAlt.altitudeFt);
|
snprintf(altBuf, sizeof(altBuf), "%s (%ld ft)", csign.c_str(), (long)topAlt.altitudeFt);
|
||||||
tft.setCursor(10, TOP_ALT_Y);
|
drawStatRow(tft, TOP_ALT_Y, I18n::t(StringId::STATS_TOP_ALTITUDE_PREFIX), String(altBuf));
|
||||||
tft.print(String(I18n::t(StringId::STATS_TOP_ALTITUDE_PREFIX)) + altBuf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (confirmPending) {
|
if (confirmPending) {
|
||||||
|
|||||||
Reference in New Issue
Block a user