summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEbus-at-dockstar <ebus@dockstar>2015-07-06 23:05:13 +0200
committerEbus-at-dockstar <ebus@dockstar>2015-07-06 23:05:13 +0200
commit2ccd5f3192d80bed75578c2e31e3d145c9e1a4ed (patch)
tree78e1afcd7c5c3ee3085a1268b7a043f21058eb3d
parent07d19f2c5a8b312c497df2fba6f6d9f247df1701 (diff)
downloadebus-alt-2ccd5f3192d80bed75578c2e31e3d145c9e1a4ed.tar.gz
ebus-alt-2ccd5f3192d80bed75578c2e31e3d145c9e1a4ed.zip
formatting of real values
-rwxr-xr-xebus-racket/inserter.rkt2
1 files changed, 1 insertions, 1 deletions
diff --git a/ebus-racket/inserter.rkt b/ebus-racket/inserter.rkt
index 7adbe88..90e0855 100755
--- a/ebus-racket/inserter.rkt
+++ b/ebus-racket/inserter.rkt
@@ -29,7 +29,7 @@
(let ()
(define url (format "~a/~a" (baseurl?) sensor-name))
(define raw-value
- (cond ((member datatype '(data1c data2b data2c)) (real->decimal-string value))
+ (cond ((member datatype '(data1c data2b data2c)) (real->decimal-string (exact->inexact value)))
((member datatype '(bit byte data1b word bcd)) (format "~s" value))
((member datatype '(byteEnum)) value)
(else (error 'invalid-datatype))))