Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.5 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.5 KB

libdivecomputer-go GoDoc

This project provides Go bindings for libdivecomputer v0.6.0 - a cross-platform and open source library for communication with dive computers from various manufacturers.
All the binding code has automatically been generated with rules defined in core.yml. There are future plans to write a high level wrapper for the bindings

Before start you must install libdivecomputer.

Usage

$ go get github.com/calle-gunnarsson/libdivecomputer-go/core

Demo

These are simple ports of dctool <list,dump,download> and will probably contain some memory leaks or other bugs.

# List all supported devices
$ go get github.com/calle-gunnarsson/libdivecomputer-go/cmd/dc_list
$ dc_list

# Memory dump of device
$ go get github.com/calle-gunnarsson/libdivecomputer-go/cmd/dc_dump
$ dc_dump -name d9 -family suunto -filename dump.bin -devname /dev/ttyS1

# Save dives as json to file
$ go get github.com/calle-gunnarsson/libdivecomputer-go/cmd/dc_download
$ dc_download -name d9 -family suunto -filename dump.json -devname /tmp/ttyS1

Rebuilding the package

You will need to get the c-for-go tool installed first.

$ git clone github.com/calle-gunnarsson/libdivecomputer-go && cd libdivecomputer-go
$ make clean && make