chuniio: Add OpeNITHM LED protocol support #26

Merged
Dniel97 merged 3 commits from d4nin3u/segatools:develop into develop 2024-08-06 21:35:52 +00:00
4 changed files with 13 additions and 15 deletions
Showing only changes of commit ac6a8dde1b - Show all commits

View File

@ -63,7 +63,7 @@ void chuni_io_config_load(
cfg->controller_led_output_pipe = GetPrivateProfileIntW(L"led", L"controllerLedOutputPipe", 1, filename);
cfg->controller_led_output_serial = GetPrivateProfileIntW(L"led", L"controllerLedOutputSerial", 0, filename);
cfg->controller_led_output_openithm = GetPrivateProfileIntW(L"led", L"controllerLedOutputOpenITHM", 0, filename);
cfg->controller_led_output_openithm = GetPrivateProfileIntW(L"led", L"controllerLedOutputOpeNITHM", 0, filename);
cfg->led_serial_baud = GetPrivateProfileIntW(L"led", L"serialBaud", 921600, filename);

View File

@ -99,7 +99,6 @@ void led_serial_update(struct _chuni_led_data_buf_t* data)
}
void led_serial_update_openithm(const byte* rgb)
{
Dniel97 marked this conversation as resolved
Review

Please remove the nw line here and adjust the comments to either use

/*
*/

or align them properly

Please remove the nw line here and adjust the comments to either use ``` /* */ ``` or align them properly
if (serial_port != INVALID_HANDLE_VALUE)
{
@ -117,9 +116,8 @@ void led_serial_update_openithm(const byte* rgb)
status = WriteFile(serial_port, // Handle to the Serial port
led_buffer, // Data to be written to the port
bytes_to_write, //No of bytes to write
&bytes_written, //Bytes written
bytes_to_write, // No of bytes to write
&bytes_written, // Bytes written
NULL);
}
}

View File

@ -82,12 +82,12 @@ cabLedOutputSerial=0
controllerLedOutputPipe=1
; Output slider LED data to the serial port
controllerLedOutputSerial=0
; Use the OpenITHM protocol for serial LED output
controllerLedOutputOpenITHM=0
; Use the OpeNITHM protocol for serial LED output
controllerLedOutputOpeNITHM=0

OpeNITHM

lol

OpeNITHM lol
; Serial port to send data to if using serial output. Default is COM5.
;serialPort=COM5
; Baud rate for serial data (set to 115200 if using OpenITHM)
; Baud rate for serial data (set to 115200 if using OpeNITHM)
;serialBaud=921600
; Data output a sequence of bytes, with JVS-like framing.

View File

@ -108,12 +108,12 @@ cabLedOutputSerial=0
controllerLedOutputPipe=1
; Output slider LED data to the serial port
controllerLedOutputSerial=0
; Use the OpenITHM protocol for serial LED output
controllerLedOutputOpenITHM=0
; Use the OpeNITHM protocol for serial LED output
controllerLedOutputOpeNITHM=0
Dniel97 marked this conversation as resolved Outdated

see above

see above
; Serial port to send data to if using serial output. Default is COM5.
;serialPort=COM5
; Baud rate for serial data (set to 115200 if using OpenITHM)
; Baud rate for serial data (set to 115200 if using OpeNITHM)
Dniel97 marked this conversation as resolved Outdated

see above

see above
;serialBaud=921600
; Data output a sequence of bytes, with JVS-like framing.