Returns firmware version of the StreamDeck
(&self)
| 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> { |
nothing calls this directly
no test coverage detected