Otherwise some artefacts of the last dive / dive site that where shown can
remain visible even after the dive data was closed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Right now this is quite ugly. And at least in my VM the transparency
doesn't seem to work correctly. But at least we now have some visual
indication that we are doing something while opening or saving cloud
storage.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This removes the excessive amount of parameters on manual CSV import. We
just use appropriate string array than can be directly fed to XSLT
parsing.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add more VPM-B planner tests. The "expected" total run time is taken as the
total run time produced by the Fortran VPM-B program. For all these tests, the
results are within two minutes, which is a good result, but most are classified
as a "fail".
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds a test for 100 m for 60 min dive on trimix using VPM-B
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Adding Linus' instructions for udev rule to our FAQ. Product ID 0031
that is used for firmware updates is not included here, as it is
probably not commonly needed.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- We add a dive while offline.
- On a different computer (here simulated by a different local cache) we
add a different file.
- Now we go back to the previous local cache (the one where we added a
different dive in the first step) and take that online (i.e., connect to
cloud storage). Now both of the new dives should have been added to our
data file.
This is a rather trivial test with no conflict and a straight forward
merge. We need to add a lot more test cases to make sure this works as
expected and doesn't leave the user with a corrupt state.
Ideally whatever happens, the user should never see an error...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
All this really does is make sure that the fast forward works if the local
cache has received updates that haven't made it to the server, yet.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We shouldn't always tell the user about the perceived validity of the
cloud certificate - we force it anyway.
But it's nice to be easily able to see if we tried to update the remote,
so add another debug output when run with -v
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This makes it much easier to compare XML files written by Subsurface.
The order of the dive_site_table depended on the order in which they were
encountered. This makes it easier to eye-ball changes in XML files. And
allows the GitStorage test to pass.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Having random uuids seemed like a good idea, but there are several
situations where they really cause problems. One is merging dive file
imports from V2 logfiles. Another is testing such imports.
Instead of making the uuid random we now hash the name and add the
timestamp of the first dive associated with this dive site to the hash
(first in this context is "first encountered" with no guarantee that it is
the chronologically first). This way V2 imports create deterministic uuids
but uuid conflicts are still extremely unlikely, even if the user has
multiple dive sites with the same name.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This just makes sure that writing data to git storage and reading it back
gives you the same result. Without the fixed generation of initial dive
site UUIDs this fails.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This seems to do the right thing in several cases that I tested, but I'm
worried if it might end up causing us data loss in other cases. This needs
a TON of testing.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Because of the structure of some of our files git too easily assumed that
they were renames and that confused the merge algorithm.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Otherwise, the results of the calculations tend to be rather
random and irreproducible...
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
this does not increas binary size increadably but is usefull
when trying to figure out what the planner is doing.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This uses a bit of algebra to simplify the formula for Boyle's law
correction and introduces another algebraic cubic root solver that
can also deal with negative discriminants thanks to a trigonometric
formula from Wikipedia.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The Boyle's law compensation depends on first_stop_pressure. To produce
profiles similar to other VPM-B implementations, we should calculate it as the
ceiling before starting the ascent.
Commit 159c9eb2c1, Compare ceiling to next stop
rather than try to ascent for VPM-B, changed (VPM-B) to consider the current
ceiling rather than an incremental ascent between one stop level and the next.
However, the initial ascent generally steps through several stop levels, so
first_stop_pressure was still not calculated as the ceiling prior to commencing
the calculated ascent.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Gas switch is not part of recreational mode, so disable the switch options.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In many cases Subsurface will do something "reasonable" if we have
conflicting edits and then try to merge. GIT_MERGE_FILE_FAVOR_UNION means
that both edits will be added to the final file and then Subsurface should
quietly take one or the other - this will need quite a bit of testing.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We still punt if there are any conflicts (which are likely to occur if we
have touched dive sites in both changes). But in my testing at least for
fairly simple, non-conflicting changes this works and creates a correctly
merged tree.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
std::ceil() in printer.cpp throws errors when compiled with mingw, so
replace all std::ceil calls with qCeil().
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Editing statistics templates is not supported now, as there is no
custom template for statistics printing, so disable the template
edit area.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
The new statistics code, enable the editing of colors, font, and other
template options.
This patch enables the UI elements for these features.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
- use the same generic code for both types of templates
- check for the printing type before generating the template
- remove unused printStatistics() method
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Add a statistics template to the templates directory.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
As there are two types of templates, Grantlee need to support both.
This commit adds the support to generating a statistics HTML code from
a statistics template.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Add a YearInfo class which represents a year statistics. Export the
class to the Grantlee backend, also export all it's members to the
printing backend.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Show the existing templates based on the print type selected
by the user.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Now there are two types of templates, dive list and statistics.
We need to support reading both types of templates.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Preview output should be identical to the actual printing code, so
call the flow rendering method for all flow templates.
Also don't create new pages while rendering a one page preview, just
exit after the first page is full.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
In flow rendering the border width is not initialized which causes
huge borders that blocks the page while previewing.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>