From 66c9691c872d12f65b125ca8ed69573b2119ce6c Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Fri, 25 Jul 2025 00:57:00 -0500 Subject: [PATCH] Add exception for HYTE NP50 third channel, which needs to send 750 bytes according to documentation --- .../HYTENexusController.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Controllers/HYTENexusController/HYTENexusController.cpp b/Controllers/HYTENexusController/HYTENexusController.cpp index 43873b23..124ba0fa 100644 --- a/Controllers/HYTENexusController/HYTENexusController.cpp +++ b/Controllers/HYTENexusController/HYTENexusController.cpp @@ -195,11 +195,14 @@ void HYTENexusController::LEDStreaming(unsigned char channel, unsigned short led } /*-----------------------------------------------------*\ - | The HYTE THICC Q60 requires 90 bytes to be sent for | - | the 4th channel (logo) even though it only has 4 LEDs | + | The default data length is (led_count * 3) + 7 | \*-----------------------------------------------------*/ unsigned int bytes_to_send = ((led_count * 3) + 7); + /*-----------------------------------------------------*\ + | The HYTE THICC Q60 requires 90 bytes to be sent for | + | the 4th channel (logo) even though it only has 4 LEDs | + \*-----------------------------------------------------*/ if((device_pid == HYTE_THICC_Q60_PID) && (channel == 3) && (bytes_to_send < 90)) @@ -207,6 +210,18 @@ void HYTENexusController::LEDStreaming(unsigned char channel, unsigned short led bytes_to_send = 90; } + /*-----------------------------------------------------*\ + | The HYTE Nexus Portal NP50 requires 750 bytes to be | + | sent for the 3rd channel, no matter how many LEDs it | + | has connected | + \*-----------------------------------------------------*/ + if((device_pid == HYTE_NEXUS_PORTAL_NP50_PID) + && (channel == 2) + && (bytes_to_send < 750)) + { + bytes_to_send = 750; + } + serialport->serial_write((char *)command_buf, bytes_to_send); serialport->serial_flush_tx(); serialport->serial_flush_rx();