Initialize transmit color count after inserting blanks

This commit is contained in:
Adam Honse
2020-07-21 12:28:05 -05:00
parent 403d60e214
commit 902ebc2e83

View File

@@ -26,9 +26,6 @@ HyperXAlloyOriginsController::~HyperXAlloyOriginsController()
void HyperXAlloyOriginsController::SetLEDsDirect(std::vector<RGBColor> colors)
{
int colors_to_send = colors.size();
int colors_sent = 0;
/*-----------------------------------------------------*\
| Insert color data for unused positions |
\*-----------------------------------------------------*/
@@ -37,6 +34,13 @@ void HyperXAlloyOriginsController::SetLEDsDirect(std::vector<RGBColor> colors)
colors.insert(colors.begin() + skip_idx[skip_cnt], 0x00000000);
}
/*-----------------------------------------------------*\
| Set up variables to track progress of color transmit |
| Do this after inserting blanks |
\*-----------------------------------------------------*/
int colors_to_send = colors.size();
int colors_sent = 0;
SendDirectInitialization();
for(int pkt_idx = 0; pkt_idx < 9; pkt_idx++)