audiohacked / OpenCorsairLink

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

Machine Readable Format output does not produce any output for H150i Pro #234

Closed mcombell closed 4 years ago

mcombell commented 4 years ago

Describe the bug OpenCorsairLink has the --machine option that according to the --help output says:

OpenCorsairLink [options] Options: ... --machine :Prints statuses in Machine Readable Format.

When I use the --machine option on my computer with a Corsair H150i Pro, it does not produce any output.

To Reproduce Steps to reproduce the behavior:

  1. Run OpenCorsairLink without the --machine parameter and the expected output is produced:
sudo ./OpenCorsairLink.elf --device 0

Dev=0, CorsairLink Device Found: H150i Pro!

Vendor: Corsair
Product: H150i Pro
Firmware: 1.0.4.0
Temperature 0: 33.50 C
Fan 0:  Mode 0x00
    Current/Max Speed 606/0 RPM
Fan 1:  Mode 0x00
    Current/Max Speed 618/0 RPM
Fan 2:  Mode 0x00
    Current/Max Speed 600/0 RPM
Pump:   Mode 0x02 (AsetekProPumpPerformance)
    Current/Max Speed 2820/0 RPM
  1. Run OpenCorsairLink with the --machine parameter and no output is produced
    sudo ./OpenCorsairLink.elf --device 0 --machine

Expected behavior The expected behaviour is that the pump and fan statuses are displayed on the screen. Something like:

temperature:0:33.50
fan:0:0:594:0
fan:1:0:618:0
fan:2:0:600:0
pump:2:2790:0

Desktop (please complete the following information):

mcombell commented 4 years ago

The cause of this issue is that the --machine parameter causes OpenCorsairLink to only output the messages that are generated by calls to the msg_machine method. Currently the only class that calls this method is the hydro_asetek.c file.

The H150i Pro uses the hydro_asetekpro.c file but this does not have the msg_machine method calls.

I will create a pull request to add calls to the msg_machine method so the correct output is produced for the H150i Pro

mcombell commented 4 years ago

I have created a Pull Request (https://github.com/audiohacked/OpenCorsairLink/pull/235) containing the changes to add msg_machine method calls.