MCPcopy Create free account
hub / github.com/OpenActionAPI/rust-elgato-streamdeck / reset

Method reset

src/lib.rs:231–249  ·  view source on GitHub ↗

Resets the device

(&self)

Source from the content-addressed store, hash-verified

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> {

Callers

nothing calls this directly

Calls 1

send_feature_reportFunction · 0.85

Tested by

no test coverage detected