aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-06-21QML UI: DiveList: fix position of delete buttonGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21QML UI: DiveList: turn the color blob into a thin lineGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21QML UI: make title bar taller again on AndroidGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21QML UI: DiveList distinguish trip and selected diveGravatar Dirk Hohndel
Making the selected dive's background less opaque prevents confusion. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: use Android palette colorsGravatar Dirk Hohndel
These were picked from https://material.io/guidelines/style/color.html#color-color-system One could argue that we should use different colors for iOS. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: remove files we no longer useGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveList: playing with different colorsGravatar Dirk Hohndel
Make the accent color much lighter, don't have a solid bar on the left for dives that are part of a trip. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: disable the MouseAreaGravatar Dirk Hohndel
Visible doesn't even make sense... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveDetailsView add button for mapGravatar Dirk Hohndel
Implementing another suggestion from Davide. A button to get the map (as well as just tapping on the location name). Fixes #431 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveDetailsView: make key dive info consistent with dive listGravatar Dirk Hohndel
Remove the grid layout and replace it with code that is derived from the delegate that we use in the dive list. In order to look proportional I ended up using a larger font for the location and therefore decided to allow that text to wrap instead of forcing single line. This implements a good chunk of another one of Davide's great suggestions. See #431 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveDetailsView: make the lower section less busyGravatar Dirk Hohndel
This removes fairly redundant text (yes, we know those are the Dive Details) and makes the label for the Notes consistent with all the other labels. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveDetailsView: move profile into bottom layoutGravatar Dirk Hohndel
Then we can remove the main layout and create a similar look as we now have in the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveDetailsView: don't underline locationGravatar Dirk Hohndel
Davide points out that this is not a commonly understood way in an app to indicate that a text is also a link. So let's just remove that (but tapping on the location will still work to get you to the map if there is GPS information available). See #431 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: log the font in useGravatar Dirk Hohndel
This shows that we are, indeed, using Roboto on Android. Which means I can close the first of Davide's design issues: Fixes #427 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveList: some fine tuning of sizes and spacingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveList: remove space below trip headingGravatar Dirk Hohndel
That made sense before we had the shaded background, now it just looks terrible. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveList: don't show empty trip heading for dives without tripGravatar Dirk Hohndel
We need to hide the left bar and background rectangle as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveList: show left bar on dives that are part of a tripGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveList: add blue bar on the left to trip headingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: re-indent DiveList codeGravatar Dirk Hohndel
No actual changes besides whitespace. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveList: add background color to trip headingGravatar Dirk Hohndel
In order to make it easier to see the changes, the code hasn't been re-indented. This will be in the next commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: turn DiveList heading into labelGravatar Dirk Hohndel
This way it will render in the same font as the location of a dive. This will look like crap until the next commit adds a rectangle with color around it, but this way it's much easier to see the individual changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-18QML UI: make the dive list heading slightly smallerGravatar Dirk Hohndel
Again, the goal is to make this list look better and be more space efficient. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-18QML UI: use the short date formatGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-18QML UI: less whitespace around dive list entriesGravatar Dirk Hohndel
This way we get to show a few more dives per screen. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-18QML UI: improve the dive list layoutGravatar Dirk Hohndel
Based on Davide's ideas, but with a few tweaks: I really like the dive number on the far right; that gives a clean consistent look. I tried it with date on the left and depth/duration in the middle and liked the result. This doesn't change the font, just addresses the layout and bold heading vs smaller sub-heading. See #427 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-18Desktop UI: reset cloud storage progress 'percentage'Gravatar Dirk Hohndel
The fake percentage needs to at least start at 0 for every cloud interaction. Yes, the file global variable is ugly. So sue me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-18Clean up git storage update messagesGravatar Dirk Hohndel
Translate all of them, but also remove some redundant or possibly misleading messages. These are now seen by users, not just developers trying to debug the code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-17QML UI: show debug output in the App LogGravatar Dirk Hohndel
We have unified the debug output to the console and to the App Log, let's use it consistently everywhere. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-17QML UI: redesign the user notificationGravatar Dirk Hohndel
The old system of cloud access updates with fake percentages just wasn't helpful. Even worse, it hid a lot important information from the user. This should be more useful (but it will require that we localize the messages sent from the git progress notifications and make them more 'user ready'). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-17Set default cloud timeout to ten seconds for mobile appGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-17QML UI: explicitly reference parent idGravatar Dirk Hohndel
Otherwise we get an odd 'TypeError: Cannot read property of null' error message. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-16QML UI: better App LogGravatar Dirk Hohndel
This should actually scroll and be much simple. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-16QML UI: clear the previous list when downloadingGravatar Dirk Hohndel
When you start a new session with Download from DC, clear out the table from the last attempt before adding the page. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-15tankinfomodel.cpp: clamp row index to [0 - MAX_TANK_INFO]Gravatar Lubomir I. Ivanov
MAX_TANK_INFO is a new macro in dive.h to define the maximum number of tank_info_t objects. TankInfoModel's data() and setData() now check for valid row indexes before accessing the tank_info[] array directly. Without this patch TankInfoMode::data() can cause a SIGSEGV. Reported-by: Pedro Neves <nevesdiver@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-15Fix buffer overrun and primary sensor id issues in Liquivision importGravatar Robert Bodily
This changeset fixes 5 issues specific to importing from Liquivision dive logs: Issue #1: Buffer overrun causes segmentation fault. At the end of a dive record, untranslatable data is skipped and the file is scanned for the start of the next dive. This scan was implemented without regard to buffer size and so the scan ran over the buffer boundary when trying to scan for the next record after importing the last record in the file. Issue #2: Incorrect identification of the primary sensor. The primary tank pressure transmitter was being identified by using the sensor ID reported in the first pressure event record encountered. When diving with multiple transmitters (buddy, student, or group transmitters), this is often not the case and results in the buddy or other group transmitter's pressure data being imported instead of the primary's. Through empirical observation of several multi-sensor logs, I identified a previously unhandled event code (0x10) as marking a sensor identification event record. Parsing this record allows the primary and other sensors to be definitively identified regardless of which one sends the first pressure event. Issue #3: Sensor values added to the sample collection regardless of sensor ID. When processing events, the code previously dropped through to create a sample for every pressure event record, regardless of which sensor ID that event is associated with. Pressure events for sensors other than the primary are now ignored and omitted from the sample collection. Issue #4: Duplicate samples when pressure event time syncs with sample time. The sample index (d) was not incremented in this specific case resulting in a duplicate sample (for the same sample time) being created when processing the next pressure event record. Issue #5: Unsigned time difference results in erroneous interpolated samples. When interpolating/extrapolating depth and temperature values for a between- samples pressure event, a signed time value is subtracted from an unsigned time value, resulting in an unsigned term. This term is used as a scaling factor and should be signed to allow for a negative value. Currently, negative values are instead treated as large unsigned values which result in erroneous scaled depth and temperature values. Signed-off-by: Robert Bodily <robert@bodily.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-16code cleanup: one more unused includeGravatar Jan Mulder
See c7a35098008b2. A forgotten include is now removed as well. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-06-16code cleanup: remove unimplemented classes and structsGravatar Jan Mulder
Remove forward declared but not implemented classes and structs. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-06-16code cleanup: remove 2 unused structsGravatar Jan Mulder
Luckily these 2 structs in this ugly code are not used. Remove them. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-06-15Correctly hook up libdivecomputer log and dumpGravatar Dirk Hohndel
This was checking the status of the wrong UI elements. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-13Parse He when importing from DM5Gravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-06-13QML UI: small fix and whitespace cleanupGravatar Dirk Hohndel
In the JS code we should use assignment with '='. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12BT Discovery: add Shearwater Petrel and PerdixGravatar Jan Mulder
Add Shearwater Petrel and Perdix to automatic detection Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-06-12Don't declare static function in .h fileGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12Mobile: wrap up fixes for BT download on AndroidGravatar Jan Mulder
Major functional change in this commit is the addition of found static BT devices to the internal administration (on Android), in a way that is equivalent to mobile-on-desktop. So, in both cases, the list of devices in the app are as in the list of devices on the host OS (Linux or Android). To minimize code duplication, the btDeviceDiscovered slot is split in two parts, the part to act as slot for the Qt BT discovery agent (Linux, so mobile-on-desktop), and the part only needed for Android. Remaining to be fixed: the correct handling of the QML UI selection of vendor/product. The first default dive computer is correctly detected, all paired devices from the virtual vendow can be selected, but clicking through vendors results in non logical selections. It is obvious why this is, but a fix is not straigforward at this point. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12Mobile: add BT name to vendor/product capabilityGravatar Jan Mulder
This adds a central function to convert a BT name to a vendor/product pair known to Subsurface. This allows interfacing from a paired BT dive computer, without actively selecting its type, but by selecting it from the list of paired BT devices. So, after this, downloading from multiple (paired) DCs is also possible. And not the niced piece of code ... Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12Mobile: do not BT Discover on Android (Q_OS_ANDROID vs Q_OS_LINUX)Gravatar Jan Mulder
This seems a very trivial commit, but it is not. It appears that on an Android build, with defined(Q_OS_ANDROID) the Q_OS_LINUX variable is also defined. This results in a very tricky discovery process: 1) the JNI stuff pulls the paired devices from the local BT controller, and 2) The QT discovry agent gets active BT devices. 1) is a static list, that is, not dependent on actual visual/discoverable BT devices; it is just cached data from the phone. 2) On Android, this results in a list of actively visible (paired and not paired) devices. On desktop, however (with QT/bluez BT stack) the QT discovery agent just gets the list of paired devices, so more or less equivalent to the situation described under 1) for Android. Ok, a long story, but just do not do a discovery on Android at all. Basically, we need the BT address, device name, and possibly a specific SPP service UUID. This are fixed and known for HW and Shearwater at this point, so there is no need for a (lengthy) discovery process, and making sure the the dive computer is discoverable at the moment the app wants to construct its data to show in the UI. So, the static list of paired devices is all we need. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12BT discovery: distinguish names with addressesGravatar Dirk Hohndel
It's possible that the user has more than one dive computer with the same name paired with their computer / device. So let's just add the address to the name to make it possible to tell those apart. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12QML UI: add internal admin for virtual vendorGravatar Jan Mulder
Added a list of paired BT devices for the "Paired BT Devices" vendor. The devices under this vendor represent all BT devces that can be found from the local BT interface. Some special processing is required, as the BT provided data is (obviously) missing the specific data needed to open a BT device using libdc code. This processing is not in this commit, but will follow. This commit is preparation for that. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12Android BT: fix compile bugGravatar Jan Mulder
One Andorid JNI include was missing. And removed the unused ones from QMLManager. [Dirk Hohndel: I had added the missing include elsewhere, so this commit now only has the removal of the unused includes] Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>