audiohacked / OpenCorsairLink

Linux and Mac OS support for the CorsairLink Devices
GNU General Public License v2.0
705 stars 125 forks source link

Fix issue 234: machine readable format for asetekpro pump #235

Closed mcombell closed 4 years ago

mcombell commented 4 years ago

Proposed changes

This commit adds support for the --machine option to the asetekpro pump so that it produces machine readable output for the values of the temperature, fans and pump.

Types of changes

What types of changes does your code introduce to OpenCorsairLink? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

The fix was to simply add calls to the msg_machine() method similar to what already exists in the hydro_asetek.c file.

I have tested this with a H150i Pro and it produces output like:

temperature:0:33.70
fan:0:0:604:0
fan:1:0:618:0
fan:2:0:600:0
pump:2:2820:0

This change should work with other devices that use the asetekpro pump