diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-04-21 04:07:14 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-04-21 04:07:14 +0000 |
commit | d8c97c7d4206ddd1bf3d1bd630df8b8552e4fd86 (patch) | |
tree | cce5bbc0ba0c35a0abf088730bc7136677537307 /usr.sbin/sensorsd | |
parent | 5d2dbe5b81b50026bfa876dbd5e01c3c9a410f90 (diff) |
Add the "angle" sensor, measured in degrees; from Luis Pinto
Diffstat (limited to 'usr.sbin/sensorsd')
-rw-r--r-- | usr.sbin/sensorsd/sensorsd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/sensorsd/sensorsd.c b/usr.sbin/sensorsd/sensorsd.c index 93f1af4b328..b012e4d930b 100644 --- a/usr.sbin/sensorsd/sensorsd.c +++ b/usr.sbin/sensorsd/sensorsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sensorsd.c,v 1.48 2010/04/20 20:49:36 deraadt Exp $ */ +/* $OpenBSD: sensorsd.c,v 1.49 2010/04/21 04:07:13 deraadt Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -659,6 +659,9 @@ print_sensor(enum sensor_type type, int64_t value) case SENSOR_TIMEDELTA: snprintf(fbuf, RFBUFSIZ, "%.6f secs", value / 1000000000.0); break; + case SENSOR_ANGLE: + snprintf(fbuf, RFBUFSIZ, "%lld", value); + break; default: snprintf(fbuf, RFBUFSIZ, "%lld ???", value); } @@ -759,6 +762,7 @@ get_val(char *buf, int upper, enum sensor_type type) case SENSOR_INDICATOR: case SENSOR_INTEGER: case SENSOR_DRIVE: + case SENSOR_ANGLE: rval = val; break; case SENSOR_WATTS: |