From ac6a8dde1b7a94ce3595aa0cfd9906c4e986be3a Mon Sep 17 00:00:00 2001 From: d4nin3u Date: Tue, 6 Aug 2024 10:57:11 +0100 Subject: [PATCH] Spelling and formatting fixes --- chuniio/config.c | 2 +- chuniio/serialimpl.c | 14 ++++++-------- dist/chuni/segatools.ini | 6 +++--- dist/chusan/segatools.ini | 6 +++--- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/chuniio/config.c b/chuniio/config.c index 5c7bca1..0f8b31b 100644 --- a/chuniio/config.c +++ b/chuniio/config.c @@ -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); diff --git a/chuniio/serialimpl.c b/chuniio/serialimpl.c index 04b1c39..7a68435 100644 --- a/chuniio/serialimpl.c +++ b/chuniio/serialimpl.c @@ -99,13 +99,12 @@ void led_serial_update(struct _chuni_led_data_buf_t* data) } void led_serial_update_openithm(const byte* rgb) - { if (serial_port != INVALID_HANDLE_VALUE) { char led_buffer[100]; - DWORD bytes_to_write; // No of bytes to write into the port - DWORD bytes_written = 0; // No of bytes written to the port + DWORD bytes_to_write; // No of bytes to write into the port + DWORD bytes_written = 0; // No of bytes written to the port bytes_to_write = sizeof(led_buffer); BOOL status; @@ -115,11 +114,10 @@ void led_serial_update_openithm(const byte* rgb) led_buffer[98] = 0xDD; led_buffer[99] = 0xDD; - 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 + 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 NULL); - } } diff --git a/dist/chuni/segatools.ini b/dist/chuni/segatools.ini index 7ef3996..5b8af0c 100644 --- a/dist/chuni/segatools.ini +++ b/dist/chuni/segatools.ini @@ -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 ; 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. diff --git a/dist/chusan/segatools.ini b/dist/chusan/segatools.ini index a97c06c..c0b19de 100644 --- a/dist/chusan/segatools.ini +++ b/dist/chusan/segatools.ini @@ -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 ; 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.