From d7c7ed18e57254eddea76d5704fd88ccf506edf1 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Thu, 10 Oct 2013 23:40:58 +0000 Subject: more precision git-svn-id: https://svn.spreadspace.org/avr/trunk@237 aa12f405-d877-488e-9caf-2d797e2a1cc7 --- usb-1wire/usb-1wire.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usb-1wire') diff --git a/usb-1wire/usb-1wire.c b/usb-1wire/usb-1wire.c index e96100f..b28dc63 100644 --- a/usb-1wire/usb-1wire.c +++ b/usb-1wire/usb-1wire.c @@ -113,10 +113,10 @@ void tempToUSB(uint8_t bit_resolution) printf("CRC comm error\r\n"); } else { temp = ds1820_raw_temp_to_celsius( raw_temp ); - printf("raw: %d, celsius (float): %f, celsius (int): %d.%d, %d bit resolution\r\n", + printf("raw: %d, celsius (float): %f, celsius (int): %d.%02d, %d bit resolution\r\n", raw_temp, temp , - raw_temp / 16, 10 * (raw_temp % 16) / 16, + raw_temp / 16, 100 * (raw_temp % 16) / 16, bit_resolution ); } -- cgit v1.2.3