aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-08-25Test VPM-B Correct expected dive time in commentGravatar Rick Walsh
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Test another VPM-B dive planGravatar Rick Walsh
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>
2015-08-25Add EON steel udev rule to FAQGravatar Miika Turkia
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>
2015-08-23Merge branch 'custom-print' of github.com:neolit123/subsurfaceGravatar Dirk Hohndel
2015-08-23Add a test for the VPM-B mode of the plannerGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-23Prepare global state of VPM-B when starting to planGravatar Robert C. Helling
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>
2015-08-23dump_tissues() should be available regardless of macro settingsGravatar Robert C. Helling
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>
2015-08-23Comment meaning of preference variablesGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-23Show tissue ceilings in tenth of m/ftGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-23Simplified Boyle's law correction and new cubic rootGravatar Robert C. Helling
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>
2015-08-23VPM-B: Calculate first_stop_pressure before starting ascentGravatar Rick Walsh
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 159c9eb2c1c19dfbf650f2b0cc28e0ef1f45c964, 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>
2015-08-23Recmode: Disable gas switch optionsGravatar Joakim Bygdell
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>
2015-08-23Indent "Conservatism level"Gravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-22Printing: replace usage of std::ceil()Gravatar Gehad elrobey
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>
2015-08-22Printing: disable template editing for statistics templatesGravatar Gehad elrobey
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>
2015-08-22Printing: enable UI elements that now can be usedGravatar Gehad elrobey
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>
2015-08-22Printing: use the same code for both statistics and divelist printGravatar Gehad elrobey
- 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>
2015-08-22Printing: add a statistics templateGravatar Gehad elrobey
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>
2015-08-22Printing: generate a Grantlee statistics templateGravatar Gehad elrobey
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>
2015-08-22Printing: export a statistics data structure to the Grantlee backendGravatar Gehad elrobey
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>
2015-08-22Printing: add statistics templates to the dialogGravatar Gehad elrobey
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>
2015-08-22Printing: read statistics templates from the "statistics" pathGravatar Gehad elrobey
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>
2015-08-22Printing: check the print type in the preview sectionGravatar Gehad elrobey
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>
2015-08-22Printing: fix uninialized border widthGravatar Gehad elrobey
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>
2015-08-22Printing: update the user-manualGravatar Gehad elrobey
Add printing description to the user-manual, also add appendix F which describes how to write a custom template for Subsurface. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-22Printing: refactor printing codeGravatar Gehad elrobey
This section of the code is called only while rendering a flow layout template, so move it to the flow layout function. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-22Printing: update user-manual imagesGravatar Gehad elrobey
Add updated user-manual images, with the new dialog UI. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-22Printing: fix typo in template nameGravatar Gehad elrobey
Template names was capitalized, so change the file name to "Custom.html" instead of "custom.html" Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-22Printing: fix the six dives per page layoutGravatar Gehad elrobey
Add container with height 100% which contains the six dives, so dives don't overflow the page. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-22Printing: use older Qt methods when calculating the ceilGravatar Gehad elrobey
Better portability for < Qt5.3. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-22Continue to separate logic code from UI codeGravatar Dirk Hohndel
We don't want to call into the MainWindow from C code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-21Cmake: fix cross compiling on WindowsGravatar Dirk Hohndel
Cmake has a bug that causes the moc process not being handed the necessary defines for the architecture we are building for. Also we were missing a library to make the BT implementation on Windows work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-21Display error messages in plannerGravatar Robert C. Helling
After a replot, check if there is an error message to display. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-21Use our pressure type to avoid bar / mbar confusionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-21Don't do computationally expensive Boyle compensation when not using VPM-BGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-21Don't do Boyle compensation when still on first stopGravatar Robert C. Helling
There is nothing to compensate but we would hit a 0/0 numerical instability there. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-21Save Properties for each State of the mainWindowGravatar Tomaz Canabrava
Each state can have the same widgets but with different properties - currently I'm using "enabled" : true and false for the DiveSiteEdit, it looks like a big amount of code for such a small thing but it was the cleaner way that I tougth of doing. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Updates to the ReleaseNotesGravatar Dirk Hohndel
Including a quick note about the two known issues on Macs. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Open subsurface on attaching divecomputerGravatar Venkatesh Shukla
Added USB usage permissions in manifest. Also added various FTDI based USB devices in xml/device_filter.xml. When any device matching the VID and PID provided in the device_filter.xml is attached, subsurface application is opened automatically. Also, the USB permissions are granted to the application. This simplifies the USB file generation approach. Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in> Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Connect up serial_ftdi custom serialGravatar Anton Lundin
This connects the serial_ftdi implementation to subsurface, and builds libftdi1 for the android builds. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Turn serial_ftdi.c into a custom_serialGravatar Anton Lundin
This cleans up serial_ftdi.c from being a libdivecomputer source and making it into a subsurface custom_serial. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Re-indent and style up serial ftdiGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20serial_ftdi.c for communication with ftdi devicesGravatar Venkatesh Shukla
This script is based on serial_posix.c and is primarily meant to work on android, but could be used elsewhere as well. This script communicates with libftdi devices connected to the system using libftdi library. ftdi_read_data returns 0 if no data is received from the device. Allowing to continue on recieving 0 might end up in an infinite loop. But it works in OSTC3. This needs to be checked further. libftdi returns -3 when it could not find any device corresponding to the pid and vid given. (Different from -3 of libusb which means you do not have permissions to access the device) Use this to return value to check for other accepted chipsets including the custom pids used by divecomputer manufacturers such as Cressi (Leonardo), Suunto and Oceanic. ftdi_read_data returns the number of bytes read (+ve), 0 when there is no data to read, and negative when there is an error. Instead of infinitely waiting for the data to appear, it is better to implement an exponential backoff which times out after MAX_BACKOFF. [Anton Lundin: This code was originally intended to be included in libdivecomputer, but because we now got the custom-serial patches, its included in subsurface instead, and wired in from there - renamed the resulting file to serial_ftdi.c] Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in> Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Rename serial_ftdi.c for subsurface source Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Wire up get_usb_fd to libusb_set_android_open_callbackGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Extract usb file descriptor of ftdi on AndroidGravatar Venkatesh Shukla
Using JNI implementation of QtAndroid, usb file descriptor of attached ftdi usb device is extracted. This would then be used for opening usb device on android. This implementation assumes that permission for usage of device is already present. This is because of the device_filter due to which on attaching a recognised usb device (Only ftdi for now) to android, a dialog pops up asking for permission to use it with subsurface. Not an ideal assumption but works sufficiently well. Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in> Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Enable android logging from libusbGravatar Anton Lundin
This makes libusb to log straight to the android logging system. This makes sure we can reach the logs and debug things. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Patch libusb for android custom open functionGravatar Anton Lundin
This idea was inspired by: https://github.com/PointCloudLibrary/mobile/blob/master/3rdparty/android/patches/libusb.patch The whole thing is re-written from scratch but the idea came from there, and its a way simpler way of getting a system-opened fd to the right place than patching every call in the stack to pass a fd down. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Add implementation for device discovery agent initialization (Windows)Gravatar Claudiu Olteanu
Register the metatypes needed for Windows platforms and initialize our custom device discovery agent. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Get a pretty print message when a device discovery error occuredGravatar Claudiu Olteanu
Try to get a pretty print message when a device discovery error is raised and it is unknown. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Add implementation for BTH device item selection on Windows platformsGravatar Claudiu Olteanu
When a Bluetooth device is selected from the discovered list display information about its address and enable the save button. On Windows we don't need to check if the devices are paired because the pairing process is done automatically on the connection step. If the devices are not paired Windows will ask for user's permission to continue the process. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>