Resets the device
(&self)
| 229 | |
| 230 | /// Resets the device |
| 231 | pub fn reset(&self) -> Result<(), StreamDeckError> { |
| 232 | match self.kind { |
| 233 | Kind::Original | Kind::Mini | Kind::MiniMk2 | Kind::MiniDiscord | Kind::MiniMk2Module => { |
| 234 | let mut buf = vec![0x0B, 0x63]; |
| 235 | |
| 236 | buf.extend(vec![0u8; 15]); |
| 237 | |
| 238 | Ok(send_feature_report(&self.device, buf.as_slice())?) |
| 239 | } |
| 240 | |
| 241 | _ => { |
| 242 | let mut buf = vec![0x03, 0x02]; |
| 243 | |
| 244 | buf.extend(vec![0u8; 30]); |
| 245 | |
| 246 | Ok(send_feature_report(&self.device, buf.as_slice())?) |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | /// Sets brightness of the device, value range is 0 - 100 |
| 252 | pub fn set_brightness(&self, percent: u8) -> Result<(), StreamDeckError> { |
nothing calls this directly
no test coverage detected