From 553648e10d27ccee4b579b85302fe59d1f88451e Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 10 Feb 2025 14:18:19 +0100 Subject: [PATCH] value shall be string --- src/tsm/tsmq/tsmq.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tsm/tsmq/tsmq.go b/src/tsm/tsmq/tsmq.go index 4b6f1cd..38d1829 100644 --- a/src/tsm/tsmq/tsmq.go +++ b/src/tsm/tsmq/tsmq.go @@ -3,6 +3,7 @@ package tsmq import ( "log" "time" + "strconv" "encoding/json" "tsm/config" @@ -14,7 +15,7 @@ import ( type variable_t struct { Label string `json:"label"` Variable string `json:"variable"` - Value float64 `json:"value"` + Value string `json:"value"` Unit string `json:"unit"` Status string `json:"status"` } @@ -51,7 +52,7 @@ func Start() { v := variable_t { Label: label, Variable: "", - Value: value, + Value: strconv.FormatFloat(value, 'f', 4, 64) Unit: "ms", Status: status, }