diff options
-rw-r--r-- | usb-1wire/usb-1wire.c | 4 |
1 files changed, 2 insertions, 2 deletions
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
);
}
|