Add CrOS_EC_Python as a Hardware Controller#164
Open
Steve-Tech wants to merge 3 commits intoTamtamHero:mainfrom
Open
Add CrOS_EC_Python as a Hardware Controller#164Steve-Tech wants to merge 3 commits intoTamtamHero:mainfrom
Steve-Tech wants to merge 3 commits intoTamtamHero:mainfrom
Conversation
Will only pick crosecpython if it is installed.
|
cc: @leopoldhub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
Parsing the output of
ectoolis a very inefficient way of doing things. Not just from the overhead of parsing with regex, but also since ectool was designed for debugging,ectool temps allwill read each temperature from the memory map, then execute a command for each temp sensor to get it's info, and the fan speed; which is very unnecessary for this project. Unfortunately ECs are complicated and there wasn't much else you could do.Over the past year or so, I've been working on
CrOS_EC_Python, which can interact with the EC directly over/dev/cros_ec, or using the I/O ports if needed. One of the functions CrOS_EC_Python implements iscros_ec_python.commands.memmap.get_temps()which will only read the sensors from the memory map without transferring any commands.Since CrOS_EC_Python is just another python package, this also means you won't have to worry about installing ectool. CrOS_EC_Python also supports FreeBSD, so fw-fanctrl may potentially also work on FreeBSD (with the required service configuration).
However, CrOS_EC_Python isn't the most tested library, it has only been thoroughly tested on my Framework 13 AMD 7840U, but is known to work on the Framework 13 Intel 11th Gen, and a Framework 16 (in the FW Discord). If you like this PR but are concerned about stability, feel free to drop commit 51328b1, and just make it an optional dependency.
Thanks,
Steve