MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / SetMode

Method SetMode

Controllers/LianLiController/StrimerLConnectController.cpp:80–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void StrimerLConnectController::SetMode(uint8_t mode, uint8_t zone, uint8_t speed, uint8_t brightness, uint8_t direction, bool /*random_colours*/)
81{
82 uint8_t buffer[STRIMERLCONNECT_PACKET_SIZE] = { STRIMERLCONNECT_REPORT_ID, STRIMERLCONNECT_MODE_COMMAND, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
83
84 buffer[STRIMERLCONNECT_COMMAND_BYTE] |= zone;
85
86 buffer[STRIMERLCONNECT_DATA_BYTE] = mode;
87 buffer[STRIMERLCONNECT_SPEED_BYTE] = speed_data[speed];
88 buffer[STRIMERLCONNECT_DIRECTION_BYTE] = (direction == 0) ? 1 : 0;
89 buffer[STRIMERLCONNECT_BRIGHTNESS_BYTE] = brightness_data[brightness];
90
91 hid_write(dev, buffer, STRIMERLCONNECT_PACKET_SIZE);
92}
93
94void StrimerLConnectController::SetLedsDirect(uint8_t zone, RGBColor * led_colours, uint8_t led_count)
95{

Callers 2

UpdateZoneLEDsMethod · 0.45
DeviceUpdateModeMethod · 0.45

Calls 1

hid_writeFunction · 0.85

Tested by

no test coverage detected