Compare commits

..

No commits in common. "390086788f9e7019fcd548b25bca53801febca17" and "5e2898f5535efc98ce843194de757ced878efc7a" have entirely different histories.

6 changed files with 16 additions and 34 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
hrm
*.apk

4
go.mod
View File

@ -3,7 +3,7 @@ module git.wow.st/gmp/hrm
go 1.13
require (
gioui.org v0.0.0-20191101175813-af353822fa5e
git.wow.st/gmp/ble v0.0.0-20191101185903-829baedeac2b
gioui.org v0.0.0-20191028123051-439d3e652c8f
git.wow.st/gmp/ble v0.0.0-20191028152114-c911bbb547bc
gopkg.in/yaml.v2 v2.2.4
)

22
go.sum
View File

@ -1,14 +1,16 @@
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gioui.org v0.0.0-20191031200634-4e71f195ab51 h1:Epxo/e6oPvbDMMB8rrpmUlBe6ELeDpRuLzFUGfT6kJM=
gioui.org v0.0.0-20191031200634-4e71f195ab51/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
gioui.org v0.0.0-20191101175813-af353822fa5e h1:8NpYJwhzVg0A34MikFWRS65/PoYcluBGWZ3fgy8iXIg=
gioui.org v0.0.0-20191101175813-af353822fa5e/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
git.wow.st/gmp/ble v0.0.0-20191030160916-4e4c07169707 h1:46SbpM1pnBe+VNUSohkKz16s/8BFY2+hzRLZEiRR1Y0=
git.wow.st/gmp/ble v0.0.0-20191030160916-4e4c07169707/go.mod h1:MiidWVofL6FTtRokC5JGBdVUhKyvZtnia5noj08r944=
git.wow.st/gmp/ble v0.0.0-20191101184817-0ab45a1d9d54 h1:Tdomh1qilIgDXWU+CksM6682BKomGKFyw3+JXcP0LLo=
git.wow.st/gmp/ble v0.0.0-20191101184817-0ab45a1d9d54/go.mod h1:MiidWVofL6FTtRokC5JGBdVUhKyvZtnia5noj08r944=
git.wow.st/gmp/ble v0.0.0-20191101185903-829baedeac2b h1:ccSukYa0YCYZEXaweXXf/103edYKBECsQjExQBTH0vE=
git.wow.st/gmp/ble v0.0.0-20191101185903-829baedeac2b/go.mod h1:MiidWVofL6FTtRokC5JGBdVUhKyvZtnia5noj08r944=
gioui.org v0.0.0-20191024154924-88adc0ee1a0b h1:h+Ot0YwjtLHkFlLVbiS3R8gS0cyk6/xkKWNlWAcXtFs=
gioui.org v0.0.0-20191024154924-88adc0ee1a0b/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
gioui.org v0.0.0-20191028123051-439d3e652c8f h1:ezHtZUPYXzpRD47QOaAkpTTncWNhJvmUKS/+1yFLQUg=
gioui.org v0.0.0-20191028123051-439d3e652c8f/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
git.wow.st/gmp/ble v0.0.0-20191025130954-ec02bc7bcc2b h1:qttVD1iumDo7WWzyIJAUkis+Yh8QB07RXJcbAgCfEZI=
git.wow.st/gmp/ble v0.0.0-20191025130954-ec02bc7bcc2b/go.mod h1:MiidWVofL6FTtRokC5JGBdVUhKyvZtnia5noj08r944=
git.wow.st/gmp/ble v0.0.0-20191025185913-5955e369e4eb h1:vebHnxVY7EvVzafTGFKQWR0Q3uV4jaoOTL0qS/iDP9Y=
git.wow.st/gmp/ble v0.0.0-20191025185913-5955e369e4eb/go.mod h1:MiidWVofL6FTtRokC5JGBdVUhKyvZtnia5noj08r944=
git.wow.st/gmp/ble v0.0.0-20191028132523-2d4f106dd76c h1:GUCh9nytD5hEqw8B5/vXtY8cVCZTraJVs8mtncs10M0=
git.wow.st/gmp/ble v0.0.0-20191028132523-2d4f106dd76c/go.mod h1:MiidWVofL6FTtRokC5JGBdVUhKyvZtnia5noj08r944=
git.wow.st/gmp/ble v0.0.0-20191028152114-c911bbb547bc h1:wh2wjBt1/b+pH9PPP2TJZzv8HjpwsN0t+rN6dRwAfvY=
git.wow.st/gmp/ble v0.0.0-20191028152114-c911bbb547bc/go.mod h1:MiidWVofL6FTtRokC5JGBdVUhKyvZtnia5noj08r944=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=

View File

@ -31,7 +31,7 @@ var Config conf
var conffile string
func main() {
conffile = path.Join(getConfDir(), "config.yml")
conffile = path.Join(confDir, "config.yml")
if _, err := os.Stat(conffile); os.IsNotExist(err) {
fd, err := os.Create(conffile)
if err != nil {

View File

@ -1,15 +0,0 @@
package main
import (
"gioui.org/app"
)
var confDir string
func getConfDir() string {
if confDir != "" {
return confDir
}
confDir,_ = app.DataDir()
return confDir
}

View File

@ -9,10 +9,7 @@ import (
var confDir string
func getConfDir() string {
if confDir != "" {
return confDir
}
func init() {
usr, err := user.Current()
if err != nil {
log.Fatal("Cannot get current user: ", err)
@ -26,5 +23,4 @@ func getConfDir() string {
log.Print("Configuration directory created")
}
}
return confDir
}