From 2fbdd3b7548e203c3319f669108929e866ca748e Mon Sep 17 00:00:00 2001 From: Raido Date: Mon, 20 Dec 2021 23:12:20 +0200 Subject: [PATCH] Fix read not working. --- cmd/deviceparameter/deviceparameter.go | 4 ++-- cmd/deviceparameters/deviceparameters.go | 24 +++++++++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/cmd/deviceparameter/deviceparameter.go b/cmd/deviceparameter/deviceparameter.go index d05e334..91d8b1f 100644 --- a/cmd/deviceparameter/deviceparameter.go +++ b/cmd/deviceparameter/deviceparameter.go @@ -22,7 +22,7 @@ import ( ) const ApplicationVersionMajor = 0 -const ApplicationVersionMinor = 3 +const ApplicationVersionMinor = 4 const ApplicationVersionPatch = 0 var ApplicationBuildDate string @@ -129,7 +129,7 @@ func parseValue(opts Options) ([]byte, bool, error) { return nil, false, errors.New("Multiple values specified for parameter") } - return value, true, err + return value, c > 0, err } type Options struct { diff --git a/cmd/deviceparameters/deviceparameters.go b/cmd/deviceparameters/deviceparameters.go index 913b31f..587fef5 100644 --- a/cmd/deviceparameters/deviceparameters.go +++ b/cmd/deviceparameters/deviceparameters.go @@ -3,19 +3,21 @@ package main -import "fmt" -import "os" -import "log" -import "time" -import "os/signal" - -import "github.com/jessevdk/go-flags" -import "github.com/proactivity-lab/go-loggers" -import "github.com/proactivity-lab/go-moteconnection" -import "github.com/thinnect/go-devparam/director" +import ( + "fmt" + "log" + "os" + "os/signal" + "time" + + "github.com/jessevdk/go-flags" + "github.com/proactivity-lab/go-loggers" + "github.com/proactivity-lab/go-moteconnection" + "github.com/thinnect/go-devparam/director" +) const ApplicationVersionMajor = 0 -const ApplicationVersionMinor = 3 +const ApplicationVersionMinor = 4 const ApplicationVersionPatch = 0 var ApplicationBuildDate string