C = K + 273.16.

This commit is contained in:
soren 2004-02-02 07:55:14 +00:00
parent 301d580988
commit cf458c9f73

View File

@ -1,4 +1,4 @@
/* $NetBSD: envstat.c,v 1.15 2004/01/05 23:23:38 jmmv Exp $ */
/* $NetBSD: envstat.c,v 1.16 2004/02/02 07:55:14 soren Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: envstat.c,v 1.15 2004/01/05 23:23:38 jmmv Exp $");
__RCSID("$NetBSD: envstat.c,v 1.16 2004/02/02 07:55:14 soren Exp $");
#endif
#include <fcntl.h>
@ -181,7 +181,7 @@ main(int argc, char **argv)
break;
case ENVSYS_STEMP: {
double temp = (etds[i].cur.data_s / 1000000.0)
- 273.15;
- 273.16;
if (celsius)
printf(": %10.3f degC", temp);
else {
@ -300,7 +300,7 @@ values(size_t width, int celsius, envsys_tre_data_t *etds,
break;
case ENVSYS_STEMP:
temp = (etds[i].cur.data_us / 1000000.0) -
273.15;
273.16;
if (!celsius)
temp = (9.0 / 5.0) * temp + 32.0;
printf(" %*.2f", (int)width, temp);