Skip to content

Conversation

@vmatare
Copy link
Owner

@vmatare vmatare commented Apr 7, 2023

This should allow the user to omit the indices: config field if a sensor input is sufficiently specified by other criteria. In this case, thinkfan should pick up all pwm/temp files found for the given sensor. A major caveat being that the number of available temperature inputs won't be known before a sensors has been successfully looked up...

src/hwmon.cpp Outdated
auto subdir = path + "/" + entries[i]->d_name;
free(entries[i]);

for (const filesystem::path &subdir : dir_entries<filter_subdirs>(path)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (const filesystem::path &subdir : dir_entries<filter_subdirs>(path)) {
for (const auto &subdir : dir_entries<filter_subdirs>(path)) {

and elsewhere in this PR

src/hwmon.cpp Outdated
else
found_paths_.push_back(path);
else {
vector<filesystem::path> paths = dir_entries<filter_driver_file>(path);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
vector<filesystem::path> paths = dir_entries<filter_driver_file>(path);
auto paths = dir_entries<filter_driver_file>(path);

@vmatare vmatare marked this pull request as ready for review October 16, 2024 13:56
@vmatare vmatare force-pushed the optional_hwmon_indices branch from 4f2f9a7 to 70e7d05 Compare October 16, 2024 13:59
vmatare and others added 3 commits October 17, 2024 01:01
This should allow the user to omit the indices: config field if a sensor
input is sufficiently specified by other criteria. In this case,
thinkfan should pick up all pwm/temp files found for the given sensor. A
major caveat being that the number of available temperature inputs won't
be known before a sensors has been successfully looked up...
@vmatare vmatare force-pushed the optional_hwmon_indices branch from de51009 to a98b773 Compare October 16, 2024 23:01
Copy link

@wonbinbk wonbinbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I'm a fan

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.

3 participants