Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

other: support hw.temperature-based temps on FreeBSD #1024

Merged
merged 3 commits into from Feb 19, 2023

Conversation

ClementTsang
Copy link
Owner

@ClementTsang ClementTsang commented Feb 18, 2023

Description

A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), please provide screenshots of the changes:

Add simple support for FreeBSD-based systems that may get temperatures using sysctl and hw.temperature.

Issue

If applicable, what issue does this address?

Closes: #797

Testing

If relevant, please state how this was tested. All changes must be tested to work:

If this is a code change, please also indicate which platforms were tested:

  • Windows
  • macOS
  • Linux
  • FreeBSD

I tested whether the code works for some sysctl - I tried it with dev.cpu on my FreeBSD box, and it works. I did not test it for hw.temperature, as that does nothing for my x86-64-based FreeBSD machine.

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

@ClementTsang ClementTsang marked this pull request as ready for review February 18, 2023 23:55
@codecov
Copy link

codecov bot commented Feb 18, 2023

Codecov Report

Base: 21.31% // Head: 21.55% // Increases project coverage by +0.23% 🎉

Coverage data is based on head (a8b1340) compared to base (f89b243).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1024      +/-   ##
==========================================
+ Coverage   21.31%   21.55%   +0.23%     
==========================================
  Files          75       75              
  Lines       14754    14590     -164     
==========================================
  Hits         3145     3145              
+ Misses      11609    11445     -164     
Impacted Files Coverage Δ
src/bin/main.rs 36.40% <0.00%> (-0.18%) ⬇️
src/canvas.rs 0.00% <0.00%> (ø)
src/app/data_farmer.rs 0.00% <0.00%> (ø)
src/app/data_harvester.rs 0.00% <0.00%> (ø)
src/canvas/widgets/mem_basic.rs 0.00% <0.00%> (ø)
src/canvas/widgets/mem_graph.rs 0.00% <0.00%> (ø)
src/app/data_harvester/memory/general/heim.rs 0.00% <0.00%> (ø)
src/data_conversion.rs 14.22% <0.00%> (+1.50%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ClementTsang ClementTsang merged commit 6d15f01 into master Feb 19, 2023
@ClementTsang ClementTsang deleted the support_freebsd_rockpro64_temps branch February 19, 2023 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

It's super easy to read temperatures on aarch/arm64 on FreeBSD
1 participant