Apparently, it can happen that the default cylinder is not set
even though same_string(prefs.default_cylinder, "") is false.
Then we fall back to the 11.1l air cylinder.
This should silence a warnign about "Too many gases".
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Admittedly, imperial tank sizes are a bit weird.
But it must have taken some effort to break things as creatievly as Suunto did.
The UI allows only multiples of 100psi and multiples of 10cuft. Which shows
that the developers have no idea what typical imperial tanks look like. AL72?
AL63? HP tanks at 3440psi? LP+ at 2640psi?
Yeah, I get it - you had no idea, someone showed you an AL80 and you made silly
assumptions.
But even then, what the heck are you storing in your data, dear Suunto? The
pressures are off by the very logical factor of 1.00069182389937. And then
regardless whether I use the wrong pressure or the corrected pressure, the wet
sizes are too small by a non-constant factor.
So this code takes the junk that libdivecomputer truthfully passes through from
the Suunto parser and tries to convert it into something that matches what the
user most likely entered in the EON Steel UI. Ugly. Stupid. But it seems to
work.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Adding { } to if clause to avoid dangling warning
/Users/guidolerch/src/subsurface/qt-models/cylindermodel.cpp:117:
warning: add explicit braces to avoid dangling else [-Wdangling-else]
[Dirk Hohndel: combined two of Guido's patches to one that is simpler]
Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This just fixes an annoying warning that freediving wasn't covered in the
switch statement.
Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fixing a bug preventing to download files on Ubuntu.
On Ubuntu some files are recognized as DIR and not as regular files.
This is a fix that works but most lilely does not address
the root cause which would need an expert to look at..
Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Updated packages required to build on Fedora
[Dirk Hohndel: dropped part already fixed earler]
Signed-off-by: Steve Williams <stevewilliams@internode.on.net>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
void DivePlannerPointsModel::setupCylinders() in diveplannermodel.cpp
handles setting up cylinders for the planner. If there is a current
dive, cylinders form that dive are copied. Otherwise the default
cylinder is added and lacking that a standard size cylinder.
If the current dive does not have any cylinders, we could end up
without cylinders. This patch adds a test for this case and delegates
to the other two sources of a cylinder in that case.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When there is only one gasmix in the list we should show the icon that tells the
user that they can't remove the last gasmix from the list.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
1) Delete duplicate or unused images in Documentation/images directory
2) Add text to describe user manual viewer functionality
3) Add image to explain 2) above
4) Add text to explanation of TTS toolbar button (Thank you very much, Davide!)
5) Update image showing display of TTS toolbar button
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
whitespace.pl can now do a better job (although surely
still not 100% perfect job) of formatting constructor
member initialization lists according to the rules
described in the current CodingStyle file.
Signed-off-by: K. Heller <pestophagous@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The use of ForEachMacros is working as expected when
used with clang-format version 3.5.0-10.
Also add ConstructorInitializerIndentWidth: 8, which
slightly helps with ctor style, but still does not
enforce the full subsurface ctor guidelines.
Signed-off-by: K. Heller <pestophagous@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
No changes were made to the values of the entries.
Sorting makes it easier for a clang-format n00b to
compare each setting to its documentation on the
http://clang.llvm.org/docs/ClangFormatStyleOptions.html
web page.
Signed-off-by: K. Heller <pestophagous@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This includes my attempts to address the issues raised by the translation
checker script.
It also fixes the crash with the planner on Windows which was caused by
a faulty translation that replaced a '%' with a '$' in the format string.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This script can be called on translations files, e.g.
> scripts/checktranslation.pl translations/*ts
and will report if the number of % signs in source and translation
differ.
It finds quite a few issues that need to be investigated.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Many time stats in maintab display also seconds in short freediving
Signed-off-by: Giorgio Marzano <marzano.giorgio@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit adds a path to the executable file based on the `build.sh` installation instructions.
Signed-off-by: Ash Kamel <ajkamel@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
alongside Petrell 2 since this seems to be the same computer internally.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Awesome diving location does not rhyme with small Internet latency.
Signed-off-by: Gaetan Bisson <bisson@archlinux.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This allows us to support the Suunto EON Steel on Mac, assuming the matching
libdivecomputer version from the Subsurface-branch. If that was compiled with
the hdiapi lib then hopefully the build for Subsurface should find that library
as well.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Bundled templates can no longer be edited, because
copies are made in the user directory. The TemplateEdit
special case warning is no longer relevant so it can
be removed.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds couple of helpers to retrieve the template path in
the application bundle (getPrintingTemplatePathBundle())
and the template path in the user directory
(getPrintingTemplatePathUser()).
Once the print dialog is initiated for the first time the contents
of the bundled template path are copied to the user template path
using copyPath(). No overwriting of files will occur.
The PrintOptions and TemplateLayout classes then only use
the user path for retrieving templates.
Fixes an issue where the bundled templates can be locked as read-only
on OSX and Linux.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Without this, when loading from git, the pictures are added
without hashes.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
[Dirk Hohndel: also update the html git version]
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Expose subsurface_mkdir() in qthelper.h as main.cpp already
includes it. Once 'default_directory' is obtained call
subsurface_mkdir() on it. subsurface_mkdir() will not throw an
error if the directory exists according to the QDir documentation.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Otherwise you could end up in a situation where the data file is always
marked as changed when opened (for example if your data file references a
picture that doesn't exist at that path and can't be found, either).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I'm not sure if this could ever turn into an issue on Windows - but on
Linux and Mac this is an easy and safe thing to do and it avoids a
situation where we try to save the picture hashes without having this
directory.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Some Linux distributions have compiler settings that cause calls to the
printf family of functions to fail if they have just one argument and that
argument isn't a literal string.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
1) Run a spell checker through the user manual. Only three
outright typos found!!
2) Correct sentence about reverse name lookup that results in
dive site name reported in tags field, not in Location field.
(Sergey, thank you!)
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>