| Age | Commit message (Collapse) | Author |
|
|
|
atmospheric pressure sensor. This is an inexpensive to moderately
expensive chip available from a large number of places. The driver
supports all aspects of the two chips, except for the repeating read
mode which would allow for sub-second queries, such as fall detection
or perhaps even as an altimeter. This driver also only supports the
I2C interface and not the SPI interface.
The BME280, the one with humidity, is not fully tested at this point,
awaiting upon a breakout board and may not show proper humidity.
|
|
|
|
Since 2021-01-31, lint no longer requires a CONSTCOND comment in a
do-while-0 statement since this is a common code pattern, especially in
statement-like macros.
sed -i -E 's,} while \(/\* ?CONSTCOND ?\*/ ?0\),} while (0),' */*.[ch]
|
|
If statistics are selected with -T, then also display max, min and average.
The empty line between each display is skipped when one or more sensors are
selected with -s.
|
|
|
|
E.g.
# envstat -x /vcmbox0/0/cur-value
328150000
|
|
|
|
|
|
extend envsys(4) framework by %rH (relative humidity)
|
|
attempt to free it.
|
|
- allocate memory inside the function used.
|
|
|
|
|
|
things, from Snader_LB.
|
|
and FALSE, because messages like "battery present: ON" are difficult for my
brain to parse.
|
|
handle that.
|
|
2. Properly print percentages in -T statistics mode
3. Always set Sensor Type (units) to a non-NULL value
4. Enable printing of percentages for Integer sensors
|
|
extracts it.
|
|
skip past the display columns that the value would otherwise occupy.
Fixes display issue when swsensor(4) is used and it has a value of 0K,
as reported by njoly@
|
|
Should investigate a dynamic approach in the future.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
instead of crit-min); ok pgoyette
|
|
remove the Capacity column.
Reduce inter-column spacing, and display all four limits on one page,
rather than using the -W command line option to switch between critical
and warning limits. (The -W option is still permitted, but has no
effect.)
%capacity limits are displayed in the WarnMin and CritMin columns, but
have a trailing % sign.
|
|
one in length. From Anon-Ymous.
XXX: Should pull up to 5.0
|
|
|
|
critical-min and critical-max; also, a battery warning-capacity is
added in addition to a critical-capacity.
2. usr.sbin/envstat is modified to introduce a -W command line switch to
display the warning-* values instead of the critical-* values, and
envstat(8) and envsys.conf(5) man pages are updated appropriately.
3. Treat user-defined limits as a single continuum and generate a single
event regardless of how many boundaries a change in sensor value
crosses; ditto for driver-defined limits.
Fixes my PR/39021
Fixes my PR/39022
OK'd by christos@ bouyer@ cube@
|
|
|
|
|
|
CID 5031.
|
|
print the error.
|
|
|
|
|
|
|
|
limits so that they appear in the correct column.
|
|
current value as well as critical limits set and sensor unit.
* Add a new flag: -T. When it's enabled statistics will be created for
the sensors. Max, min and average statistics as well as sensor unit
will be displayed. Must be used with an interval.
You can see the new code in action here:
http://www.netbsd.org/~xtraeme/envstat_stats.txt
Thanks to jmcneill@ for comments and ideas.
|
|
|
|
via the -s flag (the requirement for -d is not there anymore). [1]
You can do something like the following now:
$ envstat -s "acpibat0:charge,acpibat0:charge state,acpitz0:temperature"
[acpibat0]
charge: 3.015 Ah (79.70%)
charge state: NORMAL
[acpitz0]
temperature: 54.000 degC
$
* As bonus, the code has been modified to use a simple queue for
the sensors, and this has simplified and improved some parts of the
code as well.
[1] Item requested by joerg@ yesterday.
|
|
configuration files. This sets the timeout value that will be used
to check for critical limits.
The value can be viewed by the 'envstat -D' command.
|
|
introduce ENVSYS_BATTERY_CHARGE, which is the same than an Indicator and
it's used to know if the battery is currently charging or discharging.
- Require two sensors at least for SME_CLASS_BATTERY to make the low-power
condition work: a ENVSYS_BATTERY_CAPACITY plus ENVSYS_BATTERY_CHARGE.
- Simplify sme_event_check_lowpower() and make it check the required
sensors in the SME_CLASS_ACADAPTER and SME_CLASS_BATTERY classes.
If the acadapter is not ready, trust the state returned by the battery
device.
Based on suggestion from joerg@.
|
|
foo0 {
#
# CPU Temperature
#
sensor0 {
critical-max = 70C;
critical-min = 20C;
}
...
}
...
Removed the -m flag that was previously used to set properties for
sensors. Now the -c flag will process all properties specified in
the file (accepted as argument).
To remove all properties that were set, the new -S flag can be used.
This will restore default values for all devices.
|
|
- Remove a block that is not used anymore in check_sensors().
|