mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile/dive summary: rewrite statistics code
There were quite a few issues with the code - clearly a complete failure of code review. - all values were '??' if a period contained no dives - imperial units were not calculated at all - significant truncation and data loss in the way totals were added as meters and minutes instead of the higher precision data that is available - several issues in striing conversion methodology, e.g. missing zero padding for minutes - missing maxSac - incorrectly calculated avgSac - incorrectly claculated number of EANx dives - hard to read code with most variables named 'temp' Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a534f1a25c
commit
08e39f9d2d
3 changed files with 78 additions and 60 deletions
|
|
@ -181,7 +181,7 @@ Kirigami.ScrollablePage {
|
|||
text: Backend.diveSummaryText[19]
|
||||
}
|
||||
TemplateLabel {
|
||||
text: qsTr("avg. SAC")
|
||||
text: qsTr("max. SAC")
|
||||
font.bold: true
|
||||
}
|
||||
TemplateLabel {
|
||||
|
|
@ -190,6 +190,16 @@ Kirigami.ScrollablePage {
|
|||
TemplateLabel {
|
||||
text: Backend.diveSummaryText[21]
|
||||
}
|
||||
TemplateLabel {
|
||||
text: qsTr("avg. SAC")
|
||||
font.bold: true
|
||||
}
|
||||
TemplateLabel {
|
||||
text: Backend.diveSummaryText[22]
|
||||
}
|
||||
TemplateLabel {
|
||||
text: Backend.diveSummaryText[23]
|
||||
}
|
||||
|
||||
TemplateLabel {
|
||||
Layout.columnSpan: 3
|
||||
|
|
@ -200,10 +210,10 @@ Kirigami.ScrollablePage {
|
|||
font.bold: true
|
||||
}
|
||||
TemplateLabel {
|
||||
text: Backend.diveSummaryText[22]
|
||||
text: Backend.diveSummaryText[24]
|
||||
}
|
||||
TemplateLabel {
|
||||
text: Backend.diveSummaryText[23]
|
||||
text: Backend.diveSummaryText[25]
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue