| 78 | } |
| 79 | |
| 80 | void 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 | |
| 94 | void StrimerLConnectController::SetLedsDirect(uint8_t zone, RGBColor * led_colours, uint8_t led_count) |
| 95 | { |
no test coverage detected