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

Method firmware_version

src/lib.rs:175–192  ·  view source on GitHub ↗

Returns firmware version of the StreamDeck

(&self)

Source from the content-addressed store, hash-verified

173
174 /// Returns firmware version of the StreamDeck
175 pub fn firmware_version(&self) -> Result<String, StreamDeckError> {
176 match self.kind {
177 Kind::Original | Kind::Mini | Kind::MiniMk2 | Kind::MiniDiscord => {
178 let bytes = get_feature_report(&self.device, 0x04, 17)?;
179 Ok(extract_str(&bytes[5..])?)
180 }
181
182 Kind::MiniMk2Module => {
183 let bytes = get_feature_report(&self.device, 0xA1, 17)?;
184 Ok(extract_str(&bytes[5..])?)
185 }
186
187 _ => {
188 let bytes = get_feature_report(&self.device, 0x05, 32)?;
189 Ok(extract_str(&bytes[6..])?)
190 }
191 }
192 }
193
194 /// Reads all possible input from Stream Deck device
195 pub fn read_input(&self, timeout: Option<Duration>) -> Result<StreamDeckInput, StreamDeckError> {

Callers

nothing calls this directly

Calls 2

get_feature_reportFunction · 0.85
extract_strFunction · 0.85

Tested by

no test coverage detected