Skip to content

Commit

Permalink
Merge tag 'v0.8.0' into Subsurface-DS9
Browse files Browse the repository at this point in the history
Merge upstream version 0.8.0 into our libdc fork.

Since we tracked the development branch, we already had merged all the
main changes, but it's been a couple of months since the last upstream
merge, and there were a few new changes upstream:

 - Divesoft Freedom and Liberty support

 - A couple of iostream abstraction layers: a new 'packet layer' and a
   HDLC layer, moving code from low-level dive computer downloaders to
   generic iostream layers.

 - misc minor updates

* tag 'v0.8.0': (25 commits)
  Release version 0.8.0
  Fix the date of the v0.7.0 release
  Add a missing filter for the Aqualung i750TC
  Reduce the BLE output packet size to 20 bytes again
  Integrate the new packet I/O in the backends
  Add a generic packet I/O implementation
  Fix a typo in the documentation
  Add support for the Divesoft Freedom and Liberty
  Integrate the HDLC stream in the eonsteel backend
  Add a generic HDLC I/O implementation
  Remove the local endianess functions
  Use the correct function to free resources
  Add the udev rules to the distribution tarball
  Add a README file to the contrib directory
  Include the revision in the Visual Studio and Android builds
  Don't generate the Windows version resource
  Move the Visual Studio project to the contrib directory
  Add a basic Android build system
  Disable the getopt argument permutation on Android
  Move the sign extension function to a common place
  ...
  • Loading branch information
torvalds committed May 27, 2023
2 parents 763fc68 + db9371c commit 436063c
Show file tree
Hide file tree
Showing 47 changed files with 3,770 additions and 811 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,52 @@ jobs:
with:
name: ${{ github.job }}-${{ matrix.arch }}
path: ${{ github.job }}-${{ matrix.arch }}.tar.gz

msvc:

name: Visual Studio

runs-on: windows-latest

strategy:
fail-fast: false
matrix:
platform: [x86, x64]

env:
CONFIGURATION: Release

steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
install: autoconf automake libtool pkg-config make gcc
- run: |
autoreconf --install --force
./configure --prefix=/usr
make -C src revision.h
shell: msys2 {0}
- uses: microsoft/setup-msbuild@v1
- run: msbuild -m -p:Platform=${{ matrix.platform }} -p:Configuration=${{ env.CONFIGURATION }} contrib/msvc/libdivecomputer.vcxproj
- uses: actions/upload-artifact@v3
with:
name: ${{ github.job }}-${{ matrix.platform }}
path: contrib/msvc/${{ matrix.platform }}/${{ env.CONFIGURATION }}/bin

android:

name: Android

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- run: |
autoreconf --install --force
./configure --prefix=/usr
make -C src revision.h
- run: $ANDROID_NDK/ndk-build -C contrib/android NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk
- uses: actions/upload-artifact@v3
with:
name: ${{ github.job }}
path: contrib/android/libs
7 changes: 5 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ pkgconfig_DATA = libdivecomputer.pc

EXTRA_DIST = \
libdivecomputer.pc.in \
msvc/libdivecomputer.vcxproj \
msvc/libdivecomputer.vcxproj.filters
contrib/README \
contrib/android/Android.mk \
contrib/msvc/libdivecomputer.vcxproj \
contrib/msvc/libdivecomputer.vcxproj.filters \
contrib/udev/libdivecomputer.rules
36 changes: 35 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
Version 0.7.0 (2020-05-07)
Version 0.8.0 (2023-05-11)
==========================

The v0.8.0 release is mainly a bugfix release, and brings in support for a
number of new devices. This release is fully backwards compatible with the
previous one.

New features:

* Add support for new backends:
- excursion: Deep Six Excursion, Crest CR-4, Genesis Centauri, Tusa TC1, Scorpena Alpha
- screen: Seac Screen and Action
- cosmiq: Deepblu Cosmiq+
- s1: Oceans S1
- freedom: Divesoft Freedom and Liberty
* Add support for some new devices:
- Aqualung: i200C
- Cressi: Donatello, Michelangelo, Neon
- Mares: Puck Pro +
- Oceanic: Geo Air
- Ratio: iX3M 2
- Scubapro: G2 TEK
- Shearwater: Petrel 3, Perdix 2
- Sherwood: Amphos Air 2.0
* Add support for parsing the decompression model
* Add a public api to configure the depth calibration
* Add a public api to configure the clock synchronization
* Add a basic Android build system

Removed/changed features:

* Migrate to Visual Studio 2013 (or newer)
* Move the Visual Studio project to the contrib directory

Version 0.7.0 (2021-05-07)
==========================

The main highlight of the v0.7.0 release is the introduction of the new
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ AC_CONFIG_FILES([
include/libdivecomputer/Makefile
include/libdivecomputer/version.h
src/Makefile
src/libdivecomputer.rc
doc/Makefile
doc/doxygen.cfg
doc/man/Makefile
Expand Down
56 changes: 56 additions & 0 deletions contrib/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Alternative build systems
=========================

The autotools based build system is the official build system for the
libdivecomputer project. But for convenience, a few alternative build systems
are available as well. Unfortunately, these builds systems require a few extra
steps to generate some header files.

If you have access to a UNIX build system (for example a Linux virtual machine,
MinGW, Cygwin or the Windows Subsystem for Linux), you can use the autotools
build system to generate those files:

$ autoreconf --install --force
$ ./configure
$ make -C src revision.h

Alternative, you can generate those files manually. First, create the version.h
file from the version.h.in template:

$ cp include/libdivecomputer/version.h.in include/libdivecomputer/version.h

and replace all the @DC_VERSION@ placeholders with the values defined in the
configure.ac file.

Next, generate the revision.h file:

$ echo "#define DC_VERSION_REVISION \"$(git rev-parse --verify HEAD)\"" > src/revision.h

The alternative build systems are ready to use now.

Visual Studio
-------------

The Visual Studio project file can be opened in the IDE, or build directly from
the command-line:

msbuild -m -p:Platform=x86|x64 -p:Configuration=Debug|Release contrib/msvc/libdivecomputer.vcxproj

Android NDK
-----------

$ANDROID_NDK/ndk-build -C contrib/android NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk

Linux udev rules
================

For dive computers using USB or USB HID communication, regular users typically
don't have the necessary permissions to access the device nodes. This can be
fixed with some udev rules.

Install the udev rules, and reload them:

$ sudo cp contrib/udev/libdivecomputer.rules /etc/udev/rules.d/
$ sudo udevadm control --reload

Note: the provided udev rules assume the user is in the plugdev group.
143 changes: 143 additions & 0 deletions contrib/android/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
LOCAL_PATH := $(call my-dir)/../..

include $(CLEAR_VARS)
LOCAL_MODULE := libdivecomputer
LOCAL_CFLAGS := -DENABLE_LOGGING -DHAVE_VERSION_SUFFIX -DHAVE_PTHREAD_H -DHAVE_STRERROR_R -DHAVE_CLOCK_GETTIME -DHAVE_LOCALTIME_R -DHAVE_GMTIME_R -DHAVE_TIMEGM -DHAVE_STRUCT_TM_TM_GMTOFF
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_SRC_FILES := \
src/aes.c \
src/array.c \
src/atomics_cobalt.c \
src/atomics_cobalt_parser.c \
src/bluetooth.c \
src/buffer.c \
src/checksum.c \
src/citizen_aqualand.c \
src/citizen_aqualand_parser.c \
src/cochran_commander.c \
src/cochran_commander_parser.c \
src/common.c \
src/context.c \
src/cressi_edy.c \
src/cressi_edy_parser.c \
src/cressi_goa.c \
src/cressi_goa_parser.c \
src/cressi_leonardo.c \
src/cressi_leonardo_parser.c \
src/custom.c \
src/datetime.c \
src/deepblu_cosmiq.c \
src/deepblu_cosmiq_parser.c \
src/deepsix_excursion.c \
src/deepsix_excursion_parser.c \
src/descriptor.c \
src/device.c \
src/diverite_nitekq.c \
src/diverite_nitekq_parser.c \
src/divesoft_freedom.c \
src/divesoft_freedom_parser.c \
src/divesystem_idive.c \
src/divesystem_idive_parser.c \
src/hdlc.c \
src/hw_frog.c \
src/hw_ostc3.c \
src/hw_ostc.c \
src/hw_ostc_parser.c \
src/ihex.c \
src/iostream.c \
src/irda.c \
src/iterator.c \
src/liquivision_lynx.c \
src/liquivision_lynx_parser.c \
src/mares_common.c \
src/mares_darwin.c \
src/mares_darwin_parser.c \
src/mares_iconhd.c \
src/mares_iconhd_parser.c \
src/mares_nemo.c \
src/mares_nemo_parser.c \
src/mares_puck.c \
src/mclean_extreme.c \
src/mclean_extreme_parser.c \
src/oceanic_atom2.c \
src/oceanic_atom2_parser.c \
src/oceanic_common.c \
src/oceanic_veo250.c \
src/oceanic_veo250_parser.c \
src/oceanic_vtpro.c \
src/oceanic_vtpro_parser.c \
src/oceans_s1.c \
src/oceans_s1_common.c \
src/oceans_s1_parser.c \
src/packet.c \
src/parser.c \
src/platform.c \
src/rbstream.c \
src/reefnet_sensus.c \
src/reefnet_sensus_parser.c \
src/reefnet_sensuspro.c \
src/reefnet_sensuspro_parser.c \
src/reefnet_sensusultra.c \
src/reefnet_sensusultra_parser.c \
src/ringbuffer.c \
src/seac_screen.c \
src/seac_screen_parser.c \
src/serial_posix.c \
src/shearwater_common.c \
src/shearwater_petrel.c \
src/shearwater_predator.c \
src/shearwater_predator_parser.c \
src/socket.c \
src/sporasub_sp2.c \
src/sporasub_sp2_parser.c \
src/suunto_common2.c \
src/suunto_common.c \
src/suunto_d9.c \
src/suunto_d9_parser.c \
src/suunto_eon.c \
src/suunto_eon_parser.c \
src/suunto_eonsteel.c \
src/suunto_eonsteel_parser.c \
src/suunto_solution.c \
src/suunto_solution_parser.c \
src/suunto_vyper2.c \
src/suunto_vyper.c \
src/suunto_vyper_parser.c \
src/tecdiving_divecomputereu.c \
src/tecdiving_divecomputereu_parser.c \
src/timer.c \
src/usb.c \
src/usbhid.c \
src/uwatec_aladin.c \
src/uwatec_memomouse.c \
src/uwatec_memomouse_parser.c \
src/uwatec_smart.c \
src/uwatec_smart_parser.c \
src/version.c \
src/zeagle_n2ition3.c
include $(BUILD_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := dctool
LOCAL_SHARED_LIBRARIES := libdivecomputer
LOCAL_CFLAGS := -DHAVE_UNISTD_H -DHAVE_GETOPT_H -DHAVE_GETOPT_LONG -DHAVE_DECL_OPTRESET=1
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_SRC_FILES := \
examples/common.c \
examples/dctool.c \
examples/dctool_download.c \
examples/dctool_dump.c \
examples/dctool_fwupdate.c \
examples/dctool_help.c \
examples/dctool_list.c \
examples/dctool_parse.c \
examples/dctool_read.c \
examples/dctool_scan.c \
examples/dctool_timesync.c \
examples/dctool_version.c \
examples/dctool_write.c \
examples/output.c \
examples/output_raw.c \
examples/output_xml.c \
examples/utils.c
include $(BUILD_EXECUTABLE)

0 comments on commit 436063c

Please sign in to comment.