From 2ccd5f3192d80bed75578c2e31e3d145c9e1a4ed Mon Sep 17 00:00:00 2001 From: Ebus-at-dockstar Date: Mon, 6 Jul 2015 23:05:13 +0200 Subject: formatting of real values --- ebus-racket/inserter.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)))) -- cgit v1.2.1