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.
$ go get github.com/calle-gunnarsson/libdivecomputer-go/core
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
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