turing-machines / tpi

CLI tool to control your Turing Pi 2 board
https://docs.turingpi.com/docs/turing-pi2-tpi-cli
Apache License 2.0
29 stars 3 forks source link

feat: add cooling devices handling #28

Closed barrenechea closed 5 months ago

barrenechea commented 5 months ago

Enabling the usage of the newly added cooling devices' handling, already exposed over bmc-ui.

I tried to keep the code structure similar to the current project. Feel free to suggest any changes as needed!

The interactions are:

./target/release/tpi cooling status
|----Device-----|-Speed-|-Max Speed-|
|cooling_device0|      5|         10|
./target/release/tpi cooling set cooling_device0 0
ok
./target/release/tpi cooling set cooling_device1 0
Device not found

If the board has no cooling devices:

./target/release/tpi cooling status
No cooling devices found