Skip to content
Dividat drivers and hardware test suites
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.git-crypt
keys
nix
rec
src/dividat-driver
test
tools
.gitignore
Changelog.md
Makefile
Readme.md
default.nix
install.ps1
package-lock.json
package.json

Readme.md

Dividat Driver

Build status

Dividat drivers and hardware test suites.

Compatibility

Firefox, Safari and Edge not supported as they are not yet properly implementing loopback as a trustworthy origin, see:

Development

Prerequisites

Nix is required for installing dependencies and providing a suitable development environment.

Quick start

  • Create a suitable environment: nix-shell
  • Build the driver: make
  • Run the driver: ./bin/dividat-driver

Tests

Run the test suite with: make test.

Go packages

Go dependencies are provided by the Go machinery in Nix.

For local development you may use dep to install go dependencies: cd src/dividat-driver && dep ensure.

New Go dependencies can be added with dep (e.g. dep ensure -add github.com/something/supercool). The Nix specification of dependencies will recreated on subsequent builds (i.e. running make). Check in the updated Gopkg.toml, Gopkg.lock and nix/deps.nix files.

Releasing

Building

Currently releases can only be made from Linux.

To create a release run: make release.

A default environment (defined in default.nix) provides all necessary dependencies for building on your native system (i.e. Linux or Darwin). Running make will create a binary that should run on your system (at least in the default environemnt).

Releases are built towards a more clearly specified target system (also statically linked). The target systems are defined in the nix/build folder. Nix provides toolchains and dependencies for the target system in a sub environment. The build system (in the make crossbuild target) invokes these sub environments to build releases.

Existing release targets:

  • Linux: statically linked with musl
  • Windows

Deploying

To deploy a new release run: make deploy. This can only be done if you are on master or develop branch, have correctly tagged the revision and have AWS credentials set in your environment.

Installation

Windows

This application can be run as a Windows service (https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-service).

A PowerShell script is provided to download and install the latest version as a Windows service. To run the script enter following command in an administrative PowerShell:

PS C:\ Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/dividat/driver/master/install.ps1'))

Please have a look at the script before running it on your system.

Tools

Data recorder

Data from Senso can be recorded using the recorder. Start it with make record > foo.dat. The created recording can be used by the replayer.

Data replayer

Recorded data can be replayed for debugging purposes.

For default settings: npm run replay

To replay an other recording: npm run replay -- rec/simple.dat

To change the replay speed: npm run replay -- --speed=0.5 rec/simple.dat

You can’t perform that action at this time.