Commit Graph

27 Commits

Author SHA1 Message Date
Dave 6ccecbfca2
feat(temperature): Add `zone-type` setting (#2752)
Signed-off-by: xphoniex <dj.2dixx@gmail.com>

Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-08-21 19:25:42 +02:00
Quantenzitrone 708bd9c891
feat(temperature): %temperature-k% token for Kelvin (#2784)
* added kelvin option for module/temperature

* changelog for the changes i made

* fixed typos

* fixed the temperature conversion to be more precise

* Update CHANGELOG.md

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* changed the calculation of the different temperatures

it now uses float as a initial value and makes m_temp temp_k and temp_f by converting and rounding with std::round

* std::lround makes more sense to use than std::round

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
2022-08-21 19:10:48 +02:00
patrick96 1c554dd0e0
Merge branch 'hotfix/3.5.1' 2020-12-12 13:28:57 +01:00
Patrick Ziegler 82ebad5e7a
fix(timer_module): Ensure that interval > 0 (#2274)
Since 3.5.0, we use m_interval for a modulo operation, this crashes the
bar if the interval is 0. A non-positive interval shouldn't be allowed
anyway, so we now throw an exception in that case.

Fixes #2273
2020-12-05 22:58:38 +01:00
Quan 39c73a8234
feat: Warn state for cpu, memory, fs, battery modules (#2199)
* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps

* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps

* Fix minor error

* Added WARN state for cpu module

* Implement WARN state for CPU, Memory modules, working on fs module

* Implement WARN state for fs module

* Simplify WARN state implementation for cpu and memory

* explicitly check percentage in get_by_percentage_with_borders

* Fixed silly error

* implement warn state on battery module, standardize the implementation on other modules

* minor fixes

* fix annoying error

* use more intuitive param name

* Fix percentage with borders bug

* Make requested changes
Hide the effect of warn states when unused

* Backward Compat: use no format instead of fallback label

* Reformat

* Refactor

* Reformat

* Reformat: convert tabs to spaces

* Reformat
2020-12-02 15:55:13 +01:00
Quan 3895ace12a
temp: Use first/last ramp only for edge temps (#2197)
ramp-0 is used for everything <= base-temperature and ramp-N is used for everything >= warn-temperature

* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps

* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps

* Fix minor error

* explicitly check percentage in get_by_percentage_with_borders

* Fixed silly error
2020-10-09 14:05:50 +02:00
Jake Howard 4ab251f33c temperature: Use format-warn at warn-temperature not after (#1897) 2019-10-16 18:45:49 +02:00
Kazufumi NOTO 7414e98008 feat(temp): Configurable lower bound for ramp (#1706)
Similar to warn-temperature, temps below `base-temperature` will use the first ramp icon.

Closes #1703
2019-04-07 18:36:09 +02:00
Vasili Karaev a2ab4699ab refactor(temperature): Do not use 'm_' prefix with local variable 2018-09-04 14:07:22 -07:00
patrick96 095d68fad0 fix: Stop using ato* for string to num conversion
atoi, atof and so on have undefined behavior if anything goes wrong. We
now use strto*, but without error checking. In most places overflows and
the like *should* not happen. String to number conversions are only used
when reading data from other applications or from the config, if another
application gives unparsable strings or too large numbers, then most
likely there is something wrong with that application. If the error
comes from the user config, then the user has to live with values
provided by strto* on error (which are very reasonable)

Fixes #1201
2018-05-03 11:07:37 -07:00
patrick96 c30159abc6 feat(temp): Add units option
Avoids having lots of tokens
2018-02-15 18:50:59 -08:00
patrick96 a9014e31dc refactor(temp): Mark %temperature% token as deprecated 2018-02-15 18:50:59 -08:00
patrick96 e4634ce95f feat(temp): Add temperature tokens without unit 2018-02-15 18:50:59 -08:00
Chris Snell 5737156ae5 feat(temperature): Fahrenheit and Celsius tokens (#804)
%temperature-f% and %temperature-c%
2017-10-18 22:29:53 +02:00
NBonaparte ce05aa36a1 feat(temperature): Add hwmon sysfs support (#688) 2017-08-29 15:10:28 -07:00
Michael Carlberg ad0af86a7b refactor(battery): Abstract value readers
Refs #263, #245
2016-12-31 04:20:48 +01:00
Michael Carlberg 14958bdd23 fix: Correct type for module interval 2016-12-31 03:04:01 +01:00
Michael Carlberg 78bb3695e6 refactor(config): Deduce return type from default value 2016-12-30 23:32:05 +01:00
Michael Carlberg 788a7ca3a3 refactor(modules): Get rid of .inl files 2016-12-21 09:21:35 +01:00
Michael Carlberg c01f111e34 refactor(modules): Move setup to constructor 2016-12-21 08:00:09 +01:00
Michael Carlberg ff9be848c7 refactor(clang-tidy): Apply fixes 2016-11-25 21:58:49 +01:00
Michael Carlberg c6d85b2b92 refactor: Optimize build 2016-11-20 23:04:31 +01:00
Michael Carlberg 88c8bbd940 refactor: Fwd declare drawtypes
Ref #164
2016-11-19 15:49:06 +01:00
Michael Carlberg fd57ab0f3d fix: project rename 2016-11-19 06:26:07 +01:00
Michael Carlberg 2301de667b fix(temperature): Calculate percentage value 2016-11-14 17:56:29 +01:00
Michael Carlberg 1e08aa455b feat(temperature): Support for <ramp> 2016-11-12 13:07:05 +01:00
NBonaparte a06b38f534 feat(temperature): Added temp module and examples 2016-11-10 22:54:07 -08:00