Skip to content

[sensors][darwin]: retrieve sensor information in one function call#1973

Merged
shirou merged 2 commits intoshirou:masterfrom
uubulb:sensors/get_sensor_info_in_one_call
Dec 25, 2025
Merged

[sensors][darwin]: retrieve sensor information in one function call#1973
shirou merged 2 commits intoshirou:masterfrom
uubulb:sensors/get_sensor_info_in_one_call

Conversation

@uubulb
Copy link
Copy Markdown
Contributor

@uubulb uubulb commented Dec 17, 2025

The new getSensors function retrieves both sensor names and temperature metrics in a single call, avoiding the need to invoke ioHIDEventSystemClientCopyServices twice. It also performs deduplication internally, removing the need for a separate helper function.

Additionally, some code in the process package was refactored for readability. These changes are mostly equivalent in behavior and should not affect testing results.

Copy link
Copy Markdown
Owner

@shirou shirou left a comment

Choose a reason for hiding this comment

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

It looks good refactoring. But could you check my comments? Thanks!

Comment thread process/types_darwin.go Outdated
Comment thread sensors/sensors_darwin_arm64.go
Copy link
Copy Markdown
Owner

@shirou shirou left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants